stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Types.PackageName

Description

Names for packages.

Synopsis

- data PackageName
- data PackageNameParseFail
  - = PackageNameParseFail Text
  - | CabalFileNameParseFail FilePath
  - | CabalFileNameInvalidPackageName FilePath
- packageNameParser :: Parser PackageName
- parsePackageName :: MonadThrow m => Text -> m PackageName
- parsePackageNameFromString :: MonadThrow m => String -> m PackageName
- packageNameString :: PackageName -> String
- packageNameText :: PackageName -> Text
- fromCabalPackageName :: PackageName -> PackageName
- toCabalPackageName :: PackageName -> PackageName
- parsePackageNameFromFilePath :: MonadThrow m => Path a File -> m PackageName
- mkPackageName :: String -> Q Exp
- packageNameArgument :: Mod ArgumentFields PackageName -> Parser PackageName

# Documentation

data PackageName #

A package name.

Instances

Eq PackageName # |
Methods (==) :: PackageName -> PackageName -> Bool # (/=) :: PackageName -> PackageName -> Bool #
Data PackageName # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageName -> c PackageName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageName # toConstr :: PackageName -> Constr # dataTypeOf :: PackageName -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PackageName) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageName) # gmapT :: (forall b. Data b => b -> b) -> PackageName -> PackageName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageName -> r # gmapQ :: (forall d. Data d => d -> u) -> PackageName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageName -> m PackageName #
Ord PackageName # |
Methods compare :: PackageName -> PackageName -> Ordering # (<) :: PackageName -> PackageName -> Bool # (<=) :: PackageName -> PackageName -> Bool # (>) :: PackageName -> PackageName -> Bool # (>=) :: PackageName -> PackageName -> Bool # max :: PackageName -> PackageName -> PackageName # min :: PackageName -> PackageName -> PackageName #
Show PackageName # |
Methods showsPrec :: Int -> PackageName -> ShowS # show :: PackageName -> String # showList :: [PackageName] -> ShowS #
Generic PackageName # |
Associated Types type Rep PackageName :: * -> * # Methods from :: PackageName -> Rep PackageName x # to :: Rep PackageName x -> PackageName #
Lift PackageName # |
Methods lift :: PackageName -> Q Exp #
Hashable PackageName # |
Methods hashWithSalt :: Int -> PackageName -> Int # hash :: PackageName -> Int #
FromJSON PackageName # |
Methods parseJSON :: Value -> Parser PackageName # parseJSONList :: Value -> Parser [PackageName] #
FromJSONKey PackageName # |
Methods fromJSONKey :: FromJSONKeyFunction PackageName # fromJSONKeyList :: FromJSONKeyFunction [PackageName] #
ToJSON PackageName # |
Methods toJSON :: PackageName -> Value # toEncoding :: PackageName -> Encoding # toJSONList :: [PackageName] -> Value # toEncodingList :: [PackageName] -> Encoding #
ToJSONKey PackageName # |
Methods toJSONKey :: ToJSONKeyFunction PackageName # toJSONKeyList :: ToJSONKeyFunction [PackageName] #
NFData PackageName # |
Methods rnf :: PackageName -> () #
Store PackageName # |
Methods size :: Size PackageName # poke :: PackageName -> Poke () # peek :: Peek PackageName #
type Rep PackageName # |
type Rep PackageName = D1 (MetaData "PackageName" "Stack.Types.PackageName" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" True) (C1 (MetaCons "PackageName" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))
type Ann PackageName # |
type Ann PackageName = AnsiAnn
type Ann (PackageName, NamedComponent) # |
type Ann (PackageName, NamedComponent) = AnsiAnn

data PackageNameParseFail #

A parse fail.

Constructors

PackageNameParseFail Text |
CabalFileNameParseFail FilePath |
CabalFileNameInvalidPackageName FilePath |

Instances

Show PackageNameParseFail # |
Methods showsPrec :: Int -> PackageNameParseFail -> ShowS # show :: PackageNameParseFail -> String # showList :: [PackageNameParseFail] -> ShowS #
Exception PackageNameParseFail # |
Methods toException :: PackageNameParseFail -> SomeException # fromException :: SomeException -> Maybe PackageNameParseFail # displayException :: PackageNameParseFail -> String #

packageNameParser :: Parser PackageName #

Attoparsec parser for a package name

parsePackageName :: MonadThrow m => Text -> m PackageName #

Parse a package name from a `Text`.

parsePackageNameFromString :: MonadThrow m => String -> m PackageName #

Parse a package name from a `String`.

packageNameString :: PackageName -> String #

Produce a string representation of a package name.

packageNameText :: PackageName -> Text #

Produce a string representation of a package name.

fromCabalPackageName :: PackageName -> PackageName #

Convert from a Cabal package name.

toCabalPackageName :: PackageName -> PackageName #

Convert to a Cabal package name.

parsePackageNameFromFilePath :: MonadThrow m => Path a File -> m PackageName #

Parse a package name from a file path.

mkPackageName :: String -> Q Exp #

Make a package name.

packageNameArgument :: Mod ArgumentFields PackageName -> Parser PackageName #

An argument which accepts a template name of the format `foo.hsfiles`.