@@ -41,11 +41,23 @@ type Interfaces = Map.Map String ModuleInterface
4141type ADT = (String, [String], [(String,[Type])])
4242
4343data ModuleInterface = ModuleInterface {
44− iTypes :: Map.Map String Type,
45− iAdts :: [ADT],
46− iAliases :: [(String, [String], Type)]
44+ iTypes :: Map.Map String Type,
45+ iAdts :: [ADT],
46+ iAliases :: [(String, [String], Type)],
47+ iFixities :: [(Assoc, Int, String)]
4748} deriving Show
4849
4950instance Binary ModuleInterface where
50− put modul = put (iTypes modul) >> put (iAdts modul) >> put (iAliases modul)
51− get = ModuleInterface <$> get <*> get <*> get
51+ get = ModuleInterface <$> get <*> get <*> get <*> get
52+ put modul = do
53+ put (iTypes modul)
54+ put (iAdts modul)
55+ put (iAliases modul)
56+ put (iFixities modul)
57+
58+
59+instance Binary Assoc where
60+ get = do n <- getWord8
61+ return $ case n of { 0 -> L ; 1 -> N ; 2 -> R }
62+
63+ put assoc = putWord8 $ case assoc of { L -> 0 ; N -> 1 ; R -> 2 }