diff options
Diffstat (limited to 'src/Data')
-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) |