summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--influxdb.cabal6
-rw-r--r--src/Database/InfluxDB/Format.hs8
3 files changed, 15 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 616c9ce..778597f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,7 @@
-## TBD
+## v1.1.2 - 2017-04-10
+
+* Tighten lower version bound for base [#43](https://github.com/maoe/influxdb-haskell/issues/43)
+* Add `Database.InfluxDB.Format.{string,byteString8}`
## v1.1.1 - 2017-03-29
diff --git a/influxdb.cabal b/influxdb.cabal
index 14abbdf..68c8113 100644
--- a/influxdb.cabal
+++ b/influxdb.cabal
@@ -1,5 +1,5 @@
name: influxdb
-version: 1.1.1
+version: 1.1.2
synopsis: Haskell client library for InfluxDB
description: Haskell client library for InfluxDB
homepage: https://github.com/maoe/influxdb-haskell
@@ -63,7 +63,7 @@ library
ViewPatterns
ghc-options: -Wall
build-depends:
- base >= 4 && < 4.10
+ base >= 4.8 && < 4.10
, aeson >= 0.7 && < 1.2
, attoparsec < 0.14
, bytestring >= 0.10 && < 0.11
@@ -150,5 +150,5 @@ source-repository head
source-repository this
type: git
- tag: v1.1.1
+ tag: v1.1.2
location: https://github.com/maoe/influxdb-haskell.git
diff --git a/src/Database/InfluxDB/Format.hs b/src/Database/InfluxDB/Format.hs
index 42d8c7e..38623b6 100644
--- a/src/Database/InfluxDB/Format.hs
+++ b/src/Database/InfluxDB/Format.hs
@@ -20,6 +20,8 @@ module Database.InfluxDB.Format
, decimal
, realFloat
, text
+ , string
+ , byteString8
, time
) where
import Control.Category
@@ -101,6 +103,12 @@ realFloat = makeFormat TL.realFloat
text :: Format r (T.Text -> r)
text = makeFormat TL.fromText
+string :: Format r (String -> r)
+string = makeFormat TL.fromString
+
+byteString8 :: Format r (B.ByteString -> r)
+byteString8 = makeFormat $ TL.fromText . T.decodeUtf8
+
time :: FormatTime time => Format r (time -> r)
time = makeFormat $ \t ->
"'" <> TL.fromString (formatTime defaultTimeLocale fmt t) <> "'"