hslua-aeson 0.1.0.1 → 0.1.0.2
raw patch · 3 files changed
+12/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hslua-aeson.cabal +1/−1
- src/Scripting/Lua/Aeson.hs +6/−1
- test/AesonSpec.hs +5/−0
hslua-aeson.cabal view
@@ -1,5 +1,5 @@ name: hslua-aeson-version: 0.1.0.1+version: 0.1.0.2 synopsis: Glue between aeson and hslua description: Please see README.md homepage: https://github.com/tarleb/hslua-aeson#readme
src/Scripting/Lua/Aeson.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-|@@ -29,6 +30,10 @@ , newstate ) where +#if MIN_VERSION_base(4,8,0)+#else+import Control.Applicative ((<$>), (<*>), (*>))+#endif import Data.HashMap.Lazy (HashMap) import Data.Hashable (Hashable) import Data.Scientific (Scientific, toRealFloat, fromFloatDigits)@@ -164,6 +169,6 @@ pushTextHashMap lua hm = do let xs = HashMap.toList hm Lua.createtable lua (length xs + 1) 0- let addValue (k, v) = Lua.push lua k >> Lua.push lua v >>+ let addValue (k, v) = Lua.push lua k *> Lua.push lua v *> Lua.rawset lua (-3) mapM_ addValue xs
test/AesonSpec.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-| Copyright : © 2017 Albert Krewinkel@@ -6,6 +7,10 @@ Tests for Aeson–Lua glue. -}+#if MIN_VERSION_base(4,8,0)+#else+import Control.Applicative ((<$>), (*>))+#endif import Control.Monad (forM_, when) import Data.AEq ((~==)) import Data.HashMap.Lazy (HashMap)