on master help sign in
Add binary instance for AST.Variable.Global
commitde5ba20b65c592b938583ae88ec6db878f38ccbb authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 28 Mar 2017, 14:56 (10 years ago) parentc0e1f3e
1 file changed+8
src/AST/Variable.hs+8
src/AST/Variable.hs+8
@@ -245,6 +245,14 @@ toText (Canonical home name) =
245245-- BINARY SERIALIZATION
246246
247247
248+instance Binary Global where
249+ put (Global home name) =
250+ put home >> put name
251+
252+ get =
253+ Global <$> get <*> get
254+
255+
248256instance Binary Canonical where
249257 put (Canonical home name) =
250258 case home of