1
0
forked from GitHub/gf-core

filter the duplications when doing 'l -table'

This commit is contained in:
krasimir
2010-06-09 10:21:13 +00:00
parent a5da087159
commit 9baef5e291
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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]