Safe Haskell | None |
---|---|
Language | Haskell98 |
- findImportPos :: HsImportDecl -> [HsImportDecl] -> Maybe ImportPos
- data ImportPos
- matchingImports :: ModuleName -> [HsImportDecl] -> [HsImportDecl]
- bestMatchingImport :: ModuleName -> [HsImportDecl] -> Maybe HsImportDecl
Documentation
findImportPos :: HsImportDecl -> [HsImportDecl] -> Maybe ImportPos Source #
Returns the position where the import declaration for the new import should be put into the list of import declarations.
Where a new import declaration should be added.
matchingImports :: ModuleName -> [HsImportDecl] -> [HsImportDecl] Source #
Returns all import declarations having the same module name.
bestMatchingImport :: ModuleName -> [HsImportDecl] -> Maybe HsImportDecl Source #
Returns the best matching import declaration for the given module name. E.g. if the module name is Foo.Bar.Boo, then Foo.Bar is considered better matching than Foo.