Skip to content

Commit

Permalink
Support GHC 8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
igrep authored and iphydf committed May 8, 2019
1 parent 04f316b commit 9d240fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Data/MessagePack.hs
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
--------------------------------------------------------------------
Expand Down Expand Up @@ -40,7 +41,11 @@ pack = encode . toObject

-- | Unpack MessagePack binary to a Haskell value. If it fails, it fails in the
-- Monad. In the Maybe monad, failure returns Nothing.
#if (MIN_VERSION_base(4,13,0))
unpack :: (Applicative m, Monad m, MonadFail m, MessagePack a)
#else
unpack :: (Applicative m, Monad m, MessagePack a)
#endif
=> L.ByteString -> m a
unpack = eitherToM . decodeOrFail >=> fromObject
where
Expand Down

0 comments on commit 9d240fe

Please sign in to comment.