This commit is contained in:
Yann Esposito (Yogsototh) 2018-04-28 11:01:20 +02:00
parent b89c335c9a
commit f465738908
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 36 additions and 0 deletions

11
README.org Normal file
View file

@ -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

14
part1/hello_name.hs Executable file
View file

@ -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 <> "!")

11
part1/hello_world.hs Executable file
View file

@ -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!"