summaryrefslogtreecommitdiff
path: root/libraries/ghc-boot/GHC
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-02-19 10:07:56 -0500
committerBen Gamari <ben@smart-cactus.org>2017-02-20 13:33:12 -0500
commit27a2854124cc1c101570104501beea234a4ee921 (patch)
tree470e0ed56b5673cac31dca4ce752279dac50c07d /libraries/ghc-boot/GHC
parent8dd4e3bbbaa3a262c45368985a575e970f7b7fe3 (diff)
downloadhaskell-27a2854124cc1c101570104501beea234a4ee921.tar.gz
A number of Typeable wibbles from review
I forgot to fold these in to the patch merged earlier.
Diffstat (limited to 'libraries/ghc-boot/GHC')
-rw-r--r--libraries/ghc-boot/GHC/Serialized.hs4
1 files changed, 1 insertions, 3 deletions
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@.