
#13901: Lift the "Illegal polymorphic type" restriction on type families -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Type checker) | Keywords: TypeFamilies | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #11962 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently, I can do this: {{{#!hs type Foo = forall a. Maybe a }}} But if I try to refactor this to an equivalent type family: {{{#!hs type family Foo where Foo = forall a. Maybe a }}} Then GHC complains: {{{ • Illegal polymorphic type: forall a. Maybe a • In the equations for closed type family ‘Foo’ In the type family declaration for ‘Foo’ }}} We should lift this restriction. This would be necessary, for instance, to implement #11962. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13901 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler