From 152055a19cf368439c8450040b68142f8e7d0346 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 13 Mar 2018 13:36:38 -0400 Subject: 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 --- compiler/utils/Binary.hs | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'compiler/utils/Binary.hs') diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index c3c8ae3ab7..447317ca47 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -79,14 +79,10 @@ import qualified Data.ByteString.Unsafe as BS import Data.IORef import Data.Char ( ord, chr ) import Data.Time -#if MIN_VERSION_base(4,10,0) import Type.Reflection import Type.Reflection.Unsafe import Data.Kind (Type) import GHC.Exts (TYPE, RuntimeRep(..), VecCount(..), VecElem(..)) -#else -import Data.Typeable -#endif import Control.Monad ( when ) import System.IO as IO import System.IO.Unsafe ( unsafeInterleaveIO ) @@ -610,7 +606,6 @@ instance Binary (Bin a) where -- ----------------------------------------------------------------------------- -- Instances for Data.Typeable stuff -#if MIN_VERSION_base(4,10,0) instance Binary TyCon where put_ bh tc = do put_ bh (tyConPackage tc) @@ -620,17 +615,7 @@ instance Binary TyCon where put_ bh (tyConKindRep tc) get bh = mkTyCon <$> get bh <*> get bh <*> get bh <*> get bh <*> get bh -#else -instance Binary TyCon where - put_ bh tc = do - put_ bh (tyConPackage tc) - put_ bh (tyConModule tc) - put_ bh (tyConName tc) - get bh = - mkTyCon3 <$> get bh <*> get bh <*> get bh -#endif -#if MIN_VERSION_base(4,10,0) instance Binary VecCount where put_ bh = putByte bh . fromIntegral . fromEnum get bh = toEnum . fromIntegral <$> getByte bh @@ -781,17 +766,6 @@ instance Typeable a => Binary (TypeRep (a :: k)) where instance Binary SomeTypeRep where put_ bh (SomeTypeRep rep) = putTypeRep bh rep get = getSomeTypeRep -#else -instance Binary TypeRep where - put_ bh type_rep = do - let (ty_con, child_type_reps) = splitTyConApp type_rep - put_ bh ty_con - put_ bh child_type_reps - get bh = do - ty_con <- get bh - child_type_reps <- get bh - return (mkTyConApp ty_con child_type_reps) -#endif -- ----------------------------------------------------------------------------- -- Lazy reading/writing -- cgit v1.2.1