Changeset 8585 for src/Pugs/Prim/Yaml.hs
- Timestamp:
- 01/05/06 18:14:10 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/Yaml.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/Yaml.hs
r8566 r8585 7 7 import Pugs.Internals 8 8 import Pugs.AST 9 import Pugs.Pretty 9 10 import Data.Yaml.Syck 10 11 import qualified Data.Map as Map … … 45 46 toYaml :: Val -> Eval YamlNode 46 47 toYaml VUndef = return YamlNil 48 --toYaml (VNum num) = return $ YamlStr -- better handled by pretty 47 49 toYaml (VStr str) = return $ YamlStr (encodeUTF8 str) 48 50 toYaml (VList nodes) = do 49 51 fmap YamlSeq $ mapM toYaml nodes 52 toYaml x = return $ YamlStr $ encodeUTF8 $ pretty x 50 53 --toYaml (VHash hash) = do 51 54 -- fmap YamlMap $ Map.toList hash
