-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A command line program for extending the import list of a Haskell source file.
--
-- A command line program for extending the import list of a Haskell
-- source file.
@package hsimport
@version 0.5
module HsImport.Symbol
-- | What of the symbol should be imported.
data Symbol
-- | only the symbol should be imported
Symbol :: Name -> Symbol
-- | all constructors or methods of the symbol should be imported:
-- Symbol(..)
AllOfSymbol :: Name -> Symbol
-- | some constructors or methods of the symbol should be imported:
-- Symbol(X, Y)
SomeOfSymbol :: Name -> [String] -> Symbol
instance Show Symbol
module HsImport.Args
data HsImportArgs
HsImportArgs :: String -> String -> Bool -> [String] -> String -> FilePath -> FilePath -> HsImportArgs
moduleName :: HsImportArgs -> String
symbolName :: HsImportArgs -> String
all :: HsImportArgs -> Bool
with :: HsImportArgs -> [String]
qualifiedName :: HsImportArgs -> String
inputSrcFile :: HsImportArgs -> FilePath
outputSrcFile :: HsImportArgs -> FilePath
hsImportArgs :: IO HsImportArgs
defaultArgs :: HsImportArgs
instance Typeable HsImportArgs
instance Data HsImportArgs
instance Show HsImportArgs
instance Eq HsImportArgs
module HsImport.ImportSpec
data ImportSpec
ImportSpec :: FilePath -> Module -> String -> Maybe Symbol -> Maybe String -> Maybe FilePath -> ImportSpec
_sourceFile :: ImportSpec -> FilePath
_parsedSrcFile :: ImportSpec -> Module
_moduleToImport :: ImportSpec -> String
_symbolToImport :: ImportSpec -> Maybe Symbol
_qualifiedName :: ImportSpec -> Maybe String
_saveToFile :: ImportSpec -> Maybe FilePath
sourceFile :: Lens' ImportSpec FilePath
parsedSrcFile :: Lens' ImportSpec Module
moduleToImport :: Lens' ImportSpec String
symbolToImport :: Lens' ImportSpec (Maybe Symbol)
qualifiedName :: Lens' ImportSpec (Maybe String)
saveToFile :: Lens' ImportSpec (Maybe FilePath)
hsImportSpec :: HsImportArgs -> IO (Either Error ImportSpec)
instance Show ImportSpec
module HsImport.ImportPos
-- | Returns the position where the import declaration for the new import
-- should be put into the list of import declarations.
findImportPos :: ImportDecl -> [ImportDecl] -> Maybe ImportPos
-- | Where a new import declaration should be added.
data ImportPos
-- | before the specified import declaration
Before :: ImportDecl -> ImportPos
-- | after the specified import declaration
After :: ImportDecl -> ImportPos
-- | Returns all import declarations having the same module name.
matchingImports :: ModuleName -> [ImportDecl] -> [ImportDecl]
-- | 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.
bestMatchingImport :: ModuleName -> [ImportDecl] -> Maybe ImportDecl
instance Show ImportPos
instance Eq ImportPos
module HsImport.Config
-- | User definable configuration for hsImport.
data Config
Config :: (ImportDecl -> String) -> (ImportDecl -> [ImportDecl] -> Maybe ImportPos) -> Maybe String -> Config
-- | function for pretty printing of the import declarations
prettyPrint :: Config -> ImportDecl -> String
-- | function for finding the position of new import declarations
findImportPos :: Config -> ImportDecl -> [ImportDecl] -> Maybe ImportPos
-- | error during configuration of hsimport
configError :: Config -> Maybe String
defaultConfig :: Config
module HsImport.Main
hsimport :: Config -> IO ()
hsimport_ :: Config -> ImportSpec -> IO ()
module HsImport
-- | Where a new import declaration should be added.
data ImportPos
-- | before the specified import declaration
Before :: ImportDecl -> ImportPos
-- | after the specified import declaration
After :: ImportDecl -> ImportPos