jmacro 0.6.17 → 0.6.17.1
raw patch · 2 files changed
+52/−8 lines, 2 filesdep ~basenew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Language/Javascript/JMacro/Base.hs +10/−1
- jmacro.cabal +42/−7
Language/Javascript/JMacro/Base.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE FlexibleInstances, UndecidableInstances, OverlappingInstances, OverloadedStrings, TypeFamilies, RankNTypes, DeriveDataTypeable, StandaloneDeriving, FlexibleContexts, TypeSynonymInstances, ScopedTypeVariables, GADTs+{-# LANGUAGE CPP, FlexibleInstances, UndecidableInstances, OverlappingInstances, OverloadedStrings, TypeFamilies, RankNTypes, DeriveDataTypeable, StandaloneDeriving, FlexibleContexts, TypeSynonymInstances, ScopedTypeVariables, GADTs , GeneralizedNewtypeDeriving, LambdaCase #-} -----------------------------------------------------------------------------@@ -54,7 +54,12 @@ import Safe import Data.Aeson import qualified Data.Vector as V+#if MIN_VERSION_aeson (2,0,0)+import qualified Data.Aeson.Key as KM+import qualified Data.Aeson.KeyMap as KM+#else import qualified Data.HashMap.Strict as HM+#endif import Text.PrettyPrint.Leijen.Text hiding ((<$>)) import qualified Text.PrettyPrint.Leijen.Text as PP@@ -804,7 +809,11 @@ toJExpr (Number n) = ValExpr $ JDouble $ realToFrac n toJExpr (String s) = ValExpr $ JStr $ TS.unpack s toJExpr (Array vs) = ValExpr $ JList $ map toJExpr $ V.toList vs+#if MIN_VERSION_aeson (2,0,0)+ toJExpr (Object obj) = ValExpr $ JHash $ M.fromList $ map (KM.toString *** toJExpr) $ KM.toList obj+#else toJExpr (Object obj) = ValExpr $ JHash $ M.fromList $ map (TS.unpack *** toJExpr) $ HM.toList obj+#endif -------------------------
jmacro.cabal view
@@ -1,5 +1,5 @@ name: jmacro-version: 0.6.17+version: 0.6.17.1 synopsis: QuasiQuotation library for programmatic generation of Javascript code. description: Javascript syntax, functional syntax, hygienic names, compile-time guarantees of syntactic correctness, limited typechecking. Additional documentation available at <http://www.haskell.org/haskellwiki/Jmacro> category: Language@@ -7,12 +7,28 @@ license-file: LICENSE author: Gershom Bazerman maintainer: gershomb@gmail.com-Tested-With: GHC == 8.6.3+tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7, GHC==9.0.2, GHC==9.2.2 Build-Type: Simple-Cabal-Version: >= 1.6+Cabal-Version: >= 1.10 library- build-depends: base >= 4.9, base < 5, containers, wl-pprint-text, text, safe >= 0.2, parsec > 3.0, template-haskell >= 2.3, mtl > 1.1 , haskell-src-exts, haskell-src-meta, bytestring >= 0.9, syb, aeson >= 0.5 , regex-posix > 0.9, vector >= 0.8, unordered-containers >= 0.2+ default-language: Haskell2010+ build-depends: aeson >= 0.5,+ base >= 4.9 && < 5,+ bytestring >= 0.9,+ containers,+ haskell-src-exts,+ haskell-src-meta,+ mtl > 1.1,+ parsec > 3.0,+ regex-posix > 0.9,+ safe >= 0.2,+ syb,+ template-haskell >= 2.3,+ text,+ unordered-containers >= 0.2,+ vector >= 0.8,+ wl-pprint-text exposed-modules: Language.Javascript.JMacro Language.Javascript.JMacro.Util@@ -29,7 +45,25 @@ default: False executable jmacro- build-depends: base >= 4, base < 5, containers, wl-pprint-text, text, safe >= 0.2, parsec > 3.0, template-haskell >= 2.3, mtl > 1.1 , haskell-src-exts, haskell-src-meta, bytestring >= 0.9, syb, aeson >= 0.5 , regex-posix > 0.9, vector >= 0.8, unordered-containers >= 0.2, parseargs+ default-language: Haskell2010+ build-depends: aeson >= 0.5,+ base >= 4 && < 5,+ bytestring >= 0.9,+ containers,+ haskell-src-exts,+ haskell-src-meta,+ mtl > 1.1 ,+ parseargs,+ parsec > 3.0,+ regex-posix > 0.9,+ safe >= 0.2,+ syb,+ template-haskell >= 2.3,+ text,+ unordered-containers >= 0.2,+ vector >= 0.8,+ wl-pprint-text+ main-is: Language/Javascript/JMacro/Executable.hs other-modules: Language.Javascript.JMacro.Util Language.Javascript.JMacro.TypeCheck@@ -42,6 +76,7 @@ executable jmacro-bench+ default-language: Haskell2010 main-is: Language/Javascript/JMacro/Benchmark.hs if flag(benchmarks) buildable: True@@ -59,5 +94,5 @@ buildable: False source-repository head- type: darcs- location: http://hub.darcs.net/gershomb/jmacro+ type: git+ location: https://github.com/Happstack/jmacro.git