Fixed some uses of Map.lookup that used the old system of it working with any monad (in GHC 6.10, it's always Maybe)
This commit is contained in:
parent
ee62c604fc
commit
b48129d4e5
|
@ -151,7 +151,9 @@ flowAlgorithm funcs nodes (startNode, startVal)
|
|||
"Nodes still to process: " ++ show workList
|
||||
++ " " ++ userErrLabel funcs node)
|
||||
(filtNodes $ nodesToProcess funcs node)
|
||||
nodeVal <- Map.lookup node vals
|
||||
nodeVal <- case Map.lookup node vals of
|
||||
Nothing -> throwError "Could not find node during flowAlgorithm"
|
||||
Just x -> return x
|
||||
if total /= nodeVal
|
||||
-- If the value has changed, that will cascade to affect all
|
||||
-- its dependents, so add all
|
||||
|
|
|
@ -380,7 +380,9 @@ pullUp pullUpArraysInsideRecords = pass "Pull up definitions"
|
|||
ets <- sequence [astTypeOf e | e <- es']
|
||||
|
||||
ps <- get
|
||||
rts <- Map.lookup (A.nameName n) (csFunctionReturns ps)
|
||||
rts <- case Map.lookup (A.nameName n) (csFunctionReturns ps) of
|
||||
Nothing -> dieP m "Could not find function returns"
|
||||
Just x -> return x
|
||||
specs <- sequence [makeNonceVariable "return_actual" m t A.Original | t <- rts]
|
||||
sequence_ [addPulled $ (m, Left spec) | spec <- specs]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user