[GHC] #14570: Untouchable error arises from type equality, but not equivalent program with fundeps
GHC
ghc-devs at haskell.org
Tue Jan 2 01:33:28 UTC 2018
#14570: Untouchable error arises from type equality, but not equivalent program
with fundeps
-------------------------------------+-------------------------------------
Reporter: lexi.lambda | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.2
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by AntC):
Replying to [comment:3 dfeuer]:
> At the least, this is a rather poor error message.
I'm wondering if the o.p. gave the full story about the error message. I
retried the Type Family version, and got `f0 is untouchable` rejection,
but against the type for `f`. The message went on to give more info `f is
a rigid type variable ...`; plus a suggestion to `AllowAmbiguousTypes`.
Switching that on does indeed suppress the message against `f`; then it
just reappears against `g`, as per the o.p., but with less helpful info.
(I've put more narrative against the StackOverflow question, link above.)
Simon's explanation at comment:1 tells what's going on, but not really
why. The Schrijvers et al paper didn't really help: it's aiming to explain
FunDep inference in terms of Type Families/System FC, so doesn't tell
why/how ghc's behaviour is different in this example.
Re the `rigid type variable` message, there are some reasonable
explanations on StackOverflow. Re `f0 is untouchable` not so much.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14570#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list