shakespeare 2.0.8.1 → 2.0.8.2
raw patch · 3 files changed
+20/−6 lines, 3 filesdep ~aesondep ~basedep ~template-haskell
Dependency ranges changed: aeson, base, template-haskell
Files
- Text/MkSizeType.hs +11/−4
- Text/Shakespeare/I18N.hs +8/−1
- shakespeare.cabal +1/−1
Text/MkSizeType.hs view
@@ -31,7 +31,7 @@ derives = map mkName ["Eq", "Ord"] showInstanceDec :: Name -> String -> Dec-showInstanceDec name unit' = InstanceD [] (instanceType "Show" name) [showDec]+showInstanceDec name unit' = instanceD [] (instanceType "Show" name) [showDec] where showSize = VarE $ mkName "showSize" x = mkName "x" unit = LitE $ StringL unit'@@ -40,17 +40,17 @@ showBody = NormalB $ AppE (AppE showSize $ VarE x) unit numInstanceDec :: Name -> Dec-numInstanceDec name = InstanceD [] (instanceType "Num" name) decs+numInstanceDec name = instanceD [] (instanceType "Num" name) decs where decs = map (binaryFunDec name) ["+", "*", "-"] ++ map (unariFunDec1 name) ["abs", "signum"] ++ [unariFunDec2 name "fromInteger"] fractionalInstanceDec :: Name -> Dec-fractionalInstanceDec name = InstanceD [] (instanceType "Fractional" name) decs+fractionalInstanceDec name = instanceD [] (instanceType "Fractional" name) decs where decs = [binaryFunDec name "/", unariFunDec2 name "fromRational"] toCssInstanceDec :: Name -> Dec-toCssInstanceDec name = InstanceD [] (instanceType "ToCss" name) [toCssDec]+toCssInstanceDec name = instanceD [] (instanceType "ToCss" name) [toCssDec] where toCssDec = FunD (mkName "toCss") [Clause [] showBody []] showBody = NormalB $ (AppE dot from) `AppE` ((AppE dot pack) `AppE` show') from = VarE 'fromLazyText@@ -91,4 +91,11 @@ #else notStrict :: Strict notStrict = NotStrict+#endif++instanceD :: Cxt -> Type -> [Dec] -> Dec+#if MIN_VERSION_template_haskell(2,11,0)+instanceD = InstanceD Nothing+#else+instanceD = InstanceD #endif
Text/Shakespeare/I18N.hs view
@@ -177,7 +177,7 @@ #endif (map (toCon dt) sdef) []) :) else id)- [ InstanceD+ [ instanceD [] (ConT ''RenderMessage `AppT` (ConT $ mkName master) `AppT` ConT mname) [ FunD (mkName "renderMessage") $ c1 ++ c2 ++ [c3]@@ -413,4 +413,11 @@ #else notStrict :: Strict notStrict = NotStrict+#endif++instanceD :: Cxt -> Type -> [Dec] -> Dec+#if MIN_VERSION_template_haskell(2,11,0)+instanceD = InstanceD Nothing+#else+instanceD = InstanceD #endif
shakespeare.cabal view
@@ -1,5 +1,5 @@ name: shakespeare-version: 2.0.8.1+version: 2.0.8.2 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>