1import Distribution.Simple
3-- https://github.com/snoyberg/conduit#readme
6import System.Directory (removeFile)
8-- Make sure Cabal and ghc were included
9import Distribution.Package ()
13 -- Pure operations: summing numbers.
14 print $ runConduitPure $ yieldMany [1..10] .| sumC
16 -- Exception safe file access: copy a file.
17 writeFile "input.txt" "This is a test." -- create the source file
18 runConduitRes $ sourceFileBS "input.txt" .| sinkFile "output.txt" -- actual copying
19 readFile "output.txt" >>= putStrLn -- prove that it worked
21 -- Perform transformations.
22 print $ runConduitPure $ yieldMany [1..10] .| mapC (+ 1) .| sinkList
24 removeFile "input.txt"
25 removeFile "output.txt"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list