building using stack
This commit is contained in:
parent
9297024b5f
commit
8b23b1d5ab
3 changed files with 12 additions and 4 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
|||
TAGS
|
||||
build/
|
||||
compile
|
||||
compile.hi
|
||||
compile.o
|
||||
*.hi
|
||||
*.o
|
||||
*.html
|
||||
*.pdf
|
||||
|
|
7
build.sh
Executable file
7
build.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
if hash stack 2>/dev/null; then
|
||||
stack ghc -- -odir build -hidir build compile.hs -O2
|
||||
else
|
||||
print -- "Please install 'stack' (http://haskellstack.org)"
|
||||
fi
|
|
@ -60,7 +60,7 @@ main = do
|
|||
-- | Find Markdown Files (skip hidden directories)
|
||||
findMarkdownFiles :: Shell FilePath
|
||||
findMarkdownFiles = do
|
||||
fic <- find (has ".md") "." & fgrep (invert (prefix "./."))
|
||||
fic <- find (suffix ".md") "." & fgrep (invert (prefix "./."))
|
||||
let mf = stripPrefix "./" fic
|
||||
_ <- guard (isJust mf)
|
||||
return (fromJust mf)
|
||||
|
@ -101,7 +101,7 @@ toReveal dbg fpath = do
|
|||
mslideLevel <- fold (fpath & filename
|
||||
& input
|
||||
& grep (prefix "slide_level: ")
|
||||
& sed (prefix "slide_level: " *> star digit))
|
||||
& sed (prefix ("slide_level: " *> plus digit)))
|
||||
Fold.head
|
||||
let slideLevel = maybe "2" (\l -> if l == "" then "2" else l) mslideLevel
|
||||
dest = fpath & filename
|
||||
|
|
Loading…
Reference in a new issue