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/Paraphrase.hs | |
| parent | a8a3c62f6015b8378f9ed94f4839b9629ecca26b (diff) | |
work-around in Tree.expr2tree to make Paraphrase work
Diffstat (limited to 'src/runtime/haskell/PGF/Paraphrase.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Paraphrase.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/haskell/PGF/Paraphrase.hs b/src/runtime/haskell/PGF/Paraphrase.hs index 8213518ff..92e3d12ce 100644 --- a/src/runtime/haskell/PGF/Paraphrase.hs +++ b/src/runtime/haskell/PGF/Paraphrase.hs @@ -24,7 +24,7 @@ import qualified Data.Map as Map import Debug.Trace ---- paraphrase :: PGF -> Expr -> [Expr] -paraphrase pgf = nub . paraphraseN 2 pgf +paraphrase pgf t = nub (paraphraseN 2 pgf t) paraphraseN :: Int -> PGF -> Expr -> [Expr] paraphraseN i pgf = map tree2expr . paraphraseN' i pgf . expr2tree @@ -53,8 +53,9 @@ fromDef pgf t@(Fun f ts) = defDown t ++ defUp t where isClosed d || (length equs == 1 && isLinear d)] equss = [(f,[(Fun f (map patt2tree ps), expr2tree d) | (Equ ps d) <- eqs]) | - (f,(_,_,Just eqs,_)) <- Map.assocs (funs (abstract pgf)), not (null eqs)] - + (f,(_,_,Just eqs,_)) <- Map.assocs (funs (abstract pgf)), not (null eqs)] + ---- AR 14/12/2010: (expr2tree d) fails unless we send the variable list from ps in eqs; + ---- cf. PGF.Tree.expr2tree trequ s f e = True ----trace (s ++ ": " ++ show f ++ " " ++ show e) True subst :: Subst -> Tree -> Tree |
