Copyright | Duncan Coutts 2008 |
---|---|
License | BSD3 |
Maintainer | cabal-devel@haskell.org |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data type for Haskell module names.
Synopsis
- data ModuleName
- fromString :: IsString a => String -> a
- fromComponents :: [String] -> ModuleName
- components :: ModuleName -> [String]
- toFilePath :: ModuleName -> FilePath
- main :: ModuleName
- validModuleComponent :: String -> Bool
Documentation
data ModuleName Source #
A valid Haskell module name.
Instances
fromString :: IsString a => String -> a #
fromComponents :: [String] -> ModuleName Source #
Deprecated: Exists for cabal-install only
Construct a ModuleName
from valid module components, i.e. parts
separated by dots.
components :: ModuleName -> [String] Source #
The individual components of a hierarchical module name. For example
components (fromString "A.B.C") = ["A", "B", "C"]
toFilePath :: ModuleName -> FilePath Source #
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 Source #
The module name Main
.
Internal
validModuleComponent :: String -> Bool Source #