Created
May 17, 2014 23:20
-
-
Save Happy-Ferret/13df9ccb925e963891ce to your computer and use it in GitHub Desktop.
*nix utility skeleton in Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- Released as "All Rights Reserved" | |
until further notice/application of a formal license -} | |
module Main where | |
import System.Environment | |
import Control.Monad | |
import System.Exit | |
main :: IO () | |
main = getArgs >>= parse >>= putStr | |
parse ["-h"] = help >> exitWith ExitSuccess | |
parse [] = use >> exitWith ExitSuccess | |
parse fs = <main functionality> | |
help = putStrLn "<help text>" | |
use = putStrLn "<use case>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment