diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 17:55:37 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 17:55:37 +0200 |
commit | afbc784dc0733bc5d0ff243e2ae9b9e5a8613f69 (patch) | |
tree | 1bb2adc0675b2229691f56b262a8e8f0271d1979 /src | |
parent | b810fe38cf2eddb67b8fa9e56434ce5dbde4f22e (diff) | |
download | hakyll-afbc784dc0733bc5d0ff243e2ae9b9e5a8613f69.tar.gz |
Add functionField external tutorial
Diffstat (limited to 'src')
-rw-r--r-- | src/Data/Yaml/Extended.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Data/Yaml/Extended.hs b/src/Data/Yaml/Extended.hs index 9ad05f3..099e945 100644 --- a/src/Data/Yaml/Extended.hs +++ b/src/Data/Yaml/Extended.hs @@ -9,8 +9,11 @@ import qualified Data.Vector as V import Data.Yaml toString :: Value -> Maybe String -toString (String t) = Just (T.unpack t) -toString _ = Nothing +toString (String t) = Just (T.unpack t) +toString (Bool True) = Just "true" +toString (Bool False) = Just "false" +toString (Number d) = Just (show d) +toString _ = Nothing toList :: Value -> Maybe [Value] toList (Array a) = Just (V.toList a) |