[GHC] #14319: Stuck kind families can lead to lousy error messages
GHC
ghc-devs at haskell.org
Wed Oct 4 16:57:51 UTC 2017
#14319: Stuck kind families can lead to lousy error messages
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler (Type | Version: 8.3
checker) | Keywords: TypeInType,
Resolution: | TypeFamilies
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Actually, no. I can get just as bad an error message at the term level:
{{{#!hs
f :: forall (s :: Symbol). Proxy s -> F s
f _ _ = undefined
}}}
produces
{{{
ArityError.hs:14:1: error:
• Couldn't match expected type ‘F s’ with actual type ‘p0 -> a0’
The type variables ‘p0’, ‘a0’ are ambiguous
• The equation(s) for ‘f’ have two arguments,
but its type ‘Proxy s -> F s’ has only one
• Relevant bindings include
f :: Proxy s -> F s (bound at ArityError.hs:14:1)
|
14 | f _ _ = undefined
| ^^^^^^^^^^^^^^^^^
}}}
So we have the same problem there.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14319#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list