summaryrefslogtreecommitdiff
path: root/compiler/main/Annotations.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/Annotations.hs')
-rw-r--r--compiler/main/Annotations.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/main/Annotations.hs b/compiler/main/Annotations.hs
index 82d80aae43..4088d93565 100644
--- a/compiler/main/Annotations.hs
+++ b/compiler/main/Annotations.hs
@@ -41,6 +41,10 @@ data Annotation = Annotation {
ann_value :: AnnPayload
}
+instance Binary Annotation where
+ put_ bh (Annotation f1 f2) = put_ bh f1 >> put_ bh f2
+ get bh = Annotation <$> get bh <*> get bh
+
type AnnPayload = Serialized -- ^ The "payload" of an annotation
-- allows recovery of its value at a given type,
-- and can be persisted to an interface file