diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-20 13:47:08 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-20 13:47:08 +0000 |
| commit | 96786c1136332efa9a889227c524ef8fe4e47fe8 (patch) | |
| tree | de85af15a057c7b5d07b5dc618e5e7ba0844df84 /src/GF/Compile/AbsCompute.hs | |
| parent | a29a8e4f60960122874c737d32e9d41a3575208b (diff) | |
syntax for implicit arguments in GF
Diffstat (limited to 'src/GF/Compile/AbsCompute.hs')
| -rw-r--r-- | src/GF/Compile/AbsCompute.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GF/Compile/AbsCompute.hs b/src/GF/Compile/AbsCompute.hs index 48499eb74..3f4c6d061 100644 --- a/src/GF/Compile/AbsCompute.hs +++ b/src/GF/Compile/AbsCompute.hs @@ -53,7 +53,7 @@ computeAbsTermIn lookd xs e = errIn (render (text "computing" <+> ppTerm Unquali _ -> do let t' = beta vv t (yy,f,aa) <- termForm t' - let vv' = yy ++ vv + let vv' = map snd yy ++ vv aa' <- mapM (compt vv') aa case look f of Just eqs -> tracd (text "\nmatching" <+> ppTerm Unqualified 0 f) $ @@ -84,10 +84,10 @@ beta vv c = case c of App f a -> let (a',f') = (beta vv a, beta vv f) in case f' of - Abs x b -> beta vv $ substTerm vv [(x,a')] (beta (x:vv) b) + Abs _ x b -> beta vv $ substTerm vv [(x,a')] (beta (x:vv) b) _ -> (if a'==a && f'==f then id else beta vv) $ App f' a' - Prod x a b -> Prod x (beta vv a) (beta (x:vv) b) - Abs x b -> Abs x (beta (x:vv) b) + Prod b x a t -> Prod b x (beta vv a) (beta (x:vv) t) + Abs b x t -> Abs b x (beta (x:vv) t) _ -> c -- special version of pattern matching, to deal with comp under lambda @@ -133,7 +133,7 @@ tryMatch (p,t) = do notMeta e = case e of Meta _ -> False App f a -> notMeta f && notMeta a - Abs _ b -> notMeta b + Abs _ _ b -> notMeta b _ -> True prtm p g = |
