diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-03-13 13:36:38 -0400 |
---|---|---|
committer | David Feuer <David.Feuer@gmail.com> | 2018-03-13 13:36:39 -0400 |
commit | 152055a19cf368439c8450040b68142f8e7d0346 (patch) | |
tree | a2f0c29eba5ce1552e8769c55b6406134f372499 /libraries/ghc-boot/GHC/Serialized.hs | |
parent | ba5797937e575ce6119de6c07703e90dda2557e8 (diff) | |
download | haskell-152055a19cf368439c8450040b68142f8e7d0346.tar.gz |
Drop GHC 8.0 compatibility
GHC 8.4.1 is out, so now GHC's support window only extends
back to GHC 8.2. This means we can delete gobs of code that were
only used for GHC 8.0 support. Hooray!
Test Plan: ./validate
Reviewers: bgamari, erikd, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: alexbiehl, dfeuer, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4492
Diffstat (limited to 'libraries/ghc-boot/GHC/Serialized.hs')
-rw-r--r-- | libraries/ghc-boot/GHC/Serialized.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libraries/ghc-boot/GHC/Serialized.hs b/libraries/ghc-boot/GHC/Serialized.hs index 161bbb31f7..ea5dba7624 100644 --- a/libraries/ghc-boot/GHC/Serialized.hs +++ b/libraries/ghc-boot/GHC/Serialized.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} @@ -34,16 +33,10 @@ toSerialized serialize what = Serialized (typeOf what) (serialize what) -- | If the 'Serialized' value contains something of the given type, then use the specified deserializer to return @Just@ that. -- Otherwise return @Nothing@. fromSerialized :: forall a. Typeable a => ([Word8] -> a) -> Serialized -> Maybe a -#if MIN_VERSION_base(4,10,0) fromSerialized deserialize (Serialized the_type bytes) | the_type == rep = Just (deserialize bytes) | otherwise = Nothing where rep = typeRep (Proxy :: Proxy a) -#else -fromSerialized deserialize (Serialized the_type bytes) - | the_type == typeOf (undefined :: a) = Just (deserialize bytes) - | otherwise = Nothing -#endif -- | Use a 'Data' instance to implement a serialization scheme dual to that of 'deserializeWithData' serializeWithData :: Data a => a -> [Word8] |