[GHC] #12393: Poor error message with equational type constraints
GHC
ghc-devs at haskell.org
Fri Jul 22 09:05:19 UTC 2016
#12393: Poor error message with equational type constraints
---------------------------------+--------------------------------------
Reporter: laneb | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1
Resolution: invalid | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11469 | Differential Rev(s):
Wiki Page: |
---------------------------------+--------------------------------------
Changes (by thomie):
* status: new => closed
* component: Compiler => GHCi
* resolution: => invalid
* related: => #11469
Comment:
If you turn on `GADTs` or `TypeFamilies` in GHCi, you'll get the error
message you were hoping for.
{{{
*Test> :set -XGADTs
*Test> myFunc "z"
<interactive>:3:1: error:
• Couldn't match expected type ‘Char’
with actual type ‘FooInner a0’
The type variable ‘a0’ is ambiguous
• In the first argument of ‘print’, namely ‘it’
In a stmt of an interactive GHCi command: print it
}}}
I'm closing this ticket. I agree that the original error message is poor,
but #11469 (the ticket referred to in comment:2) will fix the problem.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12393#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list