git.iko.soy/distributed-process
on master help sign in
Whoos, missing files. Sorry.
commitec1ebfa0b495dbe547d62ea8a38dffab9b862648 authorEdsko de Vries <edsko@edsko.net> dateTue 26 Jun 2012, 19:18 (14 years ago) parent43b30a9
1 file changed+20
distributed-process/src/Control/Distributed/Process/Internal/TypeRep.hs+20
distributed-process/src/Control/Distributed/Process/Internal/TypeRep.hsnew file+20
@@ -0,0 +1,20 @@
1+{-# OPTIONS_GHC -fno-warn-orphans #-}
2+module Control.Distributed.Process.Internal.TypeRep () where
3+
4+import Control.Applicative ((<$>), (<*>))
5+import Data.Binary (Binary(get, put))
6+import Data.Typeable.Internal (TypeRep(..), TyCon(..))
7+import GHC.Fingerprint.Type (Fingerprint(..))
8+
9+instance Binary Fingerprint where
10+ put (Fingerprint hi lo) = put hi >> put lo
11+ get = Fingerprint <$> get <*> get
12+
13+instance Binary TypeRep where
14+ put (TypeRep fp tyCon ts) = put fp >> put tyCon >> put ts
15+ get = TypeRep <$> get <*> get <*> get
16+
17+instance Binary TyCon where
18+ put (TyCon hash package modul name) = put hash >> put package >> put modul >> put name
19+ get = TyCon <$> get <*> get <*> get <*> get
20+