Browse Source

progress

master
parent
commit
f465738908
Signed by: Yann Esposito (Yogsototh) <yann.esposito@gmail.com> GPG Key ID: 7B19A4C650D59646
3 changed files with 36 additions and 0 deletions
  1. 11
    0
      README.org
  2. 14
    0
      part1/hello_name.hs
  3. 11
    0
      part1/hello_world.hs

+ 11
- 0
README.org 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
- 0
part1/hello_name.hs 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
- 0
part1/hello_world.hs 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!"

Loading…
Cancel
Save