summaryrefslogtreecommitdiff
path: root/src/Database/InfluxDB/Encode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Database/InfluxDB/Encode.hs')
-rw-r--r--src/Database/InfluxDB/Encode.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Database/InfluxDB/Encode.hs b/src/Database/InfluxDB/Encode.hs
index bd61df5..8b5f9b4 100644
--- a/src/Database/InfluxDB/Encode.hs
+++ b/src/Database/InfluxDB/Encode.hs
@@ -15,11 +15,11 @@ import qualified Data.Text.Lazy as TL
import Database.InfluxDB.Types
--- | A type that can be converted to a @Series@.
+-- | A type that can be converted to a 'Series'.
class ToSeries a where
toSeries :: a -> Series
--- | A type that can be converted to a @SeriesData@. A typical implementation is
+-- | A type that can be converted to a 'SeriesData'. A typical implementation is
-- as follows.
--
-- > import qualified Data.Vector as V
@@ -48,6 +48,9 @@ toSeriesData a = SeriesData
class ToValue a where
toValue :: a -> Value
+instance ToValue Value where
+ toValue = id
+
instance ToValue Bool where
toValue = Bool
@@ -79,9 +82,6 @@ instance ToValue Word16 where
instance ToValue Word32 where
toValue = Int . fromIntegral
-instance ToValue Float where
- toValue = Float . realToFrac
-
instance ToValue Double where
toValue = Float