Commit a1a9a9e7 authored by Ning Wang's avatar Ning Wang

1. <*> is included the Prelude of 7.10, it conflicts with Hoopl's def. change...

1. <*> is included the Prelude of 7.10, it conflicts with Hoopl's def.  change the code to use a qualified version. 2. we don't need to see warnings again in test, disable them.
parent 814d4ef3
......@@ -79,7 +79,6 @@ Test-Suite hoopl-test
Type: exitcode-stdio-1.0
Main-Is: Main.hs
Hs-Source-Dirs: testing src
Ghc-Options: -Wall
Build-Depends: base >= 4.3 && < 4.9,
containers >= 0.4 && < 0.6,
parsec >= 3.1.7,
......
......@@ -2,7 +2,9 @@
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables, GADTs, EmptyDataDecls, PatternGuards, TypeFamilies, NamedFieldPuns #-}
module Ast2ir (astToIR, IdLabelMap) where
import Compiler.Hoopl
import Compiler.Hoopl hiding ((<*>))
import qualified Compiler.Hoopl as H ((<*>))
import Control.Monad
import qualified Data.Map as M
......@@ -52,7 +54,7 @@ toBlock (A.Block { A.first = f, A.mids = ms, A.last = l }) =
do f' <- toFirst f
ms' <- mapM toMid ms
l' <- toLast l
return $ mkFirst f' <*> mkMiddles ms' <*> mkLast l'
return $ mkFirst f' H.<*> mkMiddles ms' H.<*> mkLast l'
toFirst :: A.Lbl -> LabelMapM (I.Insn C O)
toFirst = liftM I.Label . labelFor
......
......@@ -18,7 +18,7 @@ import Control.Applicative (Applicative(..))
import Control.Applicative (Applicative(..))
#endif
import Compiler.Hoopl
import Compiler.Hoopl hiding ((<*>))
import IR
type ErrorM = Either String
......
......@@ -14,7 +14,7 @@ import Control.Applicative (Applicative(..))
import Control.Applicative (Applicative(..))
#endif
import Compiler.Hoopl
import Compiler.Hoopl hiding ((<*>))
import IR
----------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment