diff options
author | David Terei <davidterei@gmail.com> | 2011-04-25 12:14:21 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-06-17 18:19:48 -0700 |
commit | 6de1b0f2f4fe0455df72adb7b43449586b40ba89 (patch) | |
tree | f8ef6e2b5348103132fbe0a1d419947b0cc90792 /compiler/parser/Parser.y.pp | |
parent | f8279ea9fef8c16782a3cd5bc81cf90de3e46cb5 (diff) | |
download | haskell-6de1b0f2f4fe0455df72adb7b43449586b40ba89.tar.gz |
SafeHaskell: Add safe import flag (not functional)
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r-- | compiler/parser/Parser.y.pp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 1ad519b116..bb82aaa2d1 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -500,13 +500,17 @@ importdecls :: { [LImportDecl RdrName] } | {- empty -} { [] } importdecl :: { LImportDecl RdrName } - : 'import' maybe_src optqualified maybe_pkg modid maybeas maybeimpspec - { L (comb4 $1 $5 $6 $7) (ImportDecl $5 $4 $2 $3 (unLoc $6) (unLoc $7)) } + : 'import' maybe_src maybe_safe optqualified maybe_pkg modid maybeas maybeimpspec + { L (comb4 $1 $6 $7 $8) (ImportDecl $6 $5 $2 $3 $4 (unLoc $7) (unLoc $8)) } maybe_src :: { IsBootInterface } : '{-# SOURCE' '#-}' { True } | {- empty -} { False } +maybe_safe :: { Bool } + : 'safe' { True } + | {- empty -} { False } + maybe_pkg :: { Maybe FastString } : STRING { Just (getSTRING $1) } | {- empty -} { Nothing } |