X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmParse.y;h=8c2498e5f8a9343af9102da7ca8ed955c3a28a8c;hb=b20d5a36b35cf8260554259dc3887a90171c6495;hp=33a4b809d81e863bd336eea30421d23f7d5e240c;hpb=83d563cb9ede0ba792836e529b1e2929db926355;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index 33a4b80..8c2498e 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -11,15 +11,8 @@ -- TODO: Add support for interruptible/uninterruptible foreign call specification { -{-# OPTIONS -Wwarn -w -XNoMonomorphismRestriction #-} --- The NoMonomorphismRestriction deals with a Happy infelicity --- With OutsideIn's more conservativ monomorphism restriction --- we aren't generalising --- notHappyAtAll = error "urk" --- which is terrible. Switching off the restriction allows --- the generalisation. Better would be to make Happy generate --- an appropriate signature. --- +{-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6 +{-# OPTIONS -Wwarn -w #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See @@ -44,8 +37,8 @@ import CgClosure import CostCentre import BlockId -import Cmm -import PprCmm +import OldCmm +import OldPprCmm() import CmmUtils import CmmLex import CLabel @@ -411,7 +404,7 @@ stmt :: { ExtCode } | 'return' maybe_actuals ';' { do e <- sequence $2; stmtEC (CmmReturn e) } | 'if' bool_expr '{' body '}' else - { ifThenElse $2 $4 $6 } + { cmmIfThenElse $2 $4 $6 } opt_never_returns :: { CmmReturnInfo } : { CmmMayReturn } @@ -947,7 +940,7 @@ data BoolExpr -- ToDo: smart constructors which simplify the boolean expression. -ifThenElse cond then_part else_part = do +cmmIfThenElse cond then_part else_part = do then_id <- code newLabelC join_id <- code newLabelC c <- cond