Commit 197a5ee7 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-04-05 11:54:37 by simonpj]

Make type synonyms work right in H98
parent 06776c85
{-
-----------------------------------------------------------------------------
$Id: Parser.y,v 1.55 2001/02/26 15:06:59 simonmar Exp $
$Id: Parser.y,v 1.56 2001/04/05 11:54:37 simonpj Exp $
Haskell grammar.
......@@ -328,7 +328,11 @@ topdecls :: { [RdrBinding] }
| topdecl { [$1] }
topdecl :: { RdrBinding }
: srcloc 'type' simpletype '=' sigtype
: srcloc 'type' simpletype '=' ctype
-- Note ctype, not sigtype.
-- We allow an explicit for-all but we don't insert one
-- in type Foo a = (b,b)
-- Instead we just say b is out of scope
{ RdrHsDecl (TyClD (TySynonym (fst $3) (snd $3) $5 $1)) }
| srcloc 'data' ctype '=' constrs deriving
......
......@@ -315,7 +315,7 @@ rnTyClDecl (TySynonym {tcdName = name, tcdTyVars = tyvars, tcdSynRhs = ty, tcdLo
-- Silently discard context... but the tyvars in the rest won't be in scope
-- In interface files all types are quantified, so this is a no-op
unquantify glaExts (HsForAllTy Nothing ctxt ty) | glaExts = ty
unquantify glaExys ty = ty
unquantify glaExts ty = ty
rnTyClDecl (ClassDecl {tcdCtxt = context, tcdName = cname,
tcdTyVars = tyvars, tcdFDs = fds, tcdSigs = sigs,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment