
#16013: :kind! accepts unsaturated type aliases -------------------------------------+------------------------------------- Reporter: dmwit | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13962 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): My own vote is that we drop the saturation requirement only at top-level, calling the current implementation a bug. To my horror, GHC allows this interaction: {{{#!hs type family Map f x where Map _ '[] = '[] Map f (x : xs) = f x : Map f xs data Nat = Zero | Succ Nat type family Pred n where Pred Zero = Zero Pred (Succ n) = n }}} {{{ λ> :kind! Map Pred [Succ (Succ Zero), Succ (Succ (Succ Zero)), Zero] Map Pred [Succ (Succ Zero), Succ (Succ (Succ Zero)), Zero] :: [Nat] = '[ 'Succ 'Zero, 'Succ ('Succ 'Zero), 'Zero] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16013#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler