Cabal-1.24.2.0: A framework for packaging Haskell software

CopyrightDuncan Coutts 2008
LicenseBSD3
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Distribution.ModuleName

Description

Data type for Haskell module names.

Synopsis

Documentation

data ModuleName #

A valid Haskell module name.

Instances

Eq ModuleName # 
Data ModuleName # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleName -> c ModuleName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleName #

toConstr :: ModuleName -> Constr #

dataTypeOf :: ModuleName -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ModuleName) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleName) #

gmapT :: (forall b. Data b => b -> b) -> ModuleName -> ModuleName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModuleName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

Ord ModuleName # 
Read ModuleName # 
Show ModuleName # 
Generic ModuleName # 

Associated Types

type Rep ModuleName :: * -> * #

Binary ModuleName # 
Text ModuleName # 
type Rep ModuleName # 
type Rep ModuleName = D1 (MetaData "ModuleName" "Distribution.ModuleName" "Cabal-1.24.2.0-De1ahvNF2IcJJcG0kSNo3w" True) (C1 (MetaCons "ModuleName" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))

fromString :: String -> ModuleName #

Construct a ModuleName from a valid module name String.

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 simpleParse instead.

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