projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
35cb95c
)
FIX: #1253 (Can't use non-layout at top level)
author
Simon Marlow
<simonmar@microsoft.com>
Mon, 7 May 2007 13:25:14 +0000
(13:25 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Mon, 7 May 2007 13:25:14 +0000
(13:25 +0000)
compiler/parser/Parser.y.pp
patch
|
blob
|
history
diff --git
a/compiler/parser/Parser.y.pp
b/compiler/parser/Parser.y.pp
index
abfc258
..
9ad9518
100644
(file)
--- a/
compiler/parser/Parser.y.pp
+++ b/
compiler/parser/Parser.y.pp
@@
-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) )}}
{% 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
{% 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)) }
Nothing)) }
optdoc :: { (Maybe String, HaddockModInfo RdrName, Maybe (HsDoc RdrName)) }
@@
-385,6
+385,10
@@
body :: { ([LImportDecl RdrName], [LHsDecl RdrName]) }
: '{' top '}' { $2 }
| vocurly top close { $2 }
: '{' 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) }
top :: { ([LImportDecl RdrName], [LHsDecl RdrName]) }
: importdecls { (reverse $1,[]) }
| importdecls ';' cvtopdecls { (reverse $1,$3) }