mirror of
https://github.com/lexi-lambda/freer-simple.git
synced 2024-10-26 16:57:48 +03:00
flesh out example
This commit is contained in:
parent
d62a40947b
commit
72c19abc4f
@ -1,4 +1,18 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
module Main where
|
||||
|
||||
import Control.Monad.Freer
|
||||
import Teletype
|
||||
|
||||
runner :: Eff '[Teletype] ()
|
||||
runner = do
|
||||
x <- getLine'
|
||||
putStrLn' x
|
||||
y <- getLine'
|
||||
putStrLn' y
|
||||
|
||||
main :: IO ()
|
||||
main = print "placeholder"
|
||||
main = do
|
||||
let xs = runTeletypePure ["cat", "fish"] runner
|
||||
print xs
|
||||
runTeletype runner
|
||||
|
@ -2,4 +2,4 @@ flags: {}
|
||||
packages:
|
||||
- '.'
|
||||
extra-deps: []
|
||||
resolver: lts-3.4
|
||||
resolver: lts-5.1
|
||||
|
Loading…
Reference in New Issue
Block a user