on master help sign in
Add functionField external tutorial
commitafbc784dc0733bc5d0ff243e2ae9b9e5a8613f69 authorJasper Van der Jeugt <m@jaspervdj.be> dateWed 6 Apr 2016, 17:55 (11 years ago) parentb810fe3
3 files changed+12−3
src/Data/Yaml/Extended.hs+5−2 web/tutorials/04-compilers.markdown+1−1 web/tutorials/external-functionfield.md+6
src/Data/Yaml/Extended.hs+5−2
@@ -9,8 +9,11 @@ import qualified Data.Vector as V
99import Data.Yaml
1010
1111toString :: Value -> Maybe String
12−toString (String t) = Just (T.unpack t)
13−toString _ = Nothing
12+toString (String t) = Just (T.unpack t)
13+toString (Bool True) = Just "true"
14+toString (Bool False) = Just "false"
15+toString (Number d) = Just (show d)
16+toString _ = Nothing
1417
1518toList :: Value -> Maybe [Value]
1619toList (Array a) = Just (V.toList a)
web/tutorials/04-compilers.markdown+1−1
@@ -1,5 +1,5 @@
11---
2−title: More on compilers: load, and templates
2+title: 'More on compilers: load, and templates'
33author: Jasper Van der Jeugt
44---
55
web/tutorials/external-functionfield.mdnew file+6
@@ -0,0 +1,6 @@
1+---
2+title: Hakyll's functionField
3+author: Beerend Lauwers
4+url: http://beerendlauwers.be/posts/2015-09-21-hakylls-functionfield.html
5+external: true
6+---