Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.DocTest.Internal.Extract
Synopsis
- data Module a = Module {
- moduleName :: String
- moduleSetup :: Maybe a
- moduleContent :: [a]
- moduleConfig :: [Located String]
- isEmptyModule :: Module a -> Bool
- extract :: String -> Ghc (Module (Located String))
- extractIO :: [String] -> String -> IO (Module (Located String))
- eraseConfigLocation :: Module a -> Module a
Documentation
Documentation for a module grouped together with the modules name.
Constructors
Module | |
Fields
|
Instances
Functor Module Source # | |
Generic (Module a) Source # | |
Show a => Show (Module a) Source # | |
NFData a => NFData (Module a) Source # | |
Defined in Test.DocTest.Internal.Extract | |
Eq a => Eq (Module a) Source # | |
type Rep (Module a) Source # | |
Defined in Test.DocTest.Internal.Extract type Rep (Module a) = D1 ('MetaData "Module" "Test.DocTest.Internal.Extract" "doctest-parallel-0.4-inplace" 'False) (C1 ('MetaCons "Module" 'PrefixI 'True) ((S1 ('MetaSel ('Just "moduleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "moduleSetup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))) :*: (S1 ('MetaSel ('Just "moduleContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]) :*: S1 ('MetaSel ('Just "moduleConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Located String])))) |
isEmptyModule :: Module a -> Bool Source #
extract :: String -> Ghc (Module (Located String)) Source #
Extract all docstrings from given list of files/modules.
This includes the docstrings of all local modules that are imported from those modules (possibly indirect).
Can throw ExtractError
if an error occurs while extracting the docstrings,
or a SourceError
if an error occurs while parsing the module. Can throw a
ModuleNotFoundError
if a module's source file cannot be found.
eraseConfigLocation :: Module a -> Module a Source #