diff options
| author | krasimir <krasimir@chalmers.se> | 2010-06-09 10:21:13 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-06-09 10:21:13 +0000 |
| commit | 4e35f7e5ecfebb2503a516c84e4b7d932731a94d (patch) | |
| tree | dbcf3994493b195756301ac3f6e59d1cb52bde35 /src/runtime/haskell | |
| parent | 2ca3b57ecf0fbc62ee3759798e27cb1fa7c5028a (diff) | |
filter the duplications when doing 'l -table'
Diffstat (limited to 'src/runtime/haskell')
| -rw-r--r-- | src/runtime/haskell/PGF/Linearize.hs | 2 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/Macros.hs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Linearize.hs b/src/runtime/haskell/PGF/Linearize.hs index 79da0e823..84b1b116f 100644 --- a/src/runtime/haskell/PGF/Linearize.hs +++ b/src/runtime/haskell/PGF/Linearize.hs @@ -63,7 +63,7 @@ type CncType = (CId, FId) -- concrete type is the abstract type (the category linTree :: PGF -> Language -> Expr -> [Array LIndex BracketedTokn] linTree pgf lang e = - [amapWithIndex (\label -> Bracket_ cat fid label [e]) lin | (_,((cat,fid),e,lin)) <- lin0 [] [] Nothing 0 e e] + nub [amapWithIndex (\label -> Bracket_ cat fid label [e]) lin | (_,((cat,fid),e,lin)) <- lin0 [] [] Nothing 0 e e] where cnc = lookMap (error "no lang") lang (concretes pgf) lp = lproductions cnc diff --git a/src/runtime/haskell/PGF/Macros.hs b/src/runtime/haskell/PGF/Macros.hs index 328bf369d..dea535af7 100644 --- a/src/runtime/haskell/PGF/Macros.hs +++ b/src/runtime/haskell/PGF/Macros.hs @@ -229,6 +229,7 @@ data BracketedTokn = LeafKS [String] | LeafKP [String] [Alternative] | Bracket_ CId {-# UNPACK #-} !FId {-# UNPACK #-} !LIndex [Expr] [BracketedTokn] -- Invariant: the list is not empty + deriving Eq type LinTable = Array.Array LIndex [BracketedTokn] |
