diff options
| author | aarne <aarne@chalmers.se> | 2010-12-14 14:36:05 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-12-14 14:36:05 +0000 |
| commit | e7fbe756a3135afd39a1a89aee7b6549b70cc6f2 (patch) | |
| tree | 91dfb5971eddaef29cfb8aca91c6c7c93799e20f /src/runtime/haskell/PGF/Tree.hs | |
| parent | a8a3c62f6015b8378f9ed94f4839b9629ecca26b (diff) | |
work-around in Tree.expr2tree to make Paraphrase work
Diffstat (limited to 'src/runtime/haskell/PGF/Tree.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Tree.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Tree.hs b/src/runtime/haskell/PGF/Tree.hs index cb2052cd7..62680e29e 100644 --- a/src/runtime/haskell/PGF/Tree.hs +++ b/src/runtime/haskell/PGF/Tree.hs @@ -61,7 +61,8 @@ expr2tree e = abs [] [] e | List.null as = Meta n | otherwise = error "meta variables of function type are not allowed in trees" app xs as (EAbs _ x e) = error "beta redexes are not allowed in trees" - app xs as (EVar i) = Var (xs !! i) + app xs as (EVar i) = if length xs > i then Var (xs !! i) else Meta i + ---- AR 14/12/2010: work-around needed in PGF.Paraphrase.fromDef app xs as (EFun f) = Fun f as app xs as (ETyped e _) = app xs as e |
