X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FDsGRHSs.lhs;fp=compiler%2FdeSugar%2FDsGRHSs.lhs;h=70a37244846cb55c4787ff0b024cb203712aca4b;hp=db5cc0cf8d8295c6984d738d9601b1cbe91b7470;hb=6c7b41cc2b24f533697a62bf1843507ae043fc97;hpb=80ef1f06253f1a20a63816c295e180e47cd9a347 diff --git a/compiler/deSugar/DsGRHSs.lhs b/compiler/deSugar/DsGRHSs.lhs index db5cc0c..70a3724 100644 --- a/compiler/deSugar/DsGRHSs.lhs +++ b/compiler/deSugar/DsGRHSs.lhs @@ -33,8 +33,6 @@ import PrelNames import Name import SrcLoc -import Control.Monad ((>=>)) - \end{code} @dsGuarded@ is used for both @case@ expressions and pattern bindings. @@ -142,11 +140,11 @@ isTrueLHsExpr (L _ (HsVar v)) | v `hasKey` otherwiseIdKey = Just return -- trueDataConId doesn't have the same unique as trueDataCon isTrueLHsExpr (L loc (HsTick ix frees e)) - | Just ticks <- isTrueLHsExpr e = Just (ticks >=> mkTickBox ix frees) + | Just ticks <- isTrueLHsExpr e = Just (\x -> ticks x >>= mkTickBox ix frees) -- This encodes that the result is constant True for Hpc tick purposes; -- which is specifically what isTrueLHsExpr is trying to find out. isTrueLHsExpr (L loc (HsBinTick ixT _ e)) - | Just ticks <- isTrueLHsExpr e = Just (ticks >=> mkTickBox ixT []) + | Just ticks <- isTrueLHsExpr e = Just (\x -> ticks x >>= mkTickBox ixT []) isTrueLHsExpr (L _ (HsPar e)) = isTrueLHsExpr e isTrueLHsExpr other = Nothing \end{code}