From c9965904a050e9b6071d69805bb32888c14f44ff Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Mon, 16 Dec 2019 15:27:31 +0100 Subject: [PATCH] cleanup --- src/posts/0010-Haskell-Now/index.org | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/posts/0010-Haskell-Now/index.org b/src/posts/0010-Haskell-Now/index.org index fdf9cb2..2075966 100644 --- a/src/posts/0010-Haskell-Now/index.org +++ b/src/posts/0010-Haskell-Now/index.org @@ -215,9 +215,7 @@ If you chose Stack: https://haskellstack.org :CUSTOM_ID: code :END: - -#+name nixb -#+begin_src elisp :export none +#+begin_src elisp :eval yes (defun nixb () "#! /usr/bin/env nix-shell\n#! nix-shell -i runghc\n#! nix-shell -p \"ghc.withPackages (ps: [ ps.protolude ])\"\n#! nix-shell -I nixpkgs=\"https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz\"") #+end_src @@ -225,6 +223,8 @@ If you chose Stack: https://haskellstack.org #+RESULTS: : nixb +#+MACRO: lnk @@html:$1 ⤓@@ + ** Don't be afraid :PROPERTIES: :CUSTOM_ID: don't-be-afraid @@ -239,9 +239,8 @@ At first I won't show you any Haskell super power. I will start with similarities between Haskell and other programming languages. Let's jump to the mandatory "Hello World". -[[./hello.hs]] -#+NAME: hello.hs -#+BEGIN_SRC haskell :tangle hello.hs :shebang (nixb) +{{{lnk(hello.hs)}}} +#+BEGIN_SRC haskell :tangle hello.hs :shebang '(nixb) main = putStrLn "Hello World!" #+END_SRC @@ -261,7 +260,7 @@ Now, a program asking your name and replying "Hello" using the name you entered: #+NAME: name.hs -#+BEGIN_SRC haskell :tangle name.hs :shebang (nixb) +#+BEGIN_SRC haskell :tangle name.hs :shebang '(nixb) main = do print "What is your name?" name <- getLine