Gabriella439 / turtle

Shell programming, Haskell style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

document how to use with nix

adrian-gierakowski opened this issue · comments

fox example

#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p "ghc.withPackages (x: [ x.turtle ])"

{-# LANGUAGE OverloadedStrings #-}

import Turtle

main = echo "Hello, world!"

or auto-reloading, useful when playing around (adapted from here):

#! /usr/bin/env nix-shell
#! nix-shell -p ghcid
#! nix-shell -i runghc -p "ghc.withPackages (x: [ x.turtle ])"
#! nix-shell -i "ghcid -c ghci -T main"

{-# LANGUAGE OverloadedStrings #-}

import Turtle

main = echo "Hello, world!"