Safe Haskell | Safe-Infered |
---|
- type BuildWrapper = StateT BuildWrapperState IO
- data BuildWrapperState = BuildWrapperState {}
- data BWNoteStatus
- data BWLocation = BWLocation {}
- data BWNote = BWNote {}
- isBWNoteError :: BWNote -> Bool
- type OpResult a = (a, [BWNote])
- data BuildResult = BuildResult Bool [FilePath]
- data WhichCabal
- data OutlineDefType
- data InFileLoc = InFileLoc {
- ifl_line :: Int
- ifl_column :: Int
- data InFileSpan = InFileSpan {}
- mkFileSpan :: Int -> Int -> Int -> Int -> InFileSpan
- data OutlineDef = OutlineDef {
- od_name :: Text
- od_type :: [OutlineDefType]
- od_loc :: InFileSpan
- od_children :: [OutlineDef]
- od_signature :: Maybe Text
- od_comment :: Maybe Text
- mkOutlineDef :: Text -> [OutlineDefType] -> InFileSpan -> OutlineDef
- mkOutlineDefWithChildren :: Text -> [OutlineDefType] -> InFileSpan -> [OutlineDef] -> OutlineDef
- data TokenDef = TokenDef {
- td_name :: Text
- td_loc :: InFileSpan
- data ImportExportType
- = IEVar
- | IEAbs
- | IEThingAll
- | IEThingWith
- | IEModule
- data ExportDef = ExportDef {
- e_name :: Text
- e_type :: ImportExportType
- e_loc :: InFileSpan
- e_children :: [Text]
- data ImportSpecDef = ImportSpecDef {
- is_name :: Text
- is_type :: ImportExportType
- is_loc :: InFileSpan
- is_children :: [Text]
- data ImportDef = ImportDef {
- i_module :: Text
- i_loc :: InFileSpan
- i_qualified :: Bool
- i_hiding :: Bool
- i_alias :: Text
- i_children :: Maybe [ImportSpecDef]
- data OutlineResult = OutlineResult {
- or_outline :: [OutlineDef]
- or_exports :: [ExportDef]
- or_imports :: [ImportDef]
- data BuildFlags = BuildFlags {
- bf_ast :: [String]
- bf_preproc :: [String]
- bf_modName :: Maybe String
- data ThingAtPoint = ThingAtPoint {}
- getFullTempDir :: BuildWrapper FilePath
- getDistDir :: BuildWrapper FilePath
- getTargetPath :: FilePath -> BuildWrapper FilePath
- canonicalizeFullPath :: FilePath -> BuildWrapper FilePath
- getFullSrc :: FilePath -> BuildWrapper FilePath
- copyFromMain :: Bool -> FilePath -> BuildWrapper (Maybe FilePath)
- fileToModule :: FilePath -> String
- data Verbosity
- data CabalComponent
- = CCLibrary {
- cc_buildable :: Bool
- | CCExecutable { }
- | CCTestSuite { }
- = CCLibrary {
- data CabalPackage = CabalPackage {
- cp_name :: String
- cp_version :: String
- cp_exposed :: Bool
- cp_dependent :: [CabalComponent]
- cp_modules :: [String]
- getRecursiveContents :: FilePath -> IO [FilePath]
- fromJustDebug :: String -> Maybe a -> a
- removeBaseDir :: FilePath -> String -> String
Documentation
type BuildWrapper = StateT BuildWrapperState IOSource
State type
data BWNoteStatus Source
status of notes: error or warning
data BWLocation Source
location of a note/error
a note on a source file
BWNote | |
|
isBWNoteError :: BWNote -> BoolSource
type OpResult a = (a, [BWNote])Source
simple type encapsulating the fact the operations return along with notes generated on files
data BuildResult Source
result: success + files impacted
data WhichCabal Source
which cabal file to use operations
data OutlineDefType Source
type of elements for the outline
Location inside a file, the file is known and doesn't need to be repeated
InFileLoc | |
|
data InFileSpan Source
Span inside a file, the file is known and doesn't need to be repeated
:: Int | start line |
-> Int | start column |
-> Int | end line |
-> Int | end column |
-> InFileSpan |
construct a file span
data OutlineDef Source
element of the outline result
OutlineDef | |
|
:: Text | name |
-> [OutlineDefType] | types: can have several to combine |
-> InFileSpan | span in source |
-> OutlineDef |
constructs an OutlineDef with no children and no type signature
mkOutlineDefWithChildrenSource
:: Text | name |
-> [OutlineDefType] | types: can have several to combine |
-> InFileSpan | span in source |
-> [OutlineDef] | children (constructors...) |
-> OutlineDef |
constructs an OutlineDef with children and no type signature
Lexer token
TokenDef | |
|
data ImportExportType Source
Type of import/export directive
IEVar | Var |
IEAbs | Abs |
IEThingAll | import/export everythin |
IEThingWith | specific import/export list |
IEModule | reexport module |
definition of export
ExportDef | |
|
data ImportSpecDef Source
definition of an import element
ImportSpecDef | |
|
definition of an import statement
ImportDef | |
|
data OutlineResult Source
complete result for outline
OutlineResult | |
|
data BuildFlags Source
build flags for a specific file
BuildFlags | |
|
getFullTempDir :: BuildWrapper FilePathSource
get the full path for the temporary directory
getDistDir :: BuildWrapper FilePathSource
get the full path for the temporary dist directory (where cabal will write its output)
:: FilePath | relative path of source file |
-> BuildWrapper FilePath |
get full path in temporary folder for source file (i.e. where we're going to write the temporary contents of an edited file)
:: FilePath | relative path of source file |
-> BuildWrapper FilePath |
get the full, canonicalized path of a source
:: FilePath | relative path of source file |
-> BuildWrapper FilePath |
get the full path of a source
:: Bool | copy even if temp file is newer |
-> FilePath | relative path of source file |
-> BuildWrapper (Maybe FilePath) | return Just the file if copied, Nothing if no copy was done |
copy a file from the normal folders to the temp folder
fileToModule :: FilePath -> StringSource
replace relative file path by module name
Verbosity settings
data CabalComponent Source
component in cabal file
CCLibrary | library |
| |
CCExecutable | executable |
| |
CCTestSuite | test suite |
|
data CabalPackage Source
a cabal package
CabalPackage | |
|
getRecursiveContents :: FilePath -> IO [FilePath]Source
http:book.realworldhaskell.orgreadio-case-study-a-library-for-searching-the-filesystem.html
fromJustDebug :: String -> Maybe a -> aSource
debug method: fromJust with a message to display when we get Nothing
removeBaseDir :: FilePath -> String -> StringSource
remove a base directory from a string representing a full path