summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command/Commands.hs
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2018-10-15 12:04:36 +0200
committerKrasimir Angelov <kr.angelov@gmail.com>2018-10-15 12:04:36 +0200
commita0afbfbad38adf5e69b41fec1c5f9a59f050e688 (patch)
tree3170214e0a182144e9d710d04d501a1ae1fbd802 /src/compiler/GF/Command/Commands.hs
parent8a9430f63a3168719641794a652194fff4515cb0 (diff)
parent6b1e21508e5719edf34798d4348be1aa5f0f12f6 (diff)
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
Diffstat (limited to 'src/compiler/GF/Command/Commands.hs')
-rw-r--r--src/compiler/GF/Command/Commands.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index a8a175f7c..72e57fcf5 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -445,6 +445,7 @@ pgfCommands = Map.fromList [
],
options = [
("lines","return the list of lines, instead of the singleton of all contents"),
+ ("paragraphs","return the list of paragraphs, as separated by empty lines"),
("tree","convert strings into trees")
],
exec = getEnv $ \ opts _ (Env pgf mos) -> do
@@ -470,6 +471,7 @@ pgfCommands = Map.fromList [
_ | isOpt "tree" opts ->
returnFromLines [(1::Int,s)]
_ | isOpt "lines" opts -> return (fromStrings $ lines s)
+ _ | isOpt "paragraphs" opts -> return (fromStrings $ toParagraphs $ lines s)
_ -> return (fromString s),
flags = [("file","the input file name")]
}),