Commit c7addbef authored by Simon Marlow's avatar Simon Marlow

FIX: #1253 (Can't use non-layout at top level)

parent 35cb95c2
......@@ -361,10 +361,10 @@ module :: { Located (HsModule RdrName) }
{% fileSrcSpan >>= \ loc -> case $1 of { (opt, info, doc) ->
return (L loc (HsModule (Just $3) $5 (fst $7) (snd $7) $4
opt info doc) )}}
| missing_module_keyword top close
| body2
{% fileSrcSpan >>= \ loc ->
return (L loc (HsModule Nothing Nothing
(fst $2) (snd $2) Nothing Nothing emptyHaddockModInfo
(fst $1) (snd $1) Nothing Nothing emptyHaddockModInfo
Nothing)) }
optdoc :: { (Maybe String, HaddockModInfo RdrName, Maybe (HsDoc RdrName)) }
......@@ -385,6 +385,10 @@ body :: { ([LImportDecl RdrName], [LHsDecl RdrName]) }
: '{' top '}' { $2 }
| vocurly top close { $2 }
body2 :: { ([LImportDecl RdrName], [LHsDecl RdrName]) }
: '{' top '}' { $2 }
| missing_module_keyword top close { $2 }
top :: { ([LImportDecl RdrName], [LHsDecl RdrName]) }
: importdecls { (reverse $1,[]) }
| importdecls ';' cvtopdecls { (reverse $1,$3) }
......
Markdown is supported
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