-- namespaces and names are in reverse order (e.g ["InterfaceName", "InnerNamespace", "OuterNamespace"])
findInterfaces :: [String] -> AST.SliceDecl -> Map.Map [String] AST.SliceDecl
findInterfaces ns (ModuleDecl (Ident nm) decls)    = Map.unions $ map (findInterfaces (nm:ns)) decls
findInterfaces :: [String] -> AST.SliceDecl -> Map.Map [String] AST.SliceDecl
findInterfaces ns (ModuleDecl (Ident nm) decls)    = Map.unions $ map (findInterfaces (nm:ns)) decls
findInterfaces ns (ModuleDecl (Ident nm) decls)    = Map.unions $ map (findInterfaces (nm:ns)) decls