From f7ce8940fa0d53718eb30bfc7d0ef9320bafc673 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 14 Mar 2007 12:11:18 +0000 Subject: ma -status; sep lines for l -all --- src/GF/UseGrammar/Linear.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/GF/UseGrammar/Linear.hs') diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs index 85bae5b0d..ac6c3b703 100644 --- a/src/GF/UseGrammar/Linear.hs +++ b/src/GF/UseGrammar/Linear.hs @@ -213,14 +213,16 @@ allLinsAsRec gr c t = linearizeNoMark gr c t >>= expandLinTables gr >>= allLinVa -- | the value is a list of structures arranged as records of tables of strings -- only taking into account string fields -allLinTables :: CanonGrammar ->Ident ->A.Tree ->Err [[(Label,[([Patt],[String])])]] -allLinTables gr c t = do +-- True: sep. by /, False: sep by \n +allLinTables :: + Bool -> CanonGrammar ->Ident ->A.Tree ->Err [[(Label,[([Patt],[String])])]] +allLinTables slash gr c t = do r' <- allLinsAsRec gr c t mapM (mapM getS) r' where getS (lab,pss) = liftM (curry id lab) $ mapM gets pss gets (ps,t) = liftM (curry id ps . cc . map str2strings) $ strsFromTerm t - cc = concat . intersperse ["/"] + cc = concat . intersperse [if slash then "/" else "\n"] -- | the value is a list of strings gathered from all fields -- cgit v1.2.3