Skip to content

Commit

Permalink
update local var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurisu.Ti.Na committed Sep 23, 2016
1 parent 89560f8 commit cdc38f2
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/CallByName/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ evalCallExpr ratorExpr randExprs env = do
recOpVal exprs env tryRef = (:) <$> tryRef <*> valueOfOperands exprs env
unpackProc :: ExpressedValue -> StatedTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $
unpackProc notProc = throwError $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
safeZip :: [a] -> [b] -> StatedTry [(a, b)]
safeZip [] [] = return []
safeZip (_:_) [] = throwError "Not enough arguments!"
Expand Down
4 changes: 2 additions & 2 deletions src/CallByNeed/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ evalCallExpr ratorExpr randExprs env = do
recOpVal exprs env tryRef = (:) <$> tryRef <*> valueOfOperands exprs env
unpackProc :: ExpressedValue -> StatedTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $
unpackProc notProc = throwError $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
safeZip :: [a] -> [b] -> StatedTry [(a, b)]
safeZip [] [] = return []
safeZip (_:_) [] = throwError "Not enough arguments!"
Expand Down
4 changes: 2 additions & 2 deletions src/CallByReference/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ evalCallExpr ratorExpr randExprs env = do
(ref:) <$> valueOfOperands exprs env
unpackProc :: ExpressedValue -> StatedTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $
unpackProc notProc = throwError $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
safeZip :: [a] -> [b] -> StatedTry [(a, b)]
safeZip [] [] = return []
safeZip (_:_) [] = throwError "Not enough arguments!"
Expand Down
4 changes: 2 additions & 2 deletions src/ExplicitRefs/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ evalCallExpr ratorExpr randExprs env = do
where
unpackProc :: ExpressedValue -> StatedTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $
unpackProc notProc = throwError $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
safeZip :: [a] -> [b] -> StatedTry [(a, b)]
safeZip [] [] = return []
safeZip (_:_) [] = throwError "Not enough arguments!"
Expand Down
2 changes: 1 addition & 1 deletion src/ImplicitRefs/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ unpackExprRef notRef = throwError $ TypeMismatch "reference" notRef

unpackProc :: ExpressedValue -> IOTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $ TypeMismatch "procedure" noProc
unpackProc notProc = throwError $ TypeMismatch "procedure" notProc

getExprRef :: String -> Environment -> Store -> IOTry Ref
getExprRef name env store = do
Expand Down
2 changes: 1 addition & 1 deletion src/ImplicitRefsCont/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ unpackExprRef notRef = throwError $ TypeMismatch "reference" notRef

unpackProc :: ExpressedValue -> IOTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $ TypeMismatch "procedure" noProc
unpackProc notProc = throwError $ TypeMismatch "procedure" notProc

evalConstExpr :: ExpressedValue -> Store -> Continuation -> EvaluateResult
evalConstExpr val store cont = applyCont store cont val
Expand Down
4 changes: 2 additions & 2 deletions src/LetRecLang/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ evalCallExpr rator rand env = do
where
unpackProc :: ExpressedValue -> Try Procedure
unpackProc (ExprProc proc) = Right proc
unpackProc noProc = Left $
unpackProc notProc = Left $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
func :: Try [ExpressedValue] -> Try ExpressedValue -> Try [ExpressedValue]
func maybeArgs maybeArg = do
args <- maybeArgs
Expand Down
4 changes: 2 additions & 2 deletions src/MutablePairs/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ evalCallExpr ratorExpr randExprs env = do
where
unpackProc :: ExpressedValue -> StatedTry Procedure
unpackProc (ExprProc proc) = return proc
unpackProc noProc = throwError $
unpackProc notProc = throwError $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
safeZip :: [a] -> [b] -> StatedTry [(a, b)]
safeZip [] [] = return []
safeZip (_:_) [] = throwError "Not enough arguments!"
Expand Down
4 changes: 2 additions & 2 deletions src/NamelessIntp/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ evalCallExpr rator rand env = do
applyProcedure proc randVal
where
unpackProc (ExprProc proc) = Right proc
unpackProc noProc = Left $
unpackProc notProc = Left $
"Operator of call expression should be procedure, "
`mappend` "but got: " `mappend` show noProc
`mappend` "but got: " `mappend` show notProc
applyProcedure (NamelessProcedure body savedEnv) rand =
valueOf body (extend rand savedEnv)

Expand Down
4 changes: 2 additions & 2 deletions src/ProcLang/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ evalCallExpr rator rand env = do
where
unpackProc :: ExpressedValue -> Try Procedure
unpackProc (ExprProc proc) = Right proc
unpackProc noProc = Left $
unpackProc notProc = Left $
"Operator of call expression should be procedure, but got: "
`mappend` show noProc
`mappend` show notProc
func :: Try [ExpressedValue] -> Try ExpressedValue -> Try [ExpressedValue]
func maybeArgs maybeArg = do
args <- maybeArgs
Expand Down

0 comments on commit cdc38f2

Please sign in to comment.