diff options
| author | krasimir <krasimir@chalmers.se> | 2011-01-08 12:55:50 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2011-01-08 12:55:50 +0000 |
| commit | d465292fde4058f72da43e077700f956bc21edc6 (patch) | |
| tree | c8a5cee61db9b9652b183626436e97785a27ea42 /src/runtime/haskell | |
| parent | a985ea56efb7b2e8154456a2820da26fe14049e9 (diff) | |
bugfix in the handling of implicit arguments in the typechecker
Diffstat (limited to 'src/runtime/haskell')
| -rw-r--r-- | src/runtime/haskell/PGF/TypeCheck.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/haskell/PGF/TypeCheck.hs b/src/runtime/haskell/PGF/TypeCheck.hs index d68e9cf40..bc8304a2b 100644 --- a/src/runtime/haskell/PGF/TypeCheck.hs +++ b/src/runtime/haskell/PGF/TypeCheck.hs @@ -351,6 +351,7 @@ tcExpr scope (EMeta _) tty = do return (EMeta i) tcExpr scope e0 tty = do (e0,tty0) <- infExpr scope e0 + (e0,tty0) <- appImplArg scope e0 tty0 i <- newGuardedMeta e0 eqType scope (scopeSize scope) i tty tty0 return (EMeta i) @@ -424,6 +425,14 @@ tcArg scope e1 e2 delta ty0@(DTyp ((Implicit,x,ty):hs) c es) = do then tcArg scope (EApp e1 (EImplArg (EMeta i))) e2 delta (DTyp hs c es) else tcArg scope (EApp e1 (EImplArg (EMeta i))) e2 (VMeta i (scopeEnv scope) [] : delta) (DTyp hs c es) +appImplArg scope e (TTyp delta (DTyp ((Implicit,x,ty1):hypos) cat es)) = do + i <- newMeta scope (TTyp delta ty1) + let delta' = if x == wildCId + then delta + else VMeta i (scopeEnv scope) [] : delta + appImplArg scope (EApp e (EImplArg (EMeta i))) (TTyp delta' (DTyp hypos cat es)) +appImplArg scope e tty = return (e,tty) + ----------------------------------------------------- -- eqType ----------------------------------------------------- |
