[GHC] #14164: GHC hangs on type family dependency
GHC
ghc-devs at haskell.org
Sat Jun 2 12:21:42 UTC 2018
#14164: GHC hangs on type family dependency
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
| InjectiveFamilies
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Here's a somewhat smaller example that also loops at compile-time:
{{{#!hs
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
module Bug where
data G (x :: a) = GNil | GCons (G x)
type family F (xs :: [a]) (g :: G (z :: a)) = (res :: [a]) | res -> a
where
F (x:xs) GNil = x:xs
F (x:xs) (GCons rest) = x:F xs rest
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14164#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list