Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PsErrOpFewArgs -> 24180 #221

Open
PPKFS opened this issue Jun 14, 2022 · 1 comment
Open

PsErrOpFewArgs -> 24180 #221

PPKFS opened this issue Jun 14, 2022 · 1 comment

Comments

@PPKFS
Copy link
Collaborator

PPKFS commented Jun 14, 2022

No description provided.

@david-christiansen david-christiansen transferred this issue from haskell/error-messages Jun 21, 2022
@Bodigrim
Copy link
Contributor

The existing https://errors.haskell.org/messages/GHC-24180/ is somewhat misleading:

---
title: Too few arguments to infix type operator
summary: A type operator was not provided with both arguments.
severity: warning
extension: TypeOperators
introduced: 9.6.1
---
This error occurs when an infix operator in a type is used as a prefix or postfix operator. That is, if one writes `T1 OP` or `OP T2` instead of `T1 OP T2`, for types `T1` and `T2` and infix operator `OP`.

GHC-24180 can be thrown in contexts unrelated to TypeOperators. For example,

src/Test/Tasty/GitHubActions.hs:29:21: error: [GHC-24180]
    Operator applied to too few arguments: ?
   |
29 |     ghaCallback :: (?colors :: Bool) =>  OptionSet -> TestTree -> StatusMap -> IO (Time -> IO Bool)
   |

The cure in such case is to enable {-# LANGUAGE ImplicitParams #-}. It would be great to have it documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants