[GHC] #15869: Discrepancy between seemingly equivalent type synonym and type family
GHC
ghc-devs at haskell.org
Wed Nov 7 16:27:15 UTC 2018
#15869: Discrepancy between seemingly equivalent type synonym and type family
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.6.2
checker) |
Resolution: | Keywords: TypeFamilies
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 goldfire):
Lots of bugs here!
1. I would expect `Apply1` to be rejected without an explicit `forall` in
the equation, giving the polytype of `f`.
2. The error message for `Apply2` shouldn't say that it expects for
arguments to `f`. The rest of the error message is perhaps confusing, but
it's not unreasonable.
3. The version of `Apply2` with the explicit `forall` in the equation
should be accepted.
4. In the `g` and `h` with `KindOf1`: Their types should be `forall a -> a
-> Type`, not what GHC is reporting.
5. Ditto for `h` in the `KindOf2` case.
Note that the inferred nature (as opposed to specified) of `a` is a non-
bug: when you don't write a type signature, you don't get specified
variables. But of course these should be required, not invisible or
specified.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15869#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list