Commit d9e9cee0 authored by Michal Terepeta's avatar Michal Terepeta

Fix all warnings in testing/

parent b927cacf
......@@ -51,8 +51,8 @@ instance Show Control where
show (Branch lbl) = ind $ "goto " ++ lbl
show (Cond e t f) =
ind $ "if " ++ show e ++ " then goto " ++ t ++ " else goto " ++ f
show (Call ress f cargs succ) =
ind $ tuple ress ++ " = " ++ f ++ tuple (map show cargs) ++ " goto " ++ succ
show (Call ress f cargs successor) =
ind $ tuple ress ++ " = " ++ f ++ tuple (map show cargs) ++ " goto " ++ successor
show (Return rargs) = ind $ "ret " ++ tuple (map show rargs)
ind :: String -> String
......
......@@ -3,7 +3,7 @@
module Eval (evalProg, ErrorM) where
import Control.Monad.Error
import Control.Monad.Except
import qualified Data.Map as M
import Prelude hiding (succ)
......
......@@ -6,7 +6,7 @@ module EvalMonad (ErrorM, VarEnv, B, State,
get_var, set_var, get_heap, set_heap,
Event (..), event) where
import Control.Monad.Error
import Control.Monad.Except
import qualified Data.Map as M
import Prelude hiding (succ)
......@@ -23,9 +23,6 @@ import IR
type ErrorM = Either String
type InnerErrorM v = Either (State v, String)
instance Error (State v, String) where
noMsg = (undefined, "")
strMsg str = (undefined, str)
data EvalM v a = EvalM (State v -> InnerErrorM v (State v, a))
......
......@@ -50,7 +50,7 @@ fromBlock blk = foldBlockNodesF3 (fromIrInstCO, fromIrInstOO, fromIrInstOC) blk
fromIrInstCO :: I.Insn C O -> () -> Rm (A.Lbl, [A.Insn])
fromIrInstCO inst p = case inst of
fromIrInstCO inst _ = case inst of
I.Label l -> strLabelFor l >>= \x -> return (x, [])
......
......@@ -3,7 +3,7 @@
module Test (parseTest, evalTest, optTest) where
import Compiler.Hoopl
import Control.Monad.Error
import Control.Monad.Except
import System.Exit
import qualified Ast as A
......
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