diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-17 13:09:22 +0100 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-17 13:09:22 +0100 |
| commit | b0db9308017fc14b600b3a85d9c55a037f12ee9e (patch) | |
| tree | b51b0b9d26b328b5e14e9d4d681219483f9c9b1f /compiler/parser/Parser.y.pp | |
| parent | 633dd5589f8625a8771ac75c5341ea225301d882 (diff) | |
| parent | 8c3b9aca3aaf946a91c9af6c07fc9d2afb6bbb76 (diff) | |
| download | haskell-b0db9308017fc14b600b3a85d9c55a037f12ee9e.tar.gz | |
Merge remote-tracking branch 'origin/master' into tc-untouchables
Conflicts:
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcSMonad.lhs
Diffstat (limited to 'compiler/parser/Parser.y.pp')
| -rw-r--r-- | compiler/parser/Parser.y.pp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 410f95bebf..718adcabfd 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -24,6 +24,16 @@ to inline certain key external functions, so we instruct GHC not to throw away inlinings as it would normally do in -O0 mode. -} +-- CPP tricks because we want the directives in the output of the +-- first CPP pass. +#define __IF_GHC_77__ #if __GLASGOW_HASKELL__ >= 707 +#define __ENDIF__ #endif +__IF_GHC_77__ +-- Required on x86 to avoid the register allocator running out of +-- stack slots when compiling this module with -fPIC -dynamic. +{-# OPTIONS_GHC -fcmm-sink #-} +__ENDIF__ + module Parser ( parseModule, parseStmt, parseIdentifier, parseType, parseHeader ) where @@ -43,7 +53,6 @@ import OccName ( varName, dataName, tcClsName, tvName ) import DataCon ( DataCon, dataConName ) import SrcLoc import Module -import StaticFlags ( opt_Hpc ) import Kind ( Kind, liftedTypeKind, unliftedTypeKind, mkArrowKind ) import Class ( FunDep ) import BasicTypes @@ -1406,9 +1415,10 @@ exp10 :: { LHsExpr RdrName } ; return $ LL $ if on then HsSCC (unLoc $1) $2 else HsPar $2 } } - | hpc_annot exp { LL $ if opt_Hpc - then HsTickPragma (unLoc $1) $2 - else HsPar $2 } + | hpc_annot exp {% do { on <- extension hpcEnabled + ; return $ LL $ if on + then HsTickPragma (unLoc $1) $2 + else HsPar $2 } } | 'proc' aexp '->' exp {% checkPattern $2 >>= \ p -> |
