1
0
forked from GitHub/gf-core

added option to show the probabilities of results

This commit is contained in:
krangelov
2019-09-20 08:09:54 +02:00
parent a0cfe09e09
commit 084b345663
2 changed files with 16 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ newtype CommandOutput = Piped (CommandArguments,String) ---- errors, etc
-- ** Converting command output
fromStrings ss = Piped (Strings ss, unlines ss)
fromExprs es = Piped (Exprs es,unlines (map (showExpr [] . fst) es))
fromExprs show_p es = Piped (Exprs es,unlines (map (\(e,p) -> (if show_p then (++) ("["++show p++"] ") else id) (showExpr [] e)) es))
fromString s = Piped (Strings [s], s)
pipeWithMessage es msg = Piped (Exprs es,msg)
pipeMessage msg = Piped (Exprs [],msg)