IT練習ノート

IT関連で調べたこと(実際は嵌ったこと)を書いています。

2016-05-22から1日間の記事一覧

PipesでHelloWorld

PipesでHelloWorld Prelude Pipes P> runEffect $ (yield "Hello World" ) >-> P.stdoutLn Hello World Producerの型 Prelude Pipes P> :t (yield "Hello Wordl") (yield "Hello Wordl") :: Monad m => Proxy x' x () [Char] m () Consumerの型 Prelude Pipe…

cabalのサンドボックスでモジュールを取り込みghci(?)を利用する

サンドボックスを作る。 $ cabal sandbox init Writing a default package environment file to ... モジュールをサンドボックスを取り込む。 $ cabal install pipes-safe ghciではなくて、cabal上で、対話用のオプション(repl)を指定して起動する。 $ cabal…