pugs-DrIFT 2.2.3.0 → 2.2.3.1
raw patch · 4 files changed
+16/−4 lines, 4 filesdep ~basesetup-changedPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
+ DrIFT.YAML: fromYamlString :: (YAML a) => String -> IO a
+ DrIFT.YAML: toYamlString :: (YAML a) => a -> IO String
Files
- Setup.hs +1/−1
- pugs-DrIFT.cabal +3/−2
- src/DrIFT.hs +4/−1
- src/DrIFT/YAML.hs +8/−0
Setup.hs view
@@ -3,4 +3,4 @@ import Distribution.Simple main :: IO ()-main = defaultMainWithHooks defaultUserHooks+main = defaultMainWithHooks simpleUserHooks
pugs-DrIFT.cabal view
@@ -1,5 +1,5 @@ name: pugs-DrIFT-version: 2.2.3.0+version: 2.2.3.1 synopsis: DrIFT with pugs-specific rules. description: DrIFT is a type sensitive preprocessor for Haskell. It extracts type declarations and directives from modules. The directives cause rules to be fired on the parsed@@ -11,6 +11,7 @@ This allows instances to be derived for a type after the original module has been compiled. As a bonus, simple utility functions can also be produced from a type. category: Pugs+cabal-version: >= 1.2.3 license: BSD3 license-file: LICENSE -- For contributors & what they did, see AUTHORS@@ -22,7 +23,7 @@ DrIFT.Perl6Class DrIFT.YAML hs-source-dirs: src-build-depends: base, haskell98, bytestring, utf8-string, pretty, containers, mtl, stm, HsSyck+build-depends: base < 4, haskell98, bytestring, utf8-string, pretty, containers, mtl, stm, HsSyck build-type: Simple data-files: AUTHORS, ChangeLog, README, README.old extensions: ParallelListComp, ScopedTypeVariables,
src/DrIFT.hs view
@@ -79,7 +79,10 @@ header = "Usage: DrIFT [OPTION...] file" main = do argv <- System.getArgs- (env,n) <- case (getOpt Permute options argv) of+ let argv' = case argv of+ [_src, input, output, "-pgmF"] -> [input, "-o", output]+ _ -> argv+ (env,n) <- case (getOpt Permute options argv') of (as,n,[]) -> return (foldr ($) env as ,n) (_,_,errs) -> putErrDie (concat errs ++ usageInfo header options) case env of
src/DrIFT/YAML.hs view
@@ -30,6 +30,14 @@ type YAMLVal = YamlNode type SeenCache = IORef IntSet.IntSet +toYamlString :: YAML a => a -> IO String+toYamlString = showYaml++fromYamlString :: YAML a => String -> IO a+fromYamlString str = do+ yaml <- parseYaml str+ fromYAML yaml+ toYamlNode :: YAML a => a -> IO YamlNode toYamlNode x = do cache <- newIORef IntSet.empty