Fix Trac #3155: better error message when -XRankNTypes is omitted
authorsimonpj@microsoft.com <unknown>
Thu, 9 Apr 2009 14:40:04 +0000 (14:40 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 9 Apr 2009 14:40:04 +0000 (14:40 +0000)
commit6c06fdc7ad20682f0f52b5a78e5e3487a2ed047b
tree0374328ec7816d5669311b1740381617f7709ed7
parentf0c99958649b8909612b1b9c9b48aad970dfce05
Fix Trac #3155: better error message when -XRankNTypes is omitted

This patch sligtly re-adjusts the way in which the syntax of types
is handled:

 * In the lexer, '.' and '*' are always accepted in types
   (previously it was conditional).  This things can't mean
   anything else in H98, which is the only reason for doing things
   conditionally in the lexer.

 * As a result '.' in types is never treated as an operator.
   Instead, lacking a 'forall' keyword, it turns into a plain parse error.

 * Test for -XKindSignatures in the renamer when processing
     a) type variable bindings
     b) types with sigs (ty :: kind-sig)

 * Make -XKindSignatures be implied by -XTypeFamilies
   Previously this was buried in the conditonal lexing of '*'
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/parser/RdrHsSyn.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnTypes.lhs