[GHC] #13775: Type family expansion is too lazy, allows accepting of ill-typed terms
GHC
ghc-devs at haskell.org
Mon Jun 5 21:01:00 UTC 2017
#13775: Type family expansion is too lazy, allows accepting of ill-typed terms
-------------------------------------+-------------------------------------
Reporter: fizruk | Owner: diatchki
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.2
checker) | Keywords:
Resolution: | CustomTypeErrors
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts | Unknown/Multiple
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by diatchki):
I remember how the implementation works.
My comment was about the fact that GHC is perfectly happy to treat "stuck"
types as ordinary types without fully resolving them, which is why it can
solve constraints such as `Show (Proxy (TypeError ...))`, or `Show (Proxy
(F Int))`.
A different design choice is to refuse to solve such constraints until GHC
is sure that the type functions involved will produce a valid result, but
that's not what we currently do. As a result, neither the `TypeError` nor
the missing `F Int` instance are reported, and the `Show` constraint is
happily solved, which is---perhaps---somewhat confusing.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13775#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list