Commit 6bcddb86 authored by bbr's avatar bbr
Browse files

no tracing needed

parent e6b8a949
......@@ -4,7 +4,7 @@ import Store
import Data.IORef
import System.IO.Unsafe
trace' s x = unsafePerformIO (putStrLn s >> return x)
--trace' s x = unsafePerformIO (putStrLn s >> return x)
-- On the top level io monad of each program we manage a store.
-- Because there is unsafe io and because some operations on
......
......@@ -138,7 +138,6 @@ instance Show StoreResult where
changeStore :: OrRef -> Store -> StoreResult
changeStore r st =
trace (show (r,st)) $ trace' $
case uncover r of
OrRef k r -> let (toEntry,mima) = minMax k in
access toEntry (mima >>= \ (i,j) -> Just (i,j,r)) r st
......@@ -196,12 +195,10 @@ access toEntry mima key st@(Store store) = case lookup key store of
Just (Binding bmin bmax i) -> case mima of
Nothing -> Found i
Just (amin,amax,key0) -> case compare amin bmin of
EQ -> trace "EQ" Found i
_ -> trace "LT" $ let info = Equality amin amax key0 bmin bmax key in
EQ -> Found i
_ -> let info = Equality amin amax key0 bmin bmax key in
maybe Inconsistent (FoundAndNewInfo i info) $
foldChain [amin .. amax] [bmin .. bmax] st
--GT -> error "order violated"
foldChain [amin .. amax] [bmin .. bmax] st
storeSize :: Store -> Int
......
......@@ -342,7 +342,7 @@ getSearchTree x _ = C_IO (\ state -> Prelude.return (IOVal (searchTr x state)))
searchTr :: Curry a => a -> Result (C_SearchTree a)
searchTr x state = transVal (nfCTC (nfCTC (\ x st -> trace ('s':show st) x)) x state)
searchTr x state = transVal (nfCTC (nfCTC const) x state)
where
transVal x = case consKind x of
Val -> C_Value x
......
......@@ -562,25 +562,24 @@ genStrEq a b = (\ a' -> (onceMore a') `hnfCTC` b) `hnfCTC` a
onceMore a' b' = (\ a'' -> unify a'' b') `hnfCTC` a'
unify x y st = checkFree (consKind x) (consKind y)
where
checkFree Val Val = trace "e" strEq x y st
checkFree Val Val = strEq x y st
checkFree Branching Branching
| drx Prelude.== dry
= trace "f" C_True
| otherwise = trace "g"
branching (equalFromTo ax bx drx ay by dry) [C_True]
= C_True
| otherwise = branching (equalFromTo ax bx drx ay by dry) [C_True]
where (ax,bx,drx)=genInfo (orRef x)
(ay,by,dry)=genInfo (orRef y)
checkFree Branching _ = trace ("h "++show (orRef x,branches x)++take 1 (show y))
checkFree Branching _ =
hnfCTC (\ x' -> unify x' y)
(branching (narrowOrRef (orRef x)) (branches x)) st
checkFree _ Branching = trace "i"
checkFree _ Branching =
hnfCTC (unify x)
(branching (narrowOrRef (orRef y)) (branches y)) st
checkFree x y = trace "j" error $ "checkFree " ++ show (x,y)
checkFree x y = error $ "checkFree " ++ show (x,y)
strEqFail :: String -> StrEqResult
strEqFail s = C_False --C_SuccessFail (ErrorCall ("(=:=) for type "++s))
......
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