Copyright | Duncan Coutts 2008 |
---|---|
License | BSD3 |
Maintainer | cabal-devel@haskell.org |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data type for Haskell module names.
- newtype ModuleName = ModuleName ShortTextLst
- fromString :: IsString a => String -> a
- fromComponents :: [String] -> ModuleName
- components :: ModuleName -> [String]
- toFilePath :: ModuleName -> FilePath
- main :: ModuleName
- simple :: String -> ModuleName
- validModuleComponent :: String -> Bool
Documentation
newtype ModuleName #
A valid Haskell module name.
ModuleName ShortTextLst |
Eq ModuleName # | |
Data ModuleName # | |
Ord ModuleName # | |
Read ModuleName # | |
Show ModuleName # | |
IsString ModuleName # | Construct a This is just a convenience function intended for valid module strings. It is
an error if it is used with a string that is not a valid module name. If you
are parsing user input then use |
Generic ModuleName # | |
Binary ModuleName # | |
NFData ModuleName # | |
Pretty ModuleName # | |
Parsec ModuleName # | |
Text ModuleName # | |
ModSubst (Set ModuleName) # | |
type Rep ModuleName # | |
fromString :: IsString a => String -> a #
fromComponents :: [String] -> ModuleName #
Construct a ModuleName
from valid module components, i.e. parts
separated by dots.
components :: ModuleName -> [String] #
The individual components of a hierarchical module name. For example
components (fromString "A.B.C") = ["A", "B", "C"]
toFilePath :: ModuleName -> FilePath #
Convert a module name to a file path, but without any file extension. For example:
toFilePath (fromString "A.B.C") = "A/B/C"
main :: ModuleName #
The module name Main
.
simple :: String -> ModuleName #
Deprecated: use ModuleName.fromString instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018).
Internal
validModuleComponent :: String -> Bool #