|
GADTs: polymorphic type arguments: msg#00037lang.haskell.glasgow.bugs
GHC currently forbids (G)ADTS with polymorphic type arguments: > {-# OPTIONS -fglasgow-exts #-} > data Com :: (* -> *) where > I :: Com (forall a . a -> a) > eval :: Com t -> t > eval I = id This seems, however, rather benign. Unlike, for instance, [forall a . a -> a], which is a list of polymorphic values. Omitting the forall yields a working declaration: > data Com :: (* -> *) where > I :: Com (a -> a) Now, `I' has type forall a . Com (a -> a) rather than Com (forall a . a -> a) and `eval' type checks ... Cheers, Ralf
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | GADTs: malformed constructor signature, Ralf Hinze |
|---|---|
| Next by Date: | RE: GADTs: malformed constructor signature, Simon Peyton-Jones |
| Previous by Thread: | GADTs: malformed constructor signature, Ralf Hinze |
| Next by Thread: | [ ghc-Bugs-1162965 ] Exponential behaviour with type synonyms, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |