haskell / haskell/error-messages

"In a stmt of an interactive GHCi command: print it"

Open
#537 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

```
ghci> data T = MkT
ghci> MkT

:2:1: error:
• No instance for (Show T) arising from a use of ‘print’
• In a stmt of an interactive GHCi command: print it
ghci> 0#

:3:1: error:
• Couldn't match a lifted type with an unlifted type
When matching types
a0 :: *
GHC.Prim.Int# :: TYPE 'GHC.Types.IntRep
• In the first argument of ‘print’, namely ‘it’
In a stmt of an interactive GHCi command: print it
```

The part `stmt of an interactive GHCi command: print it` is confusing.

It corresponds to what's happening under the hood - it will change if you set `-fno-it` and/or `-interactive-print `, but I still think it's not good enough. This error is often seen by beginners.

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.