Last active
August 29, 2015 14:09
-
-
Save danidiaz/243582b0b034484de29f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import System.Process.Streaming | |
import System.Exit | |
import Data.ByteString (ByteString) | |
import qualified Data.ByteString.Lazy.Char8 as S | |
import Pipes.ByteString (toLazyM) | |
main :: IO () | |
main = do | |
(code, result) <- execute (pipeo (fromFold toLazyM)) (shell "ls -l") | |
S.putStr result | |
exitWith code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's very nice, obviously :) I don't understand
toLazy
there;result
is a strict ByteString.... oh, not it's not. You dropped to .Lazy. Yeah. You see, that's a non-starter.