Showing posts with label Haskell (programming language). Show all posts
Showing posts with label Haskell (programming language). Show all posts

Monday, December 5, 2016

macOS Sierra: Haskell (programming language): Hello, World! Program

Command:

$ cat helloworld.hs


Result:

main = putStrLn "Hello, World!"


Command:

$ ghc helloworld.hs


Result:

[1 of 1] Compiling Main             ( helloworld.hs, helloworld.o )
Linking helloworld ...


Command:

$ ./helloworld


Result:

Hello, World!

macOS Sierra: Installing Haskell

Command:

$ brew install ghc cabal-install


Result:

==> Downloading https://homebrew.bintray.com/bottles/ghc-8.0.1_3.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ghc-8.0.1_3.sierra.bottle.tar.gz
==> Using the sandbox
==> /usr/local/Cellar/ghc/8.0.1_3/bin/ghc-pkg recache
🍺  /usr/local/Cellar/ghc/8.0.1_3: 5,775 files, 1G
==> Downloading https://homebrew.bintray.com/bottles/cabal-install-1.24.0.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring cabal-install-1.24.0.1.sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/cabal-install/1.24.0.1: 7 files, 27.7M

Laurence Day: Computerphile: Programming Paradigm: Imperative Programming & Functional Programming


  • sum [1..10]
  • sum::[Int]->Int



John Hughes (computer scientist): Computerphile: Functional Programming & Haskell

John Hughes (computer scientist)
Paul Hudak

Thorsten Altenkirch: Computerphile: Quantum Computing 'Magic'

Thorsten Altenkirch
Peter Shor

  • Peter Shor
  • Quantum IO Monad