[Haskell-cafe] LiberalTypeSynonyms: documentation issue
obscaenvs at gmail.com
Sat Nov 2 18:29:54 UTC 2013
In the docs for GHC 7.6.3, e.g. at , it is said that one can use
LiberalTypeSynonyms as so:
`type Discard a = forall b. Show b => a -> b -> (a, String)`
This is, however, not possible without RankNTypes which is stated in a
tutorial at FPComplete  and, of course, GHC 7.6.3 itself says so when
trying to compile something with the above definition for Discard:
Illegal polymorphic or qualified type:
forall b. Show b => a -> b -> (a, String)
Perhaps you intended to use -XRankNTypes or -XRank2Types
In the type declaration for `Discard'
Maybe the GHC User Guide should be updated to reflect this?
More information about the Haskell-Cafe