diff --git a/README.org b/README.org new file mode 100644 index 0000000..daa4953 --- /dev/null +++ b/README.org @@ -0,0 +1,11 @@ +#+Title: README for Haskell for the Working Programmer +#+Author: Yann Esposito + +* Haskell for the Working Programmer + +This repository contains many resources associated with the book Haskell for the +Working Programmer. + +- a project template that can be used by stack +- the =part1= contains most examples that are self contained haskell scripts +- the =part2= contains all example projects diff --git a/part1/hello_name.hs b/part1/hello_name.hs new file mode 100755 index 0000000..c659260 --- /dev/null +++ b/part1/hello_name.hs @@ -0,0 +1,14 @@ +#!/usr/bin/env stack +{- stack script + --resolver lts-11.6 + --install-ghc + --package protolude +-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} + import Protolude + + main = do + putText "What is your name?" + name <- getLine + putText ("Hello " <> name <> "!") diff --git a/part1/hello_world.hs b/part1/hello_world.hs new file mode 100755 index 0000000..ddfd283 --- /dev/null +++ b/part1/hello_world.hs @@ -0,0 +1,11 @@ +#!/usr/bin/env stack +{- stack script + --resolver lts-11.6 + --install-ghc + --package protolude +-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} + import Protolude + + main = putText "Hello, world!"