[Haskell-cafe] LiberalTypeSynonyms: documentation issue

Obscaenvs obscaenvs at gmail.com
Sat Nov 2 18:29:54 UTC 2013

In the docs for GHC 7.6.3, e.g. at [1], 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 [2] 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 mailing list