Re:Use Haskell for shell scripting
by kenko on Friday January 30, 2015 @01:06PM
(#8973334)
Why `Either Text Text`? What if you're interested in both stdout and stderr?
[ Parent
| on HN ]
Re:Use Haskell for shell scripting
by Gabriel439 on Friday January 30, 2015 @06:58PM
(#8975268)
Then you can do this:
fmap (either id id) (both ...)
... which is equivalent to: x <- both ...
return (case x of
Left txt -> txt
Right txt -> txt)
That removes the `Either` tag and fuses them into a single stream.