Haskellでスクリプトを書く
code:hoge.hs
#! /usr/bin/env nix-shell #! nix-shell -i "runhaskell" import qualified Data.Text.IO as T
import System.Console.ANSI
main :: IO ()
main = do
line <- T.getLine
T.putStrLn line
ghcWithPackagesの部分でpackageを追加する
$ echo "hoge" | ./hoge.hs
参考