diff options
| author | aarne <unknown> | 2004-01-05 15:42:38 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-01-05 15:42:38 +0000 |
| commit | 62e8e319f9490613c1d5bd20f25f109bbd0a3f5d (patch) | |
| tree | 15e45f6a5c12ace84388bc4076a3459e195658d0 /src/GF | |
| parent | e84db8989d9c1a319193ebbcc2e92f7f6784bbce (diff) | |
Close to finishing new verisons of Finnish and GErman.
Diffstat (limited to 'src/GF')
| -rw-r--r-- | src/GF/UseGrammar/Linear.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs index 0bd053803..9459264ea 100644 --- a/src/GF/UseGrammar/Linear.hs +++ b/src/GF/UseGrammar/Linear.hs @@ -19,6 +19,7 @@ import Operations import Zipper import Monad +import List (intersperse) -- Linearization for canonical GF. AR 7/6/2003 @@ -143,7 +144,7 @@ allLinsOfTree gr a e = err (singleton . str) id $ do -- the value is a list of structures arranged as records of tables of terms allLinsAsRec :: CanonGrammar -> Ident -> A.Tree -> Err [[(Label,[([Patt],Term)])]] -allLinsAsRec gr c t = linearizeNoMark gr c t >>= allLinValues +allLinsAsRec gr c t = linearizeNoMark gr c t >>= expandLinTables gr >>= allLinValues -- the value is a list of structures arranged as records of tables of strings -- only taking into account string fields @@ -153,7 +154,8 @@ allLinTables gr c t = do mapM (mapM getS) r' where getS (lab,pss) = liftM (curry id lab) $ mapM gets pss - gets (ps,t) = liftM (curry id ps . concat . map str2strings) $ strsFromTerm t + gets (ps,t) = liftM (curry id ps . cc . map str2strings) $ strsFromTerm t + cc = concat . intersperse ["/"] prLinTable :: [[(Label,[([Patt],[String])])]] -> [String] prLinTable = concatMap prOne . concat where |
