From 27a2854124cc1c101570104501beea234a4ee921 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 19 Feb 2017 10:07:56 -0500 Subject: A number of Typeable wibbles from review I forgot to fold these in to the patch merged earlier. --- libraries/ghc-boot/GHC/Serialized.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libraries/ghc-boot/GHC') diff --git a/libraries/ghc-boot/GHC/Serialized.hs b/libraries/ghc-boot/GHC/Serialized.hs index 42a9604c08..161bbb31f7 100644 --- a/libraries/ghc-boot/GHC/Serialized.hs +++ b/libraries/ghc-boot/GHC/Serialized.hs @@ -29,9 +29,7 @@ data Serialized = Serialized TypeRep [Word8] -- | Put a Typeable value that we are able to actually turn into bytes into a 'Serialized' value ready for deserialization later toSerialized :: forall a. Typeable a => (a -> [Word8]) -> a -> Serialized -toSerialized serialize what = Serialized rep (serialize what) - where - rep = typeOf what +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@. -- cgit v1.2.1