oi 0.4.0 → 0.4.0.1
raw patch · 2 files changed
+30/−2 lines, 2 filesnew-component:exe:oi-echocPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- oi.cabal +8/−2
- sample/echoc.hs +22/−0
oi.cabal view
@@ -1,5 +1,5 @@ Name: oi-Version: 0.4.0+Version: 0.4.0.1 Category: Data Synopsis: Library for purely functional lazy interactions with the outer world. Description: This package implements a data structure and operations on it for writing interactive program with no imperative flavor of IO monads.@@ -20,7 +20,7 @@ Default-Language: Haskell2010 Hs-Source-Dirs: src/ Build-Depends: base >= 4.5 && < 5, parallel, comonad >= 3, filepath, directory- GHC-Options: -O0 -fcase-merge -fcse -fdo-eta-reduction -fenable-rewrite-rules -ffloat-in -ffull-laziness -fspecialise -fstrictness + GHC-Options: -fno-cse -fno-full-laziness Exposed-modules: Data.OI , Data.OI.Internal , Data.OI.Combinator@@ -45,6 +45,12 @@ , oi Default-Language: Haskell2010 +Executable oi-echoc+ Hs-Source-Dirs: sample/+ Main-Is: echoc.hs+ Build-Depends: base >= 4.5 && < 5+ , oi+ Default-Language: Haskell2010 Executable oi-echo Hs-Source-Dirs: sample/ Main-Is: echo.hs
+ sample/echoc.hs view
@@ -0,0 +1,22 @@+{-# LANGUAGE TypeOperators #-}+module Main where++import Data.OI hiding (isEOF)++import Data.Bool+import Data.Maybe+import System.IO++import qualified System.Environment as Sys (getArgs)++main :: IO ()+main = runInteraction pmain++pmain :: (Char, ()) :-> ()+pmain = getc |/| putc++getc :: Char :-> Char+getc = iooi (hSetBuffering stdin NoBuffering >> getChar)++putc :: Char -> () :-> ()+putc = iooi . (\c -> hSetBuffering stdout NoBuffering >> hPutChar stdout c >> hFlush stdout)