packages feed

pugs-DrIFT 2.2.3.20110925 → 2.2.3.20120203

raw patch · 2 files changed

+2/−2 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- DrIFT.JSON: class Show a => JSON a
+ DrIFT.JSON: class Show a => JSON a where showJSON x = show (show x)
- DrIFT.Perl5: class Show a => Perl5 a
+ DrIFT.Perl5: class Show a => Perl5 a where showPerl5 x = show (show x)
- DrIFT.Perl6Class: class Typeable a => MooseClass a
+ DrIFT.Perl6Class: class Typeable a => MooseClass a where showMooseTypeDef _ ty = error $ "showMooseTypeDef " ++ (show $ typeOf ty)
- DrIFT.Perl6Class: class (Typeable a, Show a) => PLit a
+ DrIFT.Perl6Class: class (Typeable a, Show a) => PLit a where plShow = show
- DrIFT.Perl6Class: class PLit a => Perl6Class a
+ DrIFT.Perl6Class: class PLit a => Perl6Class a where showPerl6TypeDef _ ty = error $ "showPerl6TypeDef " ++ (show $ typeOf ty) asPerl6Object simple = "new " ++ (show $ typeOf simple)
- DrIFT.YAML: class Typeable a => YAML a
+ DrIFT.YAML: class Typeable a => YAML a where asYAML x = lift $ do { ty <- handle (\ (e :: SomeException) -> return "()") $ evaluate (show (typeOf x)); case ty of { "()" -> return nilNode _ -> return $ mkTagNode (tagHs ty) ENil } } fromYAML = fromYAMLElem . n_elem fromYAMLElem e = do { fail $ "unhandled element: " ++ (show e) ++ ", expecting " ++ show (typeOf (undefined :: a)) }

Files

pugs-DrIFT.cabal view
@@ -1,5 +1,5 @@ name:                pugs-DrIFT-version:             2.2.3.20110925+version:             2.2.3.20120203 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
src/GenUtil.hs view
@@ -484,7 +484,7 @@ _ `overlaps` _ = True  -- | translate a number of seconds to a string representing the duration expressed.-showDuration :: Integral a => a -> String+showDuration :: (Show a, Integral a) => a -> String showDuration x = st "d" dayI ++ st "h" hourI ++ st "m" minI ++ show secI ++ "s" where         (dayI, hourI) = divMod hourI' 24         (hourI', minI) = divMod minI' 60