diff options
| author | aarne <unknown> | 2004-03-26 20:08:30 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-03-26 20:08:30 +0000 |
| commit | 6719aedde34c3a4f0ccb78931968c6fe490b3282 (patch) | |
| tree | 489e96a556d27ba87474c4ce89e3757a17ececb4 /src/GF/Data | |
| parent | 2433403b6247022ac56133ca935307868fcef6b9 (diff) | |
Better help.
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/Operations.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs index 08ebdd45c..dd8e37380 100644 --- a/src/GF/Data/Operations.hs +++ b/src/GF/Data/Operations.hs @@ -311,6 +311,12 @@ type WParser a b = [a] -> [(b,[a])] -- old Wadler style parser wParseResults :: WParser a b -> [a] -> [b] wParseResults p aa = [b | (b,[]) <- p aa] +paragraphs :: String -> [String] +paragraphs = map unlines . chop . lines where + chop [] = [] + chop ss = let (ps,rest) = break empty ss in ps : chop (dropWhile empty rest) + empty = all isSpace + -- printing indent :: Int -> String -> String |
