X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FNCGMonad.hs;h=d19cda45f407b8342a2f7929da8ef7c9a74a2451;hb=efbf8ab4eabc1636417b3ea0ca3f5aa227491d9a;hp=a8283ea279738cf3773e00b675384a9f58739fa4;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69;p=ghc-hetmet.git diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs index a8283ea..d19cda4 100644 --- a/compiler/nativeGen/NCGMonad.hs +++ b/compiler/nativeGen/NCGMonad.hs @@ -1,10 +1,3 @@ -{-# OPTIONS -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 --- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings --- for details - -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 1993-2004 @@ -27,7 +20,7 @@ module NCGMonad ( import BlockId import CLabel ( CLabel, mkAsmTempLabel ) -import MachRegs +import Regs import UniqSupply import Unique ( Unique ) import DynFlags @@ -42,6 +35,7 @@ data NatM_State = NatM_State { newtype NatM result = NatM (NatM_State -> (result, NatM_State)) +unNat :: NatM a -> NatM_State -> (a, NatM_State) unNat (NatM a) = a mkNatM_State :: UniqSupply -> Int -> DynFlags -> NatM_State @@ -67,7 +61,7 @@ mapAccumLNat :: (acc -> x -> NatM (acc, y)) -> [x] -> NatM (acc, [y]) -mapAccumLNat f b [] +mapAccumLNat _ b [] = return (b, []) mapAccumLNat f b (x:xs) = do (b__2, x__2) <- f b x