on master help sign in
Throw an error when deserializing a bad type
a0cbe84Michael Sondergaard
compiler/SourceSyntax/Type.hs+2−1
@@ -93,4 +93,5 @@ instance Binary Type where
93 1 -> Var <$> get
93 1 -> Var <$> get
94 2 -> Data <$> get <*> get
94 2 -> Data <$> get <*> get
95 3 -> return EmptyRecord
95 3 -> return EmptyRecord
96− 4 -> Record <$> get <*> get
96+ 4 -> Record <$> get <*> get
97+ _ -> error "Error reading a valid type from serialized string"