@@ -42,6 +42,7 @@ instance Binary ImportMethod where
4242 0 -> liftM As get
4343 1 -> liftM Importing get
4444 2 -> liftM Hiding get
45+ _ -> error "Error reading valid ImportMethod type from serialized string"
4546
4647data MetadataModule t v = MetadataModule {
4748 names :: [String],
@@ -83,6 +84,10 @@ instance Binary ModuleInterface where
8384
8485instance Binary Assoc where
8586 get = do n <- getWord8
86− return $ case n of { 0 -> L ; 1 -> N ; 2 -> R }
87+ return $ case n of
88+ 0 -> L
89+ 1 -> N
90+ 2 -> R
91+ _ -> error "Error reading valid associativity from serialized string"
8792
8893 put assoc = putWord8 $ case assoc of { L -> 0 ; N -> 1 ; R -> 2 }