projects
/
cubicaltt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c931386
)
Test for correct length in checks (Fixes #27)
author
Simon Huber
<hubsim@gmail.com>
Wed, 10 Feb 2016 20:31:41 +0000
(21:31 +0100)
committer
Simon Huber
<hubsim@gmail.com>
Wed, 10 Feb 2016 20:31:41 +0000
(21:31 +0100)
TypeChecker.hs
patch
|
blob
|
blame
|
history
diff --git
a/TypeChecker.hs
b/TypeChecker.hs
index 29bdad6b946d84b9a7391f18adb5baae380199e7..3b22d2c9390dc391d3cc19834984c3b1b0de96fd 100644
(file)
--- a/
TypeChecker.hs
+++ b/
TypeChecker.hs
@@
-405,12
+405,13
@@
checkPathSystem t0 va ps = do
return v
\r
\r
checks :: (Tele,Env) -> [Ter] -> Typing ()
\r
-checks
_
[] = return ()
\r
+checks
([],_)
[] = return ()
\r
checks ((x,a):xas,nu) (e:es) = do
\r
check (eval nu a) e
\r
v' <- evalTyping e
\r
checks (xas,upd (x,v') nu) es
\r
-checks _ _ = throwError "checks"
\r
+checks _ _ =
\r
+ throwError "checks: incorrect number of arguments"
\r
\r
-- infer the type of e
\r
infer :: Ter -> Typing Val
\r