summaryrefslogtreecommitdiffhomepage
path: root/Val.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Val.hs')
-rw-r--r--Val.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Val.hs b/Val.hs
index f024b9d..d010a2a 100644
--- a/Val.hs
+++ b/Val.hs
@@ -9,8 +9,8 @@ module Val where
import Memory
import JSON
+import qualified GHC.Generics as G
-import GHC.Generics (Generic)
import Data.Aeson.Types
import qualified Codec.Binary.Base64 as B64
import qualified Data.Text as T
@@ -20,7 +20,7 @@ import qualified Data.Semigroup as Sem
-- | Newtype of ByteString so we can have JSON instances without orphans.
newtype Val = Val { val :: B.ByteString }
- deriving (Show, Generic, Eq, Sem.Semigroup, Monoid)
+ deriving (Show, G.Generic, Eq, Sem.Semigroup, Monoid)
instance DataSize Val where
dataSize (Val b) = fromIntegral (B.length b)
@@ -42,7 +42,7 @@ instance FromJSON Val where
b64 :: B.ByteString -> T.Text
b64 = T.decodeUtf8 . B64.encode
-unb64 :: Monad m => T.Text -> m B.ByteString
+unb64 :: MonadFail m => T.Text -> m B.ByteString
unb64 t = either
(\_ -> fail "bad base64 data")
return