{- -*-haskell-*-
-----------------------------------------------------------------------------
-$Id: Parser.y,v 1.112 2002/10/24 14:17:50 simonpj Exp $
+$Id: Parser.y,v 1.114 2002/12/10 16:28:48 igloo Exp $
Haskell grammar.
import HsTypes ( mkHsTupCon )
import RdrHsSyn
-import HscTypes ( ParsedIface(..), IsBootInterface )
+import HscTypes ( ParsedIface(..), IsBootInterface, noDependencies )
import Lex
import RdrName
import PrelNames ( mAIN_Name, funTyConName, listTyConName,
pi_vers = 1, -- Module version
pi_orphan = False,
pi_exports = (1,[($2,mkIfaceExports $4)]),
- pi_deps = ([],[]),
+ pi_deps = noDependencies,
pi_usages = [],
pi_fixity = [],
pi_insts = [],
| srcloc '[t|' ctype '|]' { HsBracket (TypBr $3) $1 }
| srcloc '[p|' infixexp '|]' {% checkPattern $1 $3 `thenP` \p ->
returnP (HsBracket (PatBr p) $1) }
- | srcloc '[d|' cvtopdecls '|]' { HsBracket (DecBr (mkGroup $3)) $1 }
+ | srcloc '[d|' cvtopbody '|]' { HsBracket (DecBr (mkGroup $3)) $1 }
+cvtopbody :: { [RdrNameHsDecl] }
+ : '{' cvtopdecls '}' { $2 }
+ | layout_on cvtopdecls close { $2 }
texps :: { [RdrNameHsExpr] }
: texps ',' exp { $3 : $1 }