projects
/
cubicaltt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bda2647
)
Use checkPath when checking IdP
author
Anders Mörtberg
<mortberg@chalmers.se>
Thu, 19 Mar 2015 07:58:26 +0000
(08:58 +0100)
committer
Anders Mörtberg
<mortberg@chalmers.se>
Thu, 19 Mar 2015 07:58:26 +0000
(08:58 +0100)
TypeChecker.hs
patch
|
blob
|
blame
|
history
diff --git
a/TypeChecker.hs
b/TypeChecker.hs
index 1a337987ad2d0899e6d7b8e5032ea56331c38f82..473657d4fe0887675152a744b2f9627df8dfb189 100644
(file)
--- a/
TypeChecker.hs
+++ b/
TypeChecker.hs
@@
-154,13
+154,10
@@
check a t = case (a,t) of
local (addDecls d) $ check a e
\r
(_,Undef _) -> return ()
\r
(VU,IdP a e0 e1) -> case a of
\r
- Path i b -> do
\r
- rho <- asks env
\r
- when (i `elem` support rho)
\r
- (throwError (show i ++ " is already declared"))
\r
- local (addSub (i,Atom i)) $ check VU b
\r
- check (eval (Sub rho (i,Dir 0)) b) e0
\r
- check (eval (Sub rho (i,Dir 1)) b) e1
\r
+ Path{} -> do
\r
+ (b0,b1) <- checkPath a
\r
+ check b0 e0
\r
+ check b1 e1
\r
_ -> do
\r
b <- infer a
\r
case b of
\r