[GHC] #10327: Devise workaround for how infinite types prevent closed type family reduction
GHC
ghc-devs at haskell.org
Mon Apr 20 21:08:55 UTC 2015
#10327: Devise workaround for how infinite types prevent closed type family
reduction
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
I must be missing something. `Inf f (f :+: g)` will certainly reduce for
any ground `f` (such as `True` or `False`) because then the call will be
apart from the first equation so the second can fire.
If `f` is not ground, then it'll still reduce, if `f` is anything other
than `f2 :+: g`, for the same reason.
If `f` is a variable then yes the reduction is stuck, but that seems fair
enough. Reducing it to {{{f `Seq` rhs}}} doesn't get us any further
forward (e.g. if we want to unify this with another type) but it does add
real new complication.
Very unconvinced.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10327#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list