• simonpj's avatar
    [project @ 2002-02-11 09:27:21 by simonpj] · 2dd1686b
    simonpj authored
    		Towards kinded data type decls
    Move towards being able to have 'kinded' data type decls.
    The burden of this commit, though, is to tidy up the parsing
    of data type decls.  Previously we had
    	data ctype '=' constrs
    where the 'ctype' is a completetely general polymorphic type.
    	forall a. (Eq a) => T a
    Then a separate function checked that it was of a suitably restricted
    form.  The reason for this is the usual thing --- it's hard to tell
    when looking at
    	data Eq a => T a = ...
    whether you are reading the data type or the context when you have
    only got as far as 'Eq a'.
    However, the 'ctype' trick doesn't work if we want to allow
    	data T (a :: * -> *) = ...
    So we have to parse the data type decl in a more serious way.
    That's what this commit does, and it makes the grammar look much nicer.
    The main new producion is tycl_hdr.