haskell / haskell/error-messages

"Cannot apply expression [...] to a visible type argument" does not explain the problem

Open
#54 5 comments 0 reactions 0 assignees View on GitHub
status:Composing error message tool:GHC type:error-message
Dominant language
No language data
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

MWEs:

```haskell
{-# LANGUAGE TypeApplications #-}

_ = let x = pure () in x @Maybe
```

```
ghci> :set -XTypeApplications
ghci> x = pure ()
ghci> x @Maybe
```

Both result in the error `Cannot apply expression of type ‘f0 ()’ to a visible type argument ‘Maybe’`, leaving me surprised and confused. What is the issue here?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.