@@ -42,19 +42,21 @@ type Interfaces = Map.Map String ModuleInterface
4242type ADT = (String, [String], [(String,[Type])])
4343
4444data ModuleInterface = ModuleInterface {
45− iTypes :: Map.Map String Type,
46− iAdts :: [ADT]
45+ iTypes :: Map.Map String Type,
46+ iAdts :: [ADT],
47+ iAliases :: [(String, [String], Type)]
4748} deriving Show
4849
4950instance Binary ModuleInterface where
50− put modul = put (iTypes modul) >> put (iAdts modul)
51− get = ModuleInterface <$> get <*> get
51+ put modul = put (iTypes modul) >> put (iAdts modul) >> put (iAliases modul)
52+ get = ModuleInterface <$> get <*> get <*> get
5253
5354
5455canonicalize :: String -> [ImportMethod] -> ModuleInterface -> ModuleInterface
5556canonicalize prefix importMethods interface =
5657 ModuleInterface { iTypes = Map.unions (map iTypes ifaces)
57− , iAdts = concatMap iAdts ifaces }
58+ , iAdts = concatMap iAdts ifaces
59+ , iAliases = concatMap iAliases ifaces }
5860 where
5961 ifaces = map (canonicalizeHelp prefix interface) importMethods
6062
@@ -63,7 +65,8 @@ canonicalizeHelp :: String -> ModuleInterface -> ImportMethod -> ModuleInterface
6365canonicalizeHelp prefix interface importMethod =
6466 ModuleInterface {
6567 iTypes = renameNames $ Map.map (renameType rename) (iTypes interface),
66− iAdts = map renameADT (iAdts interface)
68+ iAdts = map renameADT (iAdts interface),
69+ iAliases = iAliases interface
6770 }
6871 where
6972 addPrefix name = prefix ++ "." ++ name