Safe Haskell | None |
---|---|
Language | Haskell2010 |
Valid Haskell qualified module names.
- newtype ModuleName = ModuleName {
- unModuleName :: Text
- toModulePath :: ModuleName -> Text
- mainModule :: ModuleName
- checkModuleName :: ModuleName -> Either Text ModuleName
- fromModuleName :: Text -> Maybe ModuleName
- isModulePath :: Text -> Bool
- fromModulePath :: Text -> Maybe ModuleName
Documentation
newtype ModuleName Source
toModulePath :: ModuleName -> Text Source
fromModuleName :: Text -> Maybe ModuleName Source
Parses normal modules, or main modules with an additional filepath.
isModulePath :: Text -> Bool Source
Determine if the given textual FilePath
might be a valid module path.
fromModulePath :: Text -> Maybe ModuleName Source
Guesses a module name from a path, assuming that it ends in ".hs", and
every path component is a component of the name. Should be the inverse
of toModulePath
(other than the Just
).