stack-3.1.1: The Haskell Tool Stack
Safe HaskellNone
LanguageGHC2021

Stack.Prelude

Synopsis

Documentation

withSystemTempDir :: MonadUnliftIO m => String -> (Path Abs Dir -> m a) -> m a Source #

Path version

withKeepSystemTempDir :: MonadUnliftIO m => String -> (Path Abs Dir -> m a) -> m a Source #

Like withSystemTempDir, but the temporary directory is not deleted.

sinkProcessStderrStdout Source #

Arguments

:: forall e o env. (HasProcessContext env, HasLogFunc env, HasCallStack) 
=> String

Command

-> [String]

Command line arguments

-> ConduitM ByteString Void (RIO env) e

Sink for stderr

-> ConduitM ByteString Void (RIO env) o

Sink for stdout

-> RIO env (e, o) 

Consume the stdout and stderr of a process feeding strict ByteStrings to the consumers.

Throws a ReadProcessException if unsuccessful in launching, or ExitCodeException if the process itself fails.

sinkProcessStdout Source #

Arguments

:: (HasProcessContext env, HasLogFunc env, HasCallStack) 
=> String

Command

-> [String]

Command line arguments

-> ConduitM ByteString Void (RIO env) a

Sink for stdout

-> RIO env a 

Consume the stdout of a process feeding strict ByteStrings to a consumer. If the process fails, spits out stdout and stderr as error log level. Should not be used for long-running processes or ones with lots of output; for that use sinkProcessStderrStdout.

Throws a ReadProcessException if unsuccessful.

logProcessStderrStdout :: (HasCallStack, HasProcessContext env, HasLogFunc env) => ProcessConfig stdin stdoutIgnored stderrIgnored -> RIO env () Source #

readProcessNull Source #

Arguments

:: (HasProcessContext env, HasLogFunc env, HasCallStack) 
=> String

Command

-> [String]

Command line arguments

-> RIO env () 

Read from the process, ignoring any output.

Throws a ReadProcessException exception if the process fails.

withProcessContext :: HasProcessContext env => ProcessContext -> RIO env a -> RIO env a Source #

Use the new ProcessContext, but retain the working directory from the parent environment.

stripCR :: Text -> Text Source #

Remove a trailing carriage pure if present

prompt :: MonadIO m => Text -> m Text Source #

Prompt the user by sending text to stdout, and taking a line of input from stdin.

promptPassword :: MonadIO m => Text -> m Text Source #

Prompt the user by sending text to stdout, and collecting a line of input from stdin. While taking input from stdin, input echoing is disabled, to hide passwords.

Based on code from cabal-install, Distribution.Client.Upload

promptBool :: MonadIO m => Text -> m Bool Source #

Prompt the user by sending text to stdout, and collecting a line of input from stdin. If something other than "y" or "n" is entered, then print a message indicating that "y" or "n" is expected, and ask again.

newtype FirstTrue Source #

Like First Bool, but the default is True.

Constructors

FirstTrue 

Fields

Instances

Instances details
Monoid FirstTrue Source # 
Instance details

Defined in Stack.Prelude

Semigroup FirstTrue Source # 
Instance details

Defined in Stack.Prelude

Show FirstTrue Source # 
Instance details

Defined in Stack.Prelude

Eq FirstTrue Source # 
Instance details

Defined in Stack.Prelude

Ord FirstTrue Source # 
Instance details

Defined in Stack.Prelude

fromFirstTrue :: FirstTrue -> Bool Source #

Get the Bool, defaulting to True

defaultFirstTrue :: FirstTrue -> Bool Source #

Helper for filling in default values

newtype FirstFalse Source #

Like First Bool, but the default is False.

Constructors

FirstFalse 

Fields

fromFirstFalse :: FirstFalse -> Bool Source #

Get the Bool, defaulting to False

defaultFirstFalse :: FirstFalse -> Bool Source #

Helper for filling in default values

writeBinaryFileAtomic :: MonadIO m => Path absrel File -> Builder -> m () Source #

Write a Builder to a file and atomically rename.

bugReport :: String -> String -> String Source #

Report a bug in Stack.

bugPrettyReport :: String -> StyleDoc -> StyleDoc Source #

Report a pretty bug in Stack.

blankLine :: StyleDoc #

A blank line.

putUtf8Builder :: MonadIO m => Utf8Builder -> m () Source #

Write a Utf8Builder to the standard output stream.

putBuilder :: MonadIO m => Builder -> m () Source #

Write a Builder to the standard output stream.

ppException :: SomeException -> StyleDoc #

Provide the prettiest available information about an exception.

prettyThrowIO :: (Exception e, MonadIO m, Pretty e) => e -> m a #

Synchronously throw the given exception as a PrettyException.

prettyThrowM :: (Exception e, MonadThrow m, Pretty e) => e -> m a #

Throw the given exception as a PrettyException, when the action is run in the monad m.

mcons :: Maybe a -> [a] -> [a] Source #

Maybe cons.

data MungedPackageId #

A simple pair of a MungedPackageName and Version. MungedPackageName is to MungedPackageId as PackageName is to PackageId. See MungedPackageName for more info.

Constructors

MungedPackageId 

Fields

Instances

Instances details
HasMungedPackageId MungedPackageId 
Instance details

Defined in Distribution.Package

Parsec MungedPackageId
>>> simpleParsec "foo-bar-0" :: Maybe MungedPackageId
Just (MungedPackageId {mungedName = MungedPackageName (PackageName "foo-bar") LMainLibName, mungedVersion = mkVersion [0]})
>>> simpleParsec "foo-bar" :: Maybe MungedPackageId
Just (MungedPackageId {mungedName = MungedPackageName (PackageName "foo-bar") LMainLibName, mungedVersion = mkVersion []})
>>> simpleParsec "z-foo-bar-z-baz-0" :: Maybe MungedPackageId
Just (MungedPackageId {mungedName = MungedPackageName (PackageName "foo-bar") (LSubLibName (UnqualComponentName "baz")), mungedVersion = mkVersion [0]})
>>> simpleParsec "foo-bar-0-0" :: Maybe MungedPackageId
Nothing
>>> simpleParsec "foo-bar.0" :: Maybe MungedPackageId
Nothing
>>> simpleParsec "foo-bar.4-2" :: Maybe MungedPackageId
Nothing
Instance details

Defined in Distribution.Types.MungedPackageId

Pretty MungedPackageId
>>> prettyShow $ MungedPackageId (MungedPackageName "servant" LMainLibName) (mkVersion [1,2,3])
"servant-1.2.3"
>>> prettyShow $ MungedPackageId (MungedPackageName "servant" (LSubLibName "lackey")) (mkVersion [0,1,2])
"z-servant-z-lackey-0.1.2"
Instance details

Defined in Distribution.Types.MungedPackageId

Structured MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Data MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Methods

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

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

toConstr :: MungedPackageId -> Constr #

dataTypeOf :: MungedPackageId -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Associated Types

type Rep MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

type Rep MungedPackageId = D1 ('MetaData "MungedPackageId" "Distribution.Types.MungedPackageId" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "MungedPackageId" 'PrefixI 'True) (S1 ('MetaSel ('Just "mungedName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MungedPackageName) :*: S1 ('MetaSel ('Just "mungedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))
Read MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Show MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Binary MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

NFData MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Methods

rnf :: MungedPackageId -> () #

Eq MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

Ord MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

type Rep MungedPackageId 
Instance details

Defined in Distribution.Types.MungedPackageId

type Rep MungedPackageId = D1 ('MetaData "MungedPackageId" "Distribution.Types.MungedPackageId" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "MungedPackageId" 'PrefixI 'True) (S1 ('MetaSel ('Just "mungedName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MungedPackageName) :*: S1 ('MetaSel ('Just "mungedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))

data MungedPackageName #

A combination of a package and component name used in various legacy interfaces, chiefly bundled with a version as MungedPackageId. It's generally better to use a UnitId to opaquely refer to some compilation/packing unit, but that doesn't always work, e.g. where a "name" is needed, in which case this can be used as a fallback.

Use mkMungedPackageName and unMungedPackageName to convert from/to a String.

In 3.0.0.0 representation was changed from opaque (string) to semantic representation.

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec MungedPackageName
>>> simpleParsec "servant" :: Maybe MungedPackageName
Just (MungedPackageName (PackageName "servant") LMainLibName)
>>> simpleParsec "z-servant-z-lackey" :: Maybe MungedPackageName
Just (MungedPackageName (PackageName "servant") (LSubLibName (UnqualComponentName "lackey")))
>>> simpleParsec "z-servant-zz" :: Maybe MungedPackageName
Just (MungedPackageName (PackageName "z-servant-zz") LMainLibName)
Instance details

Defined in Distribution.Types.MungedPackageName

Pretty MungedPackageName

Computes the package name for a library. If this is the public library, it will just be the original package name; otherwise, it will be a munged package name recording the original package name as well as the name of the internal library.

A lot of tooling in the Haskell ecosystem assumes that if something is installed to the package database with the package name foo, then it actually is an entry for the (only public) library in package foo. With internal packages, this is not necessarily true: a public library as well as arbitrarily many internal libraries may come from the same package. To prevent tools from getting confused in this case, the package name of these internal libraries is munged so that they do not conflict the public library proper. A particular case where this matters is ghc-pkg: if we don't munge the package name, the inplace registration will OVERRIDE a different internal library.

We munge into a reserved namespace, "z-", and encode both the component name and the package name of an internal library using the following format:

compat-pkg-name ::= "z-" package-name "-z-" library-name

where package-name and library-name have "-" ( "z" + ) "-" segments encoded by adding an extra "z".

When we have the public library, the compat-pkg-name is just the package-name, no surprises there!

>>> prettyShow $ MungedPackageName "servant" LMainLibName
"servant"
>>> prettyShow $ MungedPackageName "servant" (LSubLibName "lackey")
"z-servant-z-lackey"
Instance details

Defined in Distribution.Types.MungedPackageName

Structured MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Data MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Methods

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

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

toConstr :: MungedPackageName -> Constr #

dataTypeOf :: MungedPackageName -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Associated Types

type Rep MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

type Rep MungedPackageName = D1 ('MetaData "MungedPackageName" "Distribution.Types.MungedPackageName" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "MungedPackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 PackageName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LibraryName)))
Read MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Show MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Binary MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

NFData MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Methods

rnf :: MungedPackageName -> () #

Eq MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

Ord MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

type Rep MungedPackageName 
Instance details

Defined in Distribution.Types.MungedPackageName

type Rep MungedPackageName = D1 ('MetaData "MungedPackageName" "Distribution.Types.MungedPackageName" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "MungedPackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 PackageName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LibraryName)))

data LibraryName #

Instances

Instances details
Structured LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Data LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Methods

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

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

toConstr :: LibraryName -> Constr #

dataTypeOf :: LibraryName -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Associated Types

type Rep LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

type Rep LibraryName = D1 ('MetaData "LibraryName" "Distribution.Types.LibraryName" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "LMainLibName" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LSubLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)))
Read LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Show LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Binary LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

NFData LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Methods

rnf :: LibraryName -> () #

Eq LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

Ord LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

type Rep LibraryName 
Instance details

Defined in Distribution.Types.LibraryName

type Rep LibraryName = D1 ('MetaData "LibraryName" "Distribution.Types.LibraryName" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "LMainLibName" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LSubLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)))

module RIO

data Path b t #

Path of some base and type.

The type variables are:

  • b — base, the base location of the path; absolute or relative.
  • t — type, whether file or directory.

Internally is a string. The string can be of two formats only:

  1. File format: file.txt, foo/bar.txt, /foo/bar.txt
  2. Directory format: foo/, /foo/bar/

All directories end in a trailing separator. There are no duplicate path separators //, no .., no ./, no ~/, etc.

Instances

Instances details
(Typeable b, Typeable t) => Lift (Path b t :: Type) 
Instance details

Defined in Path.Internal.Posix

Methods

lift :: Quote m => Path b t -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Path b t -> Code m (Path b t) #

FromJSON (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSON (Path Abs File) 
Instance details

Defined in Path.Posix

FromJSON (Path Rel Dir) 
Instance details

Defined in Path.Posix

FromJSON (Path Rel File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel File) 
Instance details

Defined in Path.Posix

ToJSON (Path b t) 
Instance details

Defined in Path.Internal.Posix

Methods

toJSON :: Path b t -> Value #

toEncoding :: Path b t -> Encoding #

toJSONList :: [Path b t] -> Value #

toEncodingList :: [Path b t] -> Encoding #

omitField :: Path b t -> Bool #

ToJSONKey (Path b t) 
Instance details

Defined in Path.Internal.Posix

(Data b, Data t) => Data (Path b t) 
Instance details

Defined in Path.Internal.Posix

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Path b t -> c (Path b t) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Path b t) #

toConstr :: Path b t -> Constr #

dataTypeOf :: Path b t -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Path b t)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Path b t)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Path b t -> Path b t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Path b t -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Path b t -> r #

gmapQ :: (forall d. Data d => d -> u) -> Path b t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Path b t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Path b t -> m (Path b t) #

Generic (Path b t) 
Instance details

Defined in Path.Internal.Posix

Associated Types

type Rep (Path b t) 
Instance details

Defined in Path.Internal.Posix

type Rep (Path b t) = D1 ('MetaData "Path" "Path.Internal.Posix" "path-0.9.5-HDT6qWjSfoNGeSNzElrFAJ" 'True) (C1 ('MetaCons "Path" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

Methods

from :: Path b t -> Rep (Path b t) x #

to :: Rep (Path b t) x -> Path b t #

Show (Path b t)

Same as 'show . Path.toFilePath'.

The following property holds:

x == y ≡ show x == show y
Instance details

Defined in Path.Internal.Posix

Methods

showsPrec :: Int -> Path b t -> ShowS #

show :: Path b t -> String #

showList :: [Path b t] -> ShowS #

NFData (Path b t) 
Instance details

Defined in Path.Internal.Posix

Methods

rnf :: Path b t -> () #

Eq (Path b t)

String equality.

The following property holds:

show x == show y ≡ x == y
Instance details

Defined in Path.Internal.Posix

Methods

(==) :: Path b t -> Path b t -> Bool #

(/=) :: Path b t -> Path b t -> Bool #

Ord (Path b t)

String ordering.

The following property holds:

show x `compare` show y ≡ x `compare` y
Instance details

Defined in Path.Internal.Posix

Methods

compare :: Path b t -> Path b t -> Ordering #

(<) :: Path b t -> Path b t -> Bool #

(<=) :: Path b t -> Path b t -> Bool #

(>) :: Path b t -> Path b t -> Bool #

(>=) :: Path b t -> Path b t -> Bool #

max :: Path b t -> Path b t -> Path b t #

min :: Path b t -> Path b t -> Path b t #

Hashable (Path b t) 
Instance details

Defined in Path.Internal.Posix

Methods

hashWithSalt :: Int -> Path b t -> Int #

hash :: Path b t -> Int #

AnyPath (Path b Dir) 
Instance details

Defined in Path.IO

Associated Types

type AbsPath (Path b Dir) 
Instance details

Defined in Path.IO

type AbsPath (Path b Dir) = Path Abs Dir
type RelPath (Path b Dir) 
Instance details

Defined in Path.IO

type RelPath (Path b Dir) = Path Rel Dir
AnyPath (Path b File) 
Instance details

Defined in Path.IO

Associated Types

type AbsPath (Path b File) 
Instance details

Defined in Path.IO

type RelPath (Path b File) 
Instance details

Defined in Path.IO

Pretty (Path b Dir) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b Dir -> StyleDoc #

Pretty (Path b File) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b File -> StyleDoc #

type Rep (Path b t) 
Instance details

Defined in Path.Internal.Posix

type Rep (Path b t) = D1 ('MetaData "Path" "Path.Internal.Posix" "path-0.9.5-HDT6qWjSfoNGeSNzElrFAJ" 'True) (C1 ('MetaCons "Path" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))
type AbsPath (Path b Dir) 
Instance details

Defined in Path.IO

type AbsPath (Path b Dir) = Path Abs Dir
type AbsPath (Path b File) 
Instance details

Defined in Path.IO

type RelPath (Path b Dir) 
Instance details

Defined in Path.IO

type RelPath (Path b Dir) = Path Rel Dir
type RelPath (Path b File) 
Instance details

Defined in Path.IO

newtype First a #

Maybe monoid returning the leftmost non-Nothing value.

First a is isomorphic to Alt Maybe a, but precedes it historically.

Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

Examples

Expand
>>> First (Just "hello") <> First Nothing <> First (Just "world")
First {getFirst = Just "hello"}
>>> First Nothing <> mempty
First {getFirst = Nothing}

Constructors

First 

Fields

Instances

Instances details
FromJSON1 First 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (First a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [First a] #

liftOmittedField :: Maybe a -> Maybe (First a) #

ToJSON1 First 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> First a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [First a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> First a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [First a] -> Encoding #

liftOmitField :: (a -> Bool) -> First a -> Bool #

MonadFix First

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> First a) -> First a #

MonadZip First

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: First a -> First b -> First (a, b) #

mzipWith :: (a -> b -> c) -> First a -> First b -> First c #

munzip :: First (a, b) -> (First a, First b) #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () #

GFoldable First 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> First a -> m #

gfold :: Monoid m => First m -> m #

gfoldr :: (a -> b -> b) -> b -> First a -> b #

gfoldr' :: (a -> b -> b) -> b -> First a -> b #

gfoldl :: (a -> b -> a) -> a -> First b -> a #

gfoldl' :: (a -> b -> a) -> a -> First b -> a #

gfoldr1 :: (a -> a -> a) -> First a -> a #

gfoldl1 :: (a -> a -> a) -> First a -> a #

GFunctor First 
Instance details

Defined in Generics.Deriving.Functor

Methods

gmap :: (a -> b) -> First a -> First b #

GTraversable First 
Instance details

Defined in Generics.Deriving.Traversable

Methods

gtraverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

gsequenceA :: Applicative f => First (f a) -> f (First a) #

gmapM :: Monad m => (a -> m b) -> First a -> m (First b) #

gsequence :: Monad m => First (m a) -> m (First a) #

Generic1 First 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 First = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))

Methods

from1 :: First a -> Rep1 First a #

to1 :: Rep1 First a -> First a #

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data a => Data (First a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: First a -> Constr #

dataTypeOf :: First a -> DataType #

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

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

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

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

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

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

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

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

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

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

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (First a) = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Binary a => Binary (First a)

Since: binary-0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: First a -> Put #

get :: Get (First a) #

putList :: [First a] -> Put #

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

GEnum a => GEnum (First a) 
Instance details

Defined in Generics.Deriving.Enum

Methods

genum :: [First a] #

(GEq a, GEnum a, GIx a) => GIx (First a) 
Instance details

Defined in Generics.Deriving.Enum

Methods

range :: (First a, First a) -> [First a] #

index :: (First a, First a) -> First a -> Int #

inRange :: (First a, First a) -> First a -> Bool #

GEq a => GEq (First a) 
Instance details

Defined in Generics.Deriving.Eq

Methods

geq :: First a -> First a -> Bool #

GMonoid (First a) 
Instance details

Defined in Generics.Deriving.Monoid.Internal

Methods

gmempty :: First a #

gmappend :: First a -> First a -> First a #

gmconcat :: [First a] -> First a #

GShow a => GShow (First a) 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> First a -> ShowS #

gshows :: First a -> ShowS #

gshow :: First a -> String #

gshowList :: [First a] -> ShowS #

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

FromHttpApiData a => FromHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData a => ToHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

type Rep1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 First = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))
type Rep (First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (First a) = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

data Version #

A Version represents the version of a software entity.

Instances of Eq and Ord are provided, which gives exact equality and lexicographic ordering of the version number components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).

This type is opaque and distinct from the Version type in Data.Version since Cabal-2.0. The difference extends to the Binary instance using a different (and more compact) encoding.

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec Version 
Instance details

Defined in Distribution.Types.Version

Methods

parsec :: CabalParsing m => m Version #

Pretty Version 
Instance details

Defined in Distribution.Types.Version

Structured Version 
Instance details

Defined in Distribution.Types.Version

Data Version 
Instance details

Defined in Distribution.Types.Version

Methods

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

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

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic Version 
Instance details

Defined in Distribution.Types.Version

Associated Types

type Rep Version 
Instance details

Defined in Distribution.Types.Version

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Read Version 
Instance details

Defined in Distribution.Types.Version

Show Version 
Instance details

Defined in Distribution.Types.Version

Binary Version 
Instance details

Defined in Distribution.Types.Version

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

NFData Version 
Instance details

Defined in Distribution.Types.Version

Methods

rnf :: Version -> () #

Eq Version 
Instance details

Defined in Distribution.Types.Version

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Ord Version 
Instance details

Defined in Distribution.Types.Version

IsCabalString Version 
Instance details

Defined in Pantry.Types

type Rep Version 
Instance details

Defined in Distribution.Types.Version

data PackageName #

A package name.

Use mkPackageName and unPackageName to convert from/to a String.

This type is opaque since Cabal-2.0

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

parsec :: CabalParsing m => m PackageName #

Pretty PackageName 
Instance details

Defined in Distribution.Types.PackageName

Structured PackageName 
Instance details

Defined in Distribution.Types.PackageName

Data PackageName 
Instance details

Defined in Distribution.Types.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 :: forall r r'. (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 #

IsString PackageName

mkPackageName

Since: Cabal-syntax-2.0.0.2

Instance details

Defined in Distribution.Types.PackageName

Generic PackageName 
Instance details

Defined in Distribution.Types.PackageName

Associated Types

type Rep PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.10.3.0-dc3a" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))
Read PackageName 
Instance details

Defined in Distribution.Types.PackageName

Show PackageName 
Instance details

Defined in Distribution.Types.PackageName

Binary PackageName 
Instance details

Defined in Distribution.Types.PackageName

NFData PackageName 
Instance details

Defined in Distribution.Types.PackageName

Methods

rnf :: PackageName -> () #

Eq PackageName 
Instance details

Defined in Distribution.Types.PackageName

Ord PackageName 
Instance details

Defined in Distribution.Types.PackageName

IsCabalString PackageName 
Instance details

Defined in Pantry.Types

type Rep PackageName 
Instance details

Defined in Distribution.Types.PackageName

type Rep PackageName = D1 ('MetaData "PackageName" "Distribution.Types.PackageName" "Cabal-syntax-3.10.3.0-dc3a" 'True) (C1 ('MetaCons "PackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

data PackageIdentifier #

The name and version of a package.

Constructors

PackageIdentifier 

Fields

Instances

Instances details
Package PackageIdentifier 
Instance details

Defined in Distribution.Package

Parsec PackageIdentifier
>>> simpleParsec "foo-bar-0" :: Maybe PackageIdentifier
Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion [0]})
>>> simpleParsec "foo-bar" :: Maybe PackageIdentifier
Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion []})

Note: Stricter than Text instance

>>> simpleParsec "foo-bar-0-0" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "foo-bar.0" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "foo-bar.4-2" :: Maybe PackageIdentifier
Nothing
>>> simpleParsec "1.2.3" :: Maybe PackageIdentifier
Nothing
Instance details

Defined in Distribution.Types.PackageId

Pretty PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Structured PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Data PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

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

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

toConstr :: PackageIdentifier -> Constr #

dataTypeOf :: PackageIdentifier -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Associated Types

type Rep PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier = D1 ('MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "PackageIdentifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageName) :*: S1 ('MetaSel ('Just "pkgVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))
Read PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Show PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Binary PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

NFData PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Methods

rnf :: PackageIdentifier -> () #

Eq PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

Ord PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

IsCabalString PackageIdentifier 
Instance details

Defined in Pantry.Types

type Rep PackageIdentifier 
Instance details

Defined in Distribution.Types.PackageId

type Rep PackageIdentifier = D1 ('MetaData "PackageIdentifier" "Distribution.Types.PackageId" "Cabal-syntax-3.10.3.0-dc3a" 'False) (C1 ('MetaCons "PackageIdentifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageName) :*: S1 ('MetaSel ('Just "pkgVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))

newtype Any #

Boolean monoid under disjunction (||).

Any x <> Any y = Any (x || y)

Examples

Expand
>>> Any True <> mempty <> Any False
Any {getAny = True}
>>> mconcat (map (\x -> Any (even x)) [2,4,6,7,8])
Any {getAny = True}
>>> Any False <> mempty
Any {getAny = False}

Constructors

Any 

Fields

Instances

Instances details
FromJSON Any

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Any

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Data Any

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Any -> Constr #

dataTypeOf :: Any -> DataType #

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

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

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

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

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

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

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

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

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

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

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep Any = D1 ('MetaData "Any" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Any" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAny") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Binary Any

Since: binary-0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Any -> Put #

get :: Get Any #

putList :: [Any] -> Put #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () #

GEnum Any 
Instance details

Defined in Generics.Deriving.Enum

Methods

genum :: [Any] #

GIx Any 
Instance details

Defined in Generics.Deriving.Enum

Methods

range :: (Any, Any) -> [Any] #

index :: (Any, Any) -> Any -> Int #

inRange :: (Any, Any) -> Any -> Bool #

GEq Any 
Instance details

Defined in Generics.Deriving.Eq

Methods

geq :: Any -> Any -> Bool #

GMonoid Any 
Instance details

Defined in Generics.Deriving.Monoid.Internal

Methods

gmempty :: Any #

gmappend :: Any -> Any -> Any #

gmconcat :: [Any] -> Any #

GShow Any 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Any -> ShowS #

gshows :: Any -> ShowS #

gshow :: Any -> String #

gshowList :: [Any] -> ShowS #

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Any -> Any -> Bool #

(/=) :: Any -> Any -> Bool #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

(>=) :: Any -> Any -> Bool #

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

FromHttpApiData Any 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Any 
Instance details

Defined in Web.Internal.HttpApiData

Unbox Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Vector Vector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep Any = D1 ('MetaData "Any" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Any" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAny") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
newtype Vector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Any = V_Any (Vector Bool)
newtype MVector s Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Any = MV_Any (MVector s Bool)

data RepoType #

Constructors

RepoGit 
RepoHg 

Instances

Instances details
Generic RepoType 
Instance details

Defined in Pantry.Types

Associated Types

type Rep RepoType 
Instance details

Defined in Pantry.Types

type Rep RepoType = D1 ('MetaData "RepoType" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RepoGit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RepoHg" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: RepoType -> Rep RepoType x #

to :: Rep RepoType x -> RepoType #

Show RepoType 
Instance details

Defined in Pantry.Types

NFData RepoType 
Instance details

Defined in Pantry.Types

Methods

rnf :: RepoType -> () #

Eq RepoType 
Instance details

Defined in Pantry.Types

Ord RepoType 
Instance details

Defined in Pantry.Types

PersistField RepoType 
Instance details

Defined in Pantry.Types

PersistFieldSql RepoType 
Instance details

Defined in Pantry.Types

SymbolToField "type" RepoCache RepoType 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField RepoCache RepoType #

type Rep RepoType 
Instance details

Defined in Pantry.Types

type Rep RepoType = D1 ('MetaData "RepoType" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RepoGit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RepoHg" 'PrefixI 'False) (U1 :: Type -> Type))

data Repo #

Constructors

Repo 

Instances

Instances details
Generic Repo 
Instance details

Defined in Pantry.Types

Associated Types

type Rep Repo 
Instance details

Defined in Pantry.Types

type Rep Repo = D1 ('MetaData "Repo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "Repo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "repoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "repoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "repoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType) :*: S1 ('MetaSel ('Just "repoSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

Methods

from :: Repo -> Rep Repo x #

to :: Rep Repo x -> Repo #

Show Repo 
Instance details

Defined in Pantry.Types

Methods

showsPrec :: Int -> Repo -> ShowS #

show :: Repo -> String #

showList :: [Repo] -> ShowS #

NFData Repo 
Instance details

Defined in Pantry.Types

Methods

rnf :: Repo -> () #

Eq Repo 
Instance details

Defined in Pantry.Types

Methods

(==) :: Repo -> Repo -> Bool #

(/=) :: Repo -> Repo -> Bool #

Ord Repo 
Instance details

Defined in Pantry.Types

Methods

compare :: Repo -> Repo -> Ordering #

(<) :: Repo -> Repo -> Bool #

(<=) :: Repo -> Repo -> Bool #

(>) :: Repo -> Repo -> Bool #

(>=) :: Repo -> Repo -> Bool #

max :: Repo -> Repo -> Repo #

min :: Repo -> Repo -> Repo #

Display Repo 
Instance details

Defined in Pantry.Types

type Rep Repo 
Instance details

Defined in Pantry.Types

type Rep Repo = D1 ('MetaData "Repo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "Repo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "repoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "repoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "repoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType) :*: S1 ('MetaSel ('Just "repoSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

data FlagName #

A FlagName is the name of a user-defined configuration flag

Use mkFlagName and unFlagName to convert from/to a String.

This type is opaque since Cabal-2.0

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec FlagName 
Instance details

Defined in Distribution.Types.Flag

Methods

parsec :: CabalParsing m => m FlagName #

Pretty FlagName 
Instance details

Defined in Distribution.Types.Flag

Structured FlagName 
Instance details

Defined in Distribution.Types.Flag

Data FlagName 
Instance details

Defined in Distribution.Types.Flag

Methods

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

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

toConstr :: FlagName -> Constr #

dataTypeOf :: FlagName -> DataType #

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

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

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

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

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

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

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

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

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

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

IsString FlagName

mkFlagName

Since: Cabal-syntax-2.0.0.2

Instance details

Defined in Distribution.Types.Flag

Generic FlagName 
Instance details

Defined in Distribution.Types.Flag

Associated Types

type Rep FlagName 
Instance details

Defined in Distribution.Types.Flag

type Rep FlagName = D1 ('MetaData "FlagName" "Distribution.Types.Flag" "Cabal-syntax-3.10.3.0-dc3a" 'True) (C1 ('MetaCons "FlagName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

Methods

from :: FlagName -> Rep FlagName x #

to :: Rep FlagName x -> FlagName #

Read FlagName 
Instance details

Defined in Distribution.Types.Flag

Show FlagName 
Instance details

Defined in Distribution.Types.Flag

Binary FlagName 
Instance details

Defined in Distribution.Types.Flag

Methods

put :: FlagName -> Put #

get :: Get FlagName #

putList :: [FlagName] -> Put #

NFData FlagName 
Instance details

Defined in Distribution.Types.Flag

Methods

rnf :: FlagName -> () #

Eq FlagName 
Instance details

Defined in Distribution.Types.Flag

Ord FlagName 
Instance details

Defined in Distribution.Types.Flag

IsCabalString FlagName 
Instance details

Defined in Pantry.Types

type Rep FlagName 
Instance details

Defined in Distribution.Types.Flag

type Rep FlagName = D1 ('MetaData "FlagName" "Distribution.Types.Flag" "Cabal-syntax-3.10.3.0-dc3a" 'True) (C1 ('MetaCons "FlagName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

toFilePath :: Path b t -> FilePath #

Convert to a FilePath type.

All directories have a trailing slash, so if you want no trailing slash, you can use dropTrailingPathSeparator from the filepath package.

newtype Sum a #

Monoid under addition.

Sum a <> Sum b = Sum (a + b)

Examples

Expand
>>> Sum 1 <> Sum 2 <> mempty
Sum {getSum = 3}
>>> mconcat [ Sum n | n <- [3 .. 9]]
Sum {getSum = 42}

Constructors

Sum 

Fields

Instances

Instances details
FromJSON1 Sum

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Sum a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Sum a] #

liftOmittedField :: Maybe a -> Maybe (Sum a) #

ToJSON1 Sum

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Sum a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Sum a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Sum a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Sum a] -> Encoding #

liftOmitField :: (a -> Bool) -> Sum a -> Bool #

MonadFix Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

MonadZip Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Sum a -> Sum b -> Sum (a, b) #

mzipWith :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

munzip :: Sum (a, b) -> (Sum a, Sum b) #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Foldable1 Sum

Since: base-4.18.0.0

Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Sum m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Sum a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Sum a -> m #

toNonEmpty :: Sum a -> NonEmpty a #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

head :: Sum a -> a #

last :: Sum a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b #

(<$) :: a -> Sum b -> Sum a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

(>>) :: Sum a -> Sum b -> Sum b #

return :: a -> Sum a #

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () #

GCopoint Sum 
Instance details

Defined in Generics.Deriving.Copoint

Methods

gcopoint :: Sum a -> a #

GFoldable Sum 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Sum a -> m #

gfold :: Monoid m => Sum m -> m #

gfoldr :: (a -> b -> b) -> b -> Sum a -> b #

gfoldr' :: (a -> b -> b) -> b -> Sum a -> b #

gfoldl :: (a -> b -> a) -> a -> Sum b -> a #

gfoldl' :: (a -> b -> a) -> a -> Sum b -> a #

gfoldr1 :: (a -> a -> a) -> Sum a -> a #

gfoldl1 :: (a -> a -> a) -> Sum a -> a #

GFunctor Sum 
Instance details

Defined in Generics.Deriving.Functor

Methods

gmap :: (a -> b) -> Sum a -> Sum b #

GTraversable Sum 
Instance details

Defined in Generics.Deriving.Traversable

Methods

gtraverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

gsequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

gmapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

gsequence :: Monad m => Sum (m a) -> m (Sum a) #

Generic1 Sum 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Sum = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

Methods

from1 :: Sum a -> Rep1 Sum a #

to1 :: Rep1 Sum a -> Sum a #

Newtype a (Sum a) 
Instance details

Defined in Distribution.Compat.Newtype

Methods

pack :: a -> Sum a #

unpack :: Sum a -> a #

Unbox a => Vector Vector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Sum a) -> ST s (Vector (Sum a)) #

basicUnsafeThaw :: Vector (Sum a) -> ST s (Mutable Vector s (Sum a)) #

basicLength :: Vector (Sum a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Sum a) -> Vector (Sum a) #

basicUnsafeIndexM :: Vector (Sum a) -> Int -> Box (Sum a) #

basicUnsafeCopy :: Mutable Vector s (Sum a) -> Vector (Sum a) -> ST s () #

elemseq :: Vector (Sum a) -> Sum a -> b -> b #

Unbox a => MVector MVector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Sum a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Sum a) -> MVector s (Sum a)

basicOverlaps :: MVector s (Sum a) -> MVector s (Sum a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Sum a))

basicInitialize :: MVector s (Sum a) -> ST s ()

basicUnsafeReplicate :: Int -> Sum a -> ST s (MVector s (Sum a))

basicUnsafeRead :: MVector s (Sum a) -> Int -> ST s (Sum a)

basicUnsafeWrite :: MVector s (Sum a) -> Int -> Sum a -> ST s ()

basicClear :: MVector s (Sum a) -> ST s ()

basicSet :: MVector s (Sum a) -> Sum a -> ST s ()

basicUnsafeCopy :: MVector s (Sum a) -> MVector s (Sum a) -> ST s ()

basicUnsafeMove :: MVector s (Sum a) -> MVector s (Sum a) -> ST s ()

basicUnsafeGrow :: MVector s (Sum a) -> Int -> ST s (MVector s (Sum a))

FromJSON a => FromJSON (Sum a)

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Sum a)

Since: aeson-2.2.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Sum a -> Value #

toEncoding :: Sum a -> Encoding #

toJSONList :: [Sum a] -> Value #

toEncodingList :: [Sum a] -> Encoding #

omitField :: Sum a -> Bool #

Data a => Data (Sum a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Sum a -> Constr #

dataTypeOf :: Sum a -> DataType #

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

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

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

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

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

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

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

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

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

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

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a #

maxBound :: Sum a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Sum a) = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Binary a => Binary (Sum a)

Since: binary-0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Sum a -> Put #

get :: Get (Sum a) #

putList :: [Sum a] -> Put #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () #

GEnum a => GEnum (Sum a) 
Instance details

Defined in Generics.Deriving.Enum

Methods

genum :: [Sum a] #

(GEq a, GEnum a, GIx a) => GIx (Sum a) 
Instance details

Defined in Generics.Deriving.Enum

Methods

range :: (Sum a, Sum a) -> [Sum a] #

index :: (Sum a, Sum a) -> Sum a -> Int #

inRange :: (Sum a, Sum a) -> Sum a -> Bool #

GEq a => GEq (Sum a) 
Instance details

Defined in Generics.Deriving.Eq

Methods

geq :: Sum a -> Sum a -> Bool #

Num a => GMonoid (Sum a) 
Instance details

Defined in Generics.Deriving.Monoid.Internal

Methods

gmempty :: Sum a #

gmappend :: Sum a -> Sum a -> Sum a #

gmconcat :: [Sum a] -> Sum a #

GShow a => GShow (Sum a) 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Sum a -> ShowS #

gshows :: Sum a -> ShowS #

gshow :: Sum a -> String #

gshowList :: [Sum a] -> ShowS #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Sum a -> Sum a -> Bool #

(/=) :: Sum a -> Sum a -> Bool #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

FromHttpApiData a => FromHttpApiData (Sum a) 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData a => ToHttpApiData (Sum a) 
Instance details

Defined in Web.Internal.HttpApiData

Unbox a => Unbox (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Sum = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Sum a) = MV_Sum (MVector s a)
type Rep (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Sum a) = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Sum a) = V_Sum (Vector a)

newtype Endo a #

The monoid of endomorphisms under composition.

Endo f <> Endo g == Endo (f . g)

Examples

Expand
>>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>> appEndo computation "Haskell"
"Hello, Haskell!"
>>> let computation = Endo (*3) <> Endo (+1)
>>> appEndo computation 1
6

Constructors

Endo 

Fields

Instances

Instances details
Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Endo a) = D1 ('MetaData "Endo" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Endo" 'PrefixI 'True) (S1 ('MetaSel ('Just "appEndo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> a))))

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

GMonoid (Endo a) 
Instance details

Defined in Generics.Deriving.Monoid.Internal

Methods

gmempty :: Endo a #

gmappend :: Endo a -> Endo a -> Endo a #

gmconcat :: [Endo a] -> Endo a #

Newtype (a -> a) (Endo a) 
Instance details

Defined in Distribution.Compat.Newtype

Methods

pack :: (a -> a) -> Endo a #

unpack :: Endo a -> a -> a #

type Rep (Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Endo a) = D1 ('MetaData "Endo" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Endo" 'PrefixI 'True) (S1 ('MetaSel ('Just "appEndo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> a))))

newtype FileSize #

Constructors

FileSize Word 

Instances

Instances details
FromJSON FileSize 
Instance details

Defined in Pantry.Types

ToJSON FileSize 
Instance details

Defined in Pantry.Types

Generic FileSize 
Instance details

Defined in Pantry.Types

Associated Types

type Rep FileSize 
Instance details

Defined in Pantry.Types

type Rep FileSize = D1 ('MetaData "FileSize" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "FileSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

Methods

from :: FileSize -> Rep FileSize x #

to :: Rep FileSize x -> FileSize #

Show FileSize 
Instance details

Defined in Pantry.Types

NFData FileSize 
Instance details

Defined in Pantry.Types

Methods

rnf :: FileSize -> () #

Eq FileSize 
Instance details

Defined in Pantry.Types

Ord FileSize 
Instance details

Defined in Pantry.Types

Hashable FileSize 
Instance details

Defined in Pantry.Types

Methods

hashWithSalt :: Int -> FileSize -> Int #

hash :: FileSize -> Int #

PersistField FileSize 
Instance details

Defined in Pantry.Types

PersistFieldSql FileSize 
Instance details

Defined in Pantry.Types

Display FileSize 
Instance details

Defined in Pantry.Types

SymbolToField "size" ArchiveCache FileSize 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField ArchiveCache FileSize #

SymbolToField "size" Blob FileSize 
Instance details

Defined in Pantry.Storage

SymbolToField "size" CacheUpdate FileSize 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField CacheUpdate FileSize #

SymbolToField "size" HackageTarball FileSize 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField HackageTarball FileSize #

type Rep FileSize 
Instance details

Defined in Pantry.Types

type Rep FileSize = D1 ('MetaData "FileSize" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "FileSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

data BlobKey #

Constructors

BlobKey !SHA256 !FileSize 

Instances

Instances details
FromJSON BlobKey 
Instance details

Defined in Pantry.Types

ToJSON BlobKey 
Instance details

Defined in Pantry.Types

Generic BlobKey 
Instance details

Defined in Pantry.Types

Associated Types

type Rep BlobKey 
Instance details

Defined in Pantry.Types

type Rep BlobKey = D1 ('MetaData "BlobKey" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "BlobKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize)))

Methods

from :: BlobKey -> Rep BlobKey x #

to :: Rep BlobKey x -> BlobKey #

Show BlobKey 
Instance details

Defined in Pantry.Types

NFData BlobKey 
Instance details

Defined in Pantry.Types

Methods

rnf :: BlobKey -> () #

Eq BlobKey 
Instance details

Defined in Pantry.Types

Methods

(==) :: BlobKey -> BlobKey -> Bool #

(/=) :: BlobKey -> BlobKey -> Bool #

Ord BlobKey 
Instance details

Defined in Pantry.Types

Display BlobKey 
Instance details

Defined in Pantry.Types

type Rep BlobKey 
Instance details

Defined in Pantry.Types

type Rep BlobKey = D1 ('MetaData "BlobKey" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "BlobKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize)))

type ConduitM = ConduitT #

Same as ConduitT, for backwards compat

(.|) infixr 2 #

Arguments

:: forall (m :: Type -> Type) a b c r. Monad m 
=> ConduitT a b m ()

upstream

-> ConduitT b c m r

downstream

-> ConduitT a c m r 

Combine two Conduits together into a new Conduit (aka fuse).

Output from the upstream (left) conduit will be fed into the downstream (right) conduit. Processing will terminate when downstream (right) returns. Leftover data returned from the right Conduit will be discarded.

Equivalent to fuse and =$=, however the latter is deprecated and will be removed in a future version.

Note that, while this operator looks like categorical composition (from Control.Category), there are a few reasons it's different:

  • The position of the type parameters to ConduitT do not match. We would need to change ConduitT i o m r to ConduitT r m i o, which would preclude a Monad or MonadTrans instance.
  • The result value from upstream and downstream are allowed to differ between upstream and downstream. In other words, we would need the type signature here to look like ConduitT a b m r -> ConduitT b c m r -> ConduitT a c m r.
  • Due to leftovers, we do not have a left identity in Conduit. This can be achieved with the underlying Pipe datatype, but this is not generally recommended. See https://stackoverflow.com/a/15263700.

Since: conduit-1.2.8

runConduit :: Monad m => ConduitT () Void m r -> m r #

Run a pipeline until processing completes.

Since 1.2.1

data SHA256 #

Instances

Instances details
FromJSON SHA256 
Instance details

Defined in Pantry.SHA256

ToJSON SHA256 
Instance details

Defined in Pantry.SHA256

Data SHA256 
Instance details

Defined in Pantry.SHA256

Methods

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

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

toConstr :: SHA256 -> Constr #

dataTypeOf :: SHA256 -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic SHA256 
Instance details

Defined in Pantry.SHA256

Associated Types

type Rep SHA256 
Instance details

Defined in Pantry.SHA256

type Rep SHA256 = D1 ('MetaData "SHA256" "Pantry.SHA256" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "SHA256" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bytes32)))

Methods

from :: SHA256 -> Rep SHA256 x #

to :: Rep SHA256 x -> SHA256 #

Show SHA256 
Instance details

Defined in Pantry.SHA256

NFData SHA256 
Instance details

Defined in Pantry.SHA256

Methods

rnf :: SHA256 -> () #

Eq SHA256 
Instance details

Defined in Pantry.SHA256

Methods

(==) :: SHA256 -> SHA256 -> Bool #

(/=) :: SHA256 -> SHA256 -> Bool #

Ord SHA256 
Instance details

Defined in Pantry.SHA256

Hashable SHA256 
Instance details

Defined in Pantry.SHA256

Methods

hashWithSalt :: Int -> SHA256 -> Int #

hash :: SHA256 -> Int #

PersistField SHA256 
Instance details

Defined in Pantry.SHA256

PersistFieldSql SHA256 
Instance details

Defined in Pantry.SHA256

Display SHA256 
Instance details

Defined in Pantry.SHA256

SymbolToField "sha" ArchiveCache SHA256 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField ArchiveCache SHA256 #

SymbolToField "sha" Blob SHA256 
Instance details

Defined in Pantry.Storage

SymbolToField "sha" CacheUpdate SHA256 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField CacheUpdate SHA256 #

SymbolToField "sha" HackageTarball SHA256 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField HackageTarball SHA256 #

SymbolToField "sha" SnapshotCache SHA256 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField SnapshotCache SHA256 #

type Rep SHA256 
Instance details

Defined in Pantry.SHA256

type Rep SHA256 = D1 ('MetaData "SHA256" "Pantry.SHA256" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "SHA256" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bytes32)))

data File #

A file path.

Instances

Instances details
Data File 
Instance details

Defined in Path.Posix

Methods

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

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

toConstr :: File -> Constr #

dataTypeOf :: File -> DataType #

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

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

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

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

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

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

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

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

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

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

FromJSON (SomeBase File) 
Instance details

Defined in Path.Posix

AnyPath (SomeBase File)

Since: path-io-1.8.0

Instance details

Defined in Path.IO

Associated Types

type AbsPath (SomeBase File) 
Instance details

Defined in Path.IO

type RelPath (SomeBase File) 
Instance details

Defined in Path.IO

Pretty (SomeBase File) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

FromJSON (Path Abs File) 
Instance details

Defined in Path.Posix

FromJSON (Path Rel File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel File) 
Instance details

Defined in Path.Posix

AnyPath (Path b File) 
Instance details

Defined in Path.IO

Associated Types

type AbsPath (Path b File) 
Instance details

Defined in Path.IO

type RelPath (Path b File) 
Instance details

Defined in Path.IO

Pretty (Path b File) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b File -> StyleDoc #

type AbsPath (SomeBase File) 
Instance details

Defined in Path.IO

type RelPath (SomeBase File) 
Instance details

Defined in Path.IO

type AbsPath (Path b File) 
Instance details

Defined in Path.IO

type RelPath (Path b File) 
Instance details

Defined in Path.IO

data Force #

Constructors

Force 
NoForce 

Instances

Instances details
Show Force 
Instance details

Defined in Hpack.Options

Methods

showsPrec :: Int -> Force -> ShowS #

show :: Force -> String #

showList :: [Force] -> ShowS #

Eq Force 
Instance details

Defined in Hpack.Options

Methods

(==) :: Force -> Force -> Bool #

(/=) :: Force -> Force -> Bool #

data GlobalHintsLocation #

Instances

Instances details
ToJSON GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Generic GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Associated Types

type Rep GlobalHintsLocation 
Instance details

Defined in Pantry.Types

type Rep GlobalHintsLocation = D1 ('MetaData "GlobalHintsLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "GHLUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "GHLFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))))
Show GlobalHintsLocation 
Instance details

Defined in Pantry.Types

NFData GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: GlobalHintsLocation -> () #

Eq GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Ord GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Display GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Pretty GlobalHintsLocation 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved GlobalHintsLocation)) 
Instance details

Defined in Pantry.Types

type Rep GlobalHintsLocation 
Instance details

Defined in Pantry.Types

type Rep GlobalHintsLocation = D1 ('MetaData "GlobalHintsLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "GHLUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "GHLFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))))

newtype SnapshotCacheHash #

Instances

Instances details
Show SnapshotCacheHash 
Instance details

Defined in Pantry.Types

data SnapshotLayer #

Instances

Instances details
ToJSON SnapshotLayer 
Instance details

Defined in Pantry.Types

Generic SnapshotLayer 
Instance details

Defined in Pantry.Types

Show SnapshotLayer 
Instance details

Defined in Pantry.Types

Eq SnapshotLayer 
Instance details

Defined in Pantry.Types

type Rep SnapshotLayer 
Instance details

Defined in Pantry.Types

data RawSnapshotLayer #

Instances

Instances details
ToJSON RawSnapshotLayer 
Instance details

Defined in Pantry.Types

Generic RawSnapshotLayer 
Instance details

Defined in Pantry.Types

Show RawSnapshotLayer 
Instance details

Defined in Pantry.Types

NFData RawSnapshotLayer 
Instance details

Defined in Pantry.Types

Methods

rnf :: RawSnapshotLayer -> () #

Eq RawSnapshotLayer 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) 
Instance details

Defined in Pantry.Types

type Rep RawSnapshotLayer 
Instance details

Defined in Pantry.Types

data SnapshotPackage #

Instances

Instances details
Show SnapshotPackage 
Instance details

Defined in Pantry.Types

data SnapshotLocation #

Instances

Instances details
ToJSON SnapshotLocation 
Instance details

Defined in Pantry.Types

Generic SnapshotLocation 
Instance details

Defined in Pantry.Types

Show SnapshotLocation 
Instance details

Defined in Pantry.Types

NFData SnapshotLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: SnapshotLocation -> () #

Eq SnapshotLocation 
Instance details

Defined in Pantry.Types

Ord SnapshotLocation 
Instance details

Defined in Pantry.Types

Display SnapshotLocation 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) 
Instance details

Defined in Pantry.Types

type Rep SnapshotLocation 
Instance details

Defined in Pantry.Types

data RawSnapshotLocation #

Instances

Instances details
ToJSON RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Generic RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Show RawSnapshotLocation 
Instance details

Defined in Pantry.Types

NFData RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: RawSnapshotLocation -> () #

Eq RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Ord RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Display RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Pretty RawSnapshotLocation 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved RawSnapshotLocation)) 
Instance details

Defined in Pantry.Types

type Rep RawSnapshotLocation 
Instance details

Defined in Pantry.Types

data SnapName #

Constructors

LTS !Int !Int 
Nightly !Day 

Instances

Instances details
ToJSON SnapName 
Instance details

Defined in Pantry.Types

Generic SnapName 
Instance details

Defined in Pantry.Types

Associated Types

type Rep SnapName 
Instance details

Defined in Pantry.Types

Methods

from :: SnapName -> Rep SnapName x #

to :: Rep SnapName x -> SnapName #

Show SnapName 
Instance details

Defined in Pantry.Types

NFData SnapName 
Instance details

Defined in Pantry.Types

Methods

rnf :: SnapName -> () #

Eq SnapName 
Instance details

Defined in Pantry.Types

Ord SnapName 
Instance details

Defined in Pantry.Types

Display SnapName 
Instance details

Defined in Pantry.Types

type Rep SnapName 
Instance details

Defined in Pantry.Types

data WantedCompiler #

Instances

Instances details
FromJSON WantedCompiler 
Instance details

Defined in Pantry.Types

FromJSONKey WantedCompiler 
Instance details

Defined in Pantry.Types

ToJSON WantedCompiler 
Instance details

Defined in Pantry.Types

Generic WantedCompiler 
Instance details

Defined in Pantry.Types

Show WantedCompiler 
Instance details

Defined in Pantry.Types

NFData WantedCompiler 
Instance details

Defined in Pantry.Types

Methods

rnf :: WantedCompiler -> () #

Eq WantedCompiler 
Instance details

Defined in Pantry.Types

Ord WantedCompiler 
Instance details

Defined in Pantry.Types

Display WantedCompiler 
Instance details

Defined in Pantry.Types

type Rep WantedCompiler 
Instance details

Defined in Pantry.Types

newtype CabalString a #

Constructors

CabalString 

Fields

Instances

Instances details
IsCabalString a => FromJSON (CabalString a) 
Instance details

Defined in Pantry.Types

IsCabalString a => FromJSONKey (CabalString a) 
Instance details

Defined in Pantry.Types

Pretty a => ToJSON (CabalString a) 
Instance details

Defined in Pantry.Types

Pretty a => ToJSONKey (CabalString a) 
Instance details

Defined in Pantry.Types

Show a => Show (CabalString a) 
Instance details

Defined in Pantry.Types

Eq a => Eq (CabalString a) 
Instance details

Defined in Pantry.Types

Ord a => Ord (CabalString a) 
Instance details

Defined in Pantry.Types

data ArchiveLocation #

Instances

Instances details
Generic ArchiveLocation 
Instance details

Defined in Pantry.Types

Associated Types

type Rep ArchiveLocation 
Instance details

Defined in Pantry.Types

type Rep ArchiveLocation = D1 ('MetaData "ArchiveLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "ALUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ALFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))))
Show ArchiveLocation 
Instance details

Defined in Pantry.Types

NFData ArchiveLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: ArchiveLocation -> () #

Eq ArchiveLocation 
Instance details

Defined in Pantry.Types

Ord ArchiveLocation 
Instance details

Defined in Pantry.Types

Display ArchiveLocation 
Instance details

Defined in Pantry.Types

Pretty ArchiveLocation 
Instance details

Defined in Pantry.Types

type Rep ArchiveLocation 
Instance details

Defined in Pantry.Types

type Rep ArchiveLocation = D1 ('MetaData "ArchiveLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "ALUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ALFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath File))))

newtype RelFilePath #

Constructors

RelFilePath Text 

Instances

Instances details
FromJSON RelFilePath 
Instance details

Defined in Pantry.Types

ToJSON RelFilePath 
Instance details

Defined in Pantry.Types

Generic RelFilePath 
Instance details

Defined in Pantry.Types

Associated Types

type Rep RelFilePath 
Instance details

Defined in Pantry.Types

type Rep RelFilePath = D1 ('MetaData "RelFilePath" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "RelFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Show RelFilePath 
Instance details

Defined in Pantry.Types

NFData RelFilePath 
Instance details

Defined in Pantry.Types

Methods

rnf :: RelFilePath -> () #

Eq RelFilePath 
Instance details

Defined in Pantry.Types

Ord RelFilePath 
Instance details

Defined in Pantry.Types

Display RelFilePath 
Instance details

Defined in Pantry.Types

type Rep RelFilePath 
Instance details

Defined in Pantry.Types

type Rep RelFilePath = D1 ('MetaData "RelFilePath" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "RelFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data PackageMetadata #

Instances

Instances details
Generic PackageMetadata 
Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageMetadata 
Instance details

Defined in Pantry.Types

type Rep PackageMetadata = D1 ('MetaData "PackageMetadata" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "pmIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageIdentifier) :*: S1 ('MetaSel ('Just "pmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TreeKey)))
Show PackageMetadata 
Instance details

Defined in Pantry.Types

NFData PackageMetadata 
Instance details

Defined in Pantry.Types

Methods

rnf :: PackageMetadata -> () #

Eq PackageMetadata 
Instance details

Defined in Pantry.Types

Ord PackageMetadata 
Instance details

Defined in Pantry.Types

Display PackageMetadata 
Instance details

Defined in Pantry.Types

type Rep PackageMetadata 
Instance details

Defined in Pantry.Types

type Rep PackageMetadata = D1 ('MetaData "PackageMetadata" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "pmIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageIdentifier) :*: S1 ('MetaSel ('Just "pmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TreeKey)))

data RawPackageMetadata #

Instances

Instances details
Generic RawPackageMetadata 
Instance details

Defined in Pantry.Types

Associated Types

type Rep RawPackageMetadata 
Instance details

Defined in Pantry.Types

type Rep RawPackageMetadata = D1 ('MetaData "RawPackageMetadata" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RawPackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "rpmName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PackageName)) :*: (S1 ('MetaSel ('Just "rpmVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Version)) :*: S1 ('MetaSel ('Just "rpmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TreeKey)))))
Show RawPackageMetadata 
Instance details

Defined in Pantry.Types

NFData RawPackageMetadata 
Instance details

Defined in Pantry.Types

Methods

rnf :: RawPackageMetadata -> () #

Eq RawPackageMetadata 
Instance details

Defined in Pantry.Types

Ord RawPackageMetadata 
Instance details

Defined in Pantry.Types

Display RawPackageMetadata 
Instance details

Defined in Pantry.Types

type Rep RawPackageMetadata 
Instance details

Defined in Pantry.Types

type Rep RawPackageMetadata = D1 ('MetaData "RawPackageMetadata" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RawPackageMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "rpmName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PackageName)) :*: (S1 ('MetaSel ('Just "rpmVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Version)) :*: S1 ('MetaSel ('Just "rpmTreeKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TreeKey)))))

newtype TreeKey #

Constructors

TreeKey BlobKey 

Instances

Instances details
FromJSON TreeKey 
Instance details

Defined in Pantry.Types

ToJSON TreeKey 
Instance details

Defined in Pantry.Types

Generic TreeKey 
Instance details

Defined in Pantry.Types

Associated Types

type Rep TreeKey 
Instance details

Defined in Pantry.Types

type Rep TreeKey = D1 ('MetaData "TreeKey" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "TreeKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobKey)))

Methods

from :: TreeKey -> Rep TreeKey x #

to :: Rep TreeKey x -> TreeKey #

Show TreeKey 
Instance details

Defined in Pantry.Types

NFData TreeKey 
Instance details

Defined in Pantry.Types

Methods

rnf :: TreeKey -> () #

Eq TreeKey 
Instance details

Defined in Pantry.Types

Methods

(==) :: TreeKey -> TreeKey -> Bool #

(/=) :: TreeKey -> TreeKey -> Bool #

Ord TreeKey 
Instance details

Defined in Pantry.Types

Display TreeKey 
Instance details

Defined in Pantry.Types

type Rep TreeKey 
Instance details

Defined in Pantry.Types

type Rep TreeKey = D1 ('MetaData "TreeKey" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "TreeKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobKey)))

data PantryException #

Constructors

PackageIdentifierRevisionParseFail !Text 
InvalidCabalFile !(Either RawPackageLocationImmutable (Path Abs File)) !(Maybe Version) ![PError] ![PWarning] 
TreeWithoutCabalFile !RawPackageLocationImmutable 
TreeWithMultipleCabalFiles !RawPackageLocationImmutable ![SafeFilePath] 
MismatchedCabalName !(Path Abs File) !PackageName 
NoLocalPackageDirFound !(Path Abs Dir) 
NoCabalFileFound !(Path Abs Dir) 
MultipleCabalFilesFound !(Path Abs Dir) ![Path Abs File] 
InvalidWantedCompiler !Text 
InvalidSnapshotLocation !(Path Abs Dir) !Text 
InvalidOverrideCompiler !WantedCompiler !WantedCompiler 
InvalidFilePathSnapshot !Text 
InvalidSnapshot !RawSnapshotLocation !SomeException 
InvalidGlobalHintsLocation !(Path Abs Dir) !Text 
InvalidFilePathGlobalHints !Text 
MismatchedPackageMetadata !RawPackageLocationImmutable !RawPackageMetadata !(Maybe TreeKey) !PackageIdentifier 
Non200ResponseStatus !Status 
InvalidBlobKey !(Mismatch BlobKey) 
Couldn'tParseSnapshot !RawSnapshotLocation !String 
WrongCabalFileName !RawPackageLocationImmutable !SafeFilePath !PackageName 
DownloadInvalidSHA256 !Text !(Mismatch SHA256) 
DownloadInvalidSize !Text !(Mismatch FileSize) 
DownloadTooLarge !Text !(Mismatch FileSize) 
LocalNoArchiveFileFound !(Path Abs File) 
LocalInvalidSHA256 !(Path Abs File) !(Mismatch SHA256) 
LocalInvalidSize !(Path Abs File) !(Mismatch FileSize) 
UnknownArchiveType !ArchiveLocation 
InvalidTarFileType !ArchiveLocation !FilePath !FileType 
UnsupportedTarball !ArchiveLocation !Text 
NoHackageCryptographicHash !PackageIdentifier 
FailedToCloneRepo !SimpleRepo 
TreeReferencesMissingBlob !RawPackageLocationImmutable !SafeFilePath !BlobKey 
CompletePackageMetadataMismatch !RawPackageLocationImmutable !PackageMetadata 
CRC32Mismatch !ArchiveLocation !FilePath !(Mismatch Word32) 
UnknownHackagePackage !PackageIdentifierRevision !FuzzyResults 
CannotCompleteRepoNonSHA1 !Repo 
MutablePackageLocationFromUrl !Text 
MismatchedCabalFileForHackage !PackageIdentifierRevision !(Mismatch PackageIdentifier) 
PackageNameParseFail !Text 
PackageVersionParseFail !Text 
InvalidCabalFilePath !(Path Abs File) 
DuplicatePackageNames !Utf8Builder ![(PackageName, [RawPackageLocationImmutable])] 
MigrationFailure !Text !(Path Abs File) !SomeException 
NoCasaConfig 
InvalidTreeFromCasa !BlobKey !ByteString 
ParseSnapNameException !Text 
HpackLibraryException !(Path Abs File) !String 
HpackExeException !FilePath !(Path Abs Dir) !SomeException 

data Mismatch a #

Constructors

Mismatch 

Fields

data PackageIdentifierRevision #

Instances

Instances details
FromJSON PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

ToJSON PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

Generic PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

type Rep PackageIdentifierRevision = D1 ('MetaData "PackageIdentifierRevision" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PackageIdentifierRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 PackageName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CabalFileInfo))))
Show PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

NFData PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

Eq PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

Ord PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

Display PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

type Rep PackageIdentifierRevision 
Instance details

Defined in Pantry.Types

type Rep PackageIdentifierRevision = D1 ('MetaData "PackageIdentifierRevision" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PackageIdentifierRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 PackageName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CabalFileInfo))))

data CabalFileInfo #

Instances

Instances details
Generic CabalFileInfo 
Instance details

Defined in Pantry.Types

Associated Types

type Rep CabalFileInfo 
Instance details

Defined in Pantry.Types

type Rep CabalFileInfo = D1 ('MetaData "CabalFileInfo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "CFILatest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CFIHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize))) :+: C1 ('MetaCons "CFIRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Revision))))
Show CabalFileInfo 
Instance details

Defined in Pantry.Types

NFData CabalFileInfo 
Instance details

Defined in Pantry.Types

Methods

rnf :: CabalFileInfo -> () #

Eq CabalFileInfo 
Instance details

Defined in Pantry.Types

Ord CabalFileInfo 
Instance details

Defined in Pantry.Types

Hashable CabalFileInfo 
Instance details

Defined in Pantry.Types

Display CabalFileInfo 
Instance details

Defined in Pantry.Types

type Rep CabalFileInfo 
Instance details

Defined in Pantry.Types

type Rep CabalFileInfo = D1 ('MetaData "CabalFileInfo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "CFILatest" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CFIHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize))) :+: C1 ('MetaCons "CFIRevision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Revision))))

data SimpleRepo #

Constructors

SimpleRepo 

Instances

Instances details
Generic SimpleRepo 
Instance details

Defined in Pantry.Types

Associated Types

type Rep SimpleRepo 
Instance details

Defined in Pantry.Types

type Rep SimpleRepo = D1 ('MetaData "SimpleRepo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "SimpleRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "sRepoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sRepoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sRepoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType))))
Show SimpleRepo 
Instance details

Defined in Pantry.Types

Eq SimpleRepo 
Instance details

Defined in Pantry.Types

Ord SimpleRepo 
Instance details

Defined in Pantry.Types

Display SimpleRepo 
Instance details

Defined in Pantry.Types

type Rep SimpleRepo 
Instance details

Defined in Pantry.Types

type Rep SimpleRepo = D1 ('MetaData "SimpleRepo" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "SimpleRepo" 'PrefixI 'True) (S1 ('MetaSel ('Just "sRepoUrl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sRepoCommit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sRepoType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RepoType))))

data Archive #

Instances

Instances details
Generic Archive 
Instance details

Defined in Pantry.Types

Associated Types

type Rep Archive 
Instance details

Defined in Pantry.Types

type Rep Archive = D1 ('MetaData "Archive" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "Archive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "archiveLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "archiveHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256)) :*: (S1 ('MetaSel ('Just "archiveSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize) :*: S1 ('MetaSel ('Just "archiveSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

Methods

from :: Archive -> Rep Archive x #

to :: Rep Archive x -> Archive #

Show Archive 
Instance details

Defined in Pantry.Types

NFData Archive 
Instance details

Defined in Pantry.Types

Methods

rnf :: Archive -> () #

Eq Archive 
Instance details

Defined in Pantry.Types

Methods

(==) :: Archive -> Archive -> Bool #

(/=) :: Archive -> Archive -> Bool #

Ord Archive 
Instance details

Defined in Pantry.Types

type Rep Archive 
Instance details

Defined in Pantry.Types

type Rep Archive = D1 ('MetaData "Archive" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "Archive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "archiveLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "archiveHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SHA256)) :*: (S1 ('MetaSel ('Just "archiveSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 FileSize) :*: S1 ('MetaSel ('Just "archiveSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

data RawArchive #

Instances

Instances details
Generic RawArchive 
Instance details

Defined in Pantry.Types

Associated Types

type Rep RawArchive 
Instance details

Defined in Pantry.Types

type Rep RawArchive = D1 ('MetaData "RawArchive" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RawArchive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "raLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "raHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe SHA256))) :*: (S1 ('MetaSel ('Just "raSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize)) :*: S1 ('MetaSel ('Just "raSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))
Show RawArchive 
Instance details

Defined in Pantry.Types

NFData RawArchive 
Instance details

Defined in Pantry.Types

Methods

rnf :: RawArchive -> () #

Eq RawArchive 
Instance details

Defined in Pantry.Types

Ord RawArchive 
Instance details

Defined in Pantry.Types

type Rep RawArchive 
Instance details

Defined in Pantry.Types

type Rep RawArchive = D1 ('MetaData "RawArchive" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RawArchive" 'PrefixI 'True) ((S1 ('MetaSel ('Just "raLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ArchiveLocation) :*: S1 ('MetaSel ('Just "raHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe SHA256))) :*: (S1 ('MetaSel ('Just "raSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FileSize)) :*: S1 ('MetaSel ('Just "raSubdir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

data PackageLocationImmutable #

Instances

Instances details
ToJSON PackageLocationImmutable 
Instance details

Defined in Pantry.Types

Generic PackageLocationImmutable 
Instance details

Defined in Pantry.Types

Show PackageLocationImmutable 
Instance details

Defined in Pantry.Types

NFData PackageLocationImmutable 
Instance details

Defined in Pantry.Types

Eq PackageLocationImmutable 
Instance details

Defined in Pantry.Types

Ord PackageLocationImmutable 
Instance details

Defined in Pantry.Types

Display PackageLocationImmutable 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) 
Instance details

Defined in Pantry.Types

type Rep PackageLocationImmutable 
Instance details

Defined in Pantry.Types

data RawPackageLocationImmutable #

Instances

Instances details
ToJSON RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Generic RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Show RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

NFData RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Eq RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Ord RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Display RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Pretty RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) 
Instance details

Defined in Pantry.Types

type Rep RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

data PackageLocation #

Instances

Instances details
Generic PackageLocation 
Instance details

Defined in Pantry.Types

Associated Types

type Rep PackageLocation 
Instance details

Defined in Pantry.Types

type Rep PackageLocation = D1 ('MetaData "PackageLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageLocationImmutable)) :+: C1 ('MetaCons "PLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir))))
Show PackageLocation 
Instance details

Defined in Pantry.Types

NFData PackageLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: PackageLocation -> () #

Eq PackageLocation 
Instance details

Defined in Pantry.Types

Display PackageLocation 
Instance details

Defined in Pantry.Types

type Rep PackageLocation 
Instance details

Defined in Pantry.Types

type Rep PackageLocation = D1 ('MetaData "PackageLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "PLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PackageLocationImmutable)) :+: C1 ('MetaCons "PLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir))))

data RawPackageLocation #

Instances

Instances details
ToJSON RawPackageLocation 
Instance details

Defined in Pantry.Types

Generic RawPackageLocation 
Instance details

Defined in Pantry.Types

Associated Types

type Rep RawPackageLocation 
Instance details

Defined in Pantry.Types

type Rep RawPackageLocation = D1 ('MetaData "RawPackageLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RPLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageLocationImmutable)) :+: C1 ('MetaCons "RPLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir))))
Show RawPackageLocation 
Instance details

Defined in Pantry.Types

NFData RawPackageLocation 
Instance details

Defined in Pantry.Types

Methods

rnf :: RawPackageLocation -> () #

Eq RawPackageLocation 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) 
Instance details

Defined in Pantry.Types

type Rep RawPackageLocation 
Instance details

Defined in Pantry.Types

type Rep RawPackageLocation = D1 ('MetaData "RawPackageLocation" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "RPLImmutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RawPackageLocationImmutable)) :+: C1 ('MetaCons "RPLMutable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ResolvedPath Dir))))

data ResolvedPath t #

Instances

Instances details
Generic (ResolvedPath t) 
Instance details

Defined in Pantry.Types

Associated Types

type Rep (ResolvedPath t) 
Instance details

Defined in Pantry.Types

type Rep (ResolvedPath t) = D1 ('MetaData "ResolvedPath" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "ResolvedPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "resolvedRelative") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelFilePath) :*: S1 ('MetaSel ('Just "resolvedAbsolute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Path Abs t))))

Methods

from :: ResolvedPath t -> Rep (ResolvedPath t) x #

to :: Rep (ResolvedPath t) x -> ResolvedPath t #

Show (ResolvedPath t) 
Instance details

Defined in Pantry.Types

NFData (ResolvedPath t) 
Instance details

Defined in Pantry.Types

Methods

rnf :: ResolvedPath t -> () #

Eq (ResolvedPath t) 
Instance details

Defined in Pantry.Types

Ord (ResolvedPath t) 
Instance details

Defined in Pantry.Types

type Rep (ResolvedPath t) 
Instance details

Defined in Pantry.Types

type Rep (ResolvedPath t) = D1 ('MetaData "ResolvedPath" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'False) (C1 ('MetaCons "ResolvedPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "resolvedRelative") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelFilePath) :*: S1 ('MetaSel ('Just "resolvedAbsolute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Path Abs t))))

data Unresolved a #

Instances

Instances details
Applicative Unresolved 
Instance details

Defined in Pantry.Types

Methods

pure :: a -> Unresolved a #

(<*>) :: Unresolved (a -> b) -> Unresolved a -> Unresolved b #

liftA2 :: (a -> b -> c) -> Unresolved a -> Unresolved b -> Unresolved c #

(*>) :: Unresolved a -> Unresolved b -> Unresolved b #

(<*) :: Unresolved a -> Unresolved b -> Unresolved a #

Functor Unresolved 
Instance details

Defined in Pantry.Types

Methods

fmap :: (a -> b) -> Unresolved a -> Unresolved b #

(<$) :: a -> Unresolved b -> Unresolved a #

FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocation))) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved (NonEmpty RawPackageLocationImmutable))) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved GlobalHintsLocation)) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved PackageLocationImmutable)) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved RawSnapshotLocation)) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved SnapshotLocation)) 
Instance details

Defined in Pantry.Types

FromJSON (WithJSONWarnings (Unresolved Locked)) Source # 
Instance details

Defined in Stack.Lock

(FromJSON (WithJSONWarnings (Unresolved a)), FromJSON (WithJSONWarnings (Unresolved b))) => FromJSON (WithJSONWarnings (Unresolved (LockedLocation a b))) Source # 
Instance details

Defined in Stack.Lock

FromJSON (Unresolved AbstractSnapshot) Source # 
Instance details

Defined in Stack.Types.Snapshot

newtype Revision #

Constructors

Revision Word 

Instances

Instances details
Data Revision 
Instance details

Defined in Pantry.Types

Methods

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

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

toConstr :: Revision -> Constr #

dataTypeOf :: Revision -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic Revision 
Instance details

Defined in Pantry.Types

Associated Types

type Rep Revision 
Instance details

Defined in Pantry.Types

type Rep Revision = D1 ('MetaData "Revision" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "Revision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

Methods

from :: Revision -> Rep Revision x #

to :: Rep Revision x -> Revision #

Show Revision 
Instance details

Defined in Pantry.Types

NFData Revision 
Instance details

Defined in Pantry.Types

Methods

rnf :: Revision -> () #

Eq Revision 
Instance details

Defined in Pantry.Types

Ord Revision 
Instance details

Defined in Pantry.Types

Hashable Revision 
Instance details

Defined in Pantry.Types

Methods

hashWithSalt :: Int -> Revision -> Int #

hash :: Revision -> Int #

PersistField Revision 
Instance details

Defined in Pantry.Types

PersistFieldSql Revision 
Instance details

Defined in Pantry.Types

Display Revision 
Instance details

Defined in Pantry.Types

SymbolToField "revision" HackageCabal Revision 
Instance details

Defined in Pantry.Storage

Methods

symbolToField :: EntityField HackageCabal Revision #

type Rep Revision 
Instance details

Defined in Pantry.Types

type Rep Revision = D1 ('MetaData "Revision" "Pantry.Types" "pantry-0.10.0-F4W3DMNiAW3DjyIKf6wSZ5-internal" 'True) (C1 ('MetaCons "Revision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

data RequireHackageIndex #

Require that the Hackage index is populated.

Since: pantry-0.1.0.0

Constructors

YesRequireHackageIndex

If there is nothing in the Hackage index, then perform an update

NoRequireHackageIndex

Do not perform an update

Instances

Instances details
Show RequireHackageIndex 
Instance details

Defined in Pantry.Hackage

data UsePreferredVersions #

Should we pay attention to Hackage's preferred versions?

Since: pantry-0.1.0.0

Instances

Instances details
Show UsePreferredVersions 
Instance details

Defined in Pantry.Hackage

data DidUpdateOccur #

Did an update occur when running updateHackageIndex?

Since: pantry-0.1.0.0

hackageIndexTarballL :: HasPantryConfig env => SimpleGetter env (Path Abs File) #

Where does pantry download its 01-index.tar file from Hackage?

Since: pantry-0.1.0.0

updateHackageIndex #

Arguments

:: (HasPantryConfig env, HasLogFunc env) 
=> Maybe Utf8Builder

reason for updating, if any

-> RIO env DidUpdateOccur 

Download the most recent 01-index.tar file from Hackage and update the database tables.

This function will only perform an update once per PantryConfig for user sanity. See the return value to find out if it happened.

Since: pantry-0.1.0.0

getHackageTypoCorrections :: (HasPantryConfig env, HasLogFunc env) => PackageName -> RIO env [PackageName] #

Try to come up with typo corrections for given package identifier using Hackage package names. This can provide more user-friendly information in error messages.

Since: pantry-0.1.0.0

getHackagePackageVersions #

Returns the versions of the package available on Hackage.

Since: pantry-0.1.0.0

fetchReposRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, RawPackageMetadata)] -> RIO env () #

Like fetchRepos, except with RawPackageMetadata instead of PackageMetadata.

Since: pantry-0.5.3

fetchRepos :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, PackageMetadata)] -> RIO env () #

Fetch the given repositories at once and populate the pantry database.

Since: pantry-0.5.3

withRepo :: (HasLogFunc env, HasProcessContext env) => SimpleRepo -> RIO env a -> RIO env a #

Clone the repository (and, in the case of Git and if necessary, fetch the specific commit) and execute the action with the working directory set to the repository root.

Since: pantry-0.1.0.0

data PantryApp #

Convenient data type that allows you to work with pantry more easily than using withPantryConfig or withPantryConfig' directly. Uses basically sane settings, like sharing a pantry directory with Stack.

You can use runPantryApp to use this. A simple example is:

{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

-- From package Cabal-syntax
import Distribution.Types.Version ( mkVersion )
-- From package pantry
import Pantry
         ( CabalFileInfo (..), PackageIdentifierRevision (..), PantryApp
         , RawPackageLocationImmutable (..), loadPackageRaw, runPantryApp
         )
-- From package rio
import RIO ( RIO, liftIO )

main :: IO ()
main = runPantryApp myPantryApp

myPantryApp :: RIO PantryApp ()
myPantryApp = loadPackageRaw baseLocation >>= liftIO . print
 where
  baseVersion = mkVersion [4, 19, 0, 0]
  basePkgId = PackageIdentifierRevision "base" baseVersion CFILatest
  baseLocation = RPLIHackage basePkgId Nothing

Since: pantry-0.1.0.0

Instances

Instances details
HasPantryConfig PantryApp 
Instance details

Defined in Pantry

HasLogFunc PantryApp 
Instance details

Defined in Pantry

HasProcessContext PantryApp 
Instance details

Defined in Pantry

HasTerm PantryApp 
Instance details

Defined in Pantry

HasStylesUpdate PantryApp 
Instance details

Defined in Pantry

data AddPackagesConfig #

Package settings to be passed to addPackagesToSnapshot.

Since: pantry-0.1.0.0

data CompletedSL #

A completed snapshot location, including the original raw and completed information.

Since: pantry-0.1.0.0

data CompletedPLI #

A completed package location, including the original raw and completed information.

Since: pantry-0.1.0.0

data CompletePackageLocation #

Complete package location, plus whether the package has a cabal file. This is relevant to reproducibility, see https://tech.fpcomplete.com/blog/storing-generated-cabal-files

Since: pantry-0.4.0.0

withPantryConfig #

Arguments

:: HasLogFunc env 
=> Path Abs Dir

pantry root directory, where the SQLite database and Hackage downloads are kept.

-> PackageIndexConfig

Package index configuration. You probably want defaultPackageIndexConfig.

-> HpackExecutable

When converting an hpack package.yaml file to a cabal file, what version of hpack should we use?

-> Int

Maximum connection count

-> CasaRepoPrefix

The casa pull URL e.g. https://casa.stackage.org/v1/pull.

-> Int

Max casa keys to pull per request.

-> (SnapName -> RawSnapshotLocation)

The location of snapshot synonyms

-> (WantedCompiler -> GlobalHintsLocation)

The location of global hints

-> (PantryConfig -> RIO env a)

What to do with the config

-> RIO env a 

Create a new PantryConfig with the given settings. For a version where Hpack's approach to overwriting Cabal files is configurable and the use of Casa (content-addressable storage archive) is optional, see withPantryConfig'.

For something easier to use in simple cases, see runPantryApp.

Since: pantry-0.1.0.0

withPantryConfig' #

Arguments

:: HasLogFunc env 
=> Path Abs Dir

pantry root directory, where the SQLite database and Hackage downloads are kept.

-> PackageIndexConfig

Package index configuration. You probably want defaultPackageIndexConfig.

-> HpackExecutable

When converting an hpack package.yaml file to a cabal file, what version of hpack should we use?

-> Force

Should Hpack force the overwriting of a Cabal file that has been modified manually?

Since: pantry-0.10.0

-> Int

Maximum connection count

-> Maybe (CasaRepoPrefix, Int)

Optionally, the Casa pull URL e.g. https://casa.fpcomplete.com and the maximum number of Casa keys to pull per request.

-> (SnapName -> RawSnapshotLocation)

The location of snapshot synonyms

-> (WantedCompiler -> GlobalHintsLocation)

The location of global hints

-> (PantryConfig -> RIO env a)

What to do with the config

-> RIO env a 

Create a new PantryConfig with the given settings.

For something easier to use in simple cases, see runPantryApp.

Since: pantry-0.8.3

defaultCasaRepoPrefix :: CasaRepoPrefix #

Default pull URL for Casa.

Since: pantry-0.1.1.1

defaultCasaMaxPerRequest :: Int #

Default max keys to pull per request.

Since: pantry-0.1.1.1

defaultPackageIndexConfig :: PackageIndexConfig #

Default PackageIndexConfig value using the official Hackage server.

Since: pantry-0.6.0

defaultDownloadPrefix :: Text #

The download prefix for the official Hackage server.

Since: pantry-0.6.0

getLatestHackageVersion #

Returns the latest version of the given package available from Hackage.

Since: pantry-0.1.0.0

getLatestHackageLocation #

Returns location of the latest version of the given package available from Hackage.

Since: pantry-0.1.0.0

getLatestHackageRevision #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> RequireHackageIndex 
-> PackageName

package name

-> Version 
-> RIO env (Maybe (Revision, BlobKey, TreeKey)) 

Returns the latest revision of the given package version available from Hackage.

Since: pantry-0.1.0.0

fetchPackages :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env, Foldable f) => f PackageLocationImmutable -> RIO env () #

Download all of the packages provided into the local cache without performing any unpacking. Can be useful for build tools wanting to prefetch or provide an offline mode.

Since: pantry-0.1.0.0

unpackPackageLocationRaw #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Path Abs Dir

unpack directory

-> RawPackageLocationImmutable 
-> RIO env () 

Unpack a given RawPackageLocationImmutable into the given directory. Does not generate any extra subdirectories.

Since: pantry-0.1.0.0

unpackPackageLocation #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Path Abs Dir

unpack directory

-> PackageLocationImmutable 
-> RIO env () 

Unpack a given PackageLocationImmutable into the given directory. Does not generate any extra subdirectories.

Since: pantry-0.1.0.0

loadCabalFileImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env GenericPackageDescription #

Load the cabal file for the given PackageLocationImmutable.

This function ignores all warnings.

Since: pantry-0.1.0.0

loadCabalFileRawImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env GenericPackageDescription #

Load the cabal file for the given RawPackageLocationImmutable.

This function ignores all warnings.

Note that, for now, this will not allow support for hpack files in these package locations. Instead, all PackageLocationImmutables will require a .cabal file. This may be relaxed in the future.

Since: pantry-0.1.0.0

loadCabalFileRaw #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Maybe Text

The program name used by Hpack (the library), defaults to "hpack".

-> RawPackageLocation 
-> RIO env GenericPackageDescription 

Same as loadCabalFileRawImmutable, but takes a RawPackageLocation. Never prints warnings, see loadCabalFilePath for that.

Since: pantry-0.8.0

loadCabalFile #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Maybe Text

The program name used by Hpack (the library), defaults to "hpack".

-> PackageLocation 
-> RIO env GenericPackageDescription 

Same as loadCabalFileImmutable, but takes a PackageLocation. Never prints warnings, see loadCabalFilePath for that.

Since: pantry-0.8.0

loadCabalFilePath #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Maybe Text

The program name used by Hpack (the library), defaults to "hpack".

-> Path Abs Dir

project directory, with a cabal file or hpack file

-> RIO env (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File) 

Parse the Cabal file for the package inside the given directory. Performs various sanity checks, such as the file name being correct and having only a single Cabal file.

Since: pantry-0.8.0

findOrGenerateCabalFile #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Maybe Text

The program name used by Hpack (the library), defaults to "hpack".

-> Path Abs Dir

package directory

-> RIO env (PackageName, Path Abs File) 

Get the file name for the Cabal file in the given directory.

If no Cabal file is present, or more than one is present, an exception is thrown via throwM.

If the directory contains a file named package.yaml, Hpack is used to generate a Cabal file from it.

Since: pantry-0.8.0

loadPackageRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env Package #

Load a Package from a RawPackageLocationImmutable.

Load the package either from the local DB, Casa, or as a last resort, the third party (hackage, archive or repo).

Since: pantry-0.1.0.0

completePackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env CompletePackageLocation #

Fill in optional fields in a PackageLocationImmutable for more reproducible builds.

Since: pantry-0.1.0.0

completeSnapshotLocation :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env SnapshotLocation #

Add in hashes to make a SnapshotLocation reproducible.

Since: pantry-0.1.0.0

loadAndCompleteSnapshot #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> SnapshotLocation 
-> Map RawSnapshotLocation SnapshotLocation

Cached snapshot locations from lock file

-> Map RawPackageLocationImmutable PackageLocationImmutable

Cached locations from lock file

-> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) 

Parse a Snapshot (all layers) from a SnapshotLocation noting any incomplete package locations. Debug output will include the raw snapshot layer.

Since: pantry-0.1.0.0

loadAndCompleteSnapshot' #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Bool

Debug output includes the raw snapshot layer

-> SnapshotLocation 
-> Map RawSnapshotLocation SnapshotLocation

Cached snapshot locations from lock file

-> Map RawPackageLocationImmutable PackageLocationImmutable

Cached locations from lock file

-> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) 

As for loadAndCompleteSnapshot but allows toggling of the debug output of the raw snapshot layer.

Since: pantry-0.5.7

loadAndCompleteSnapshotRaw #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> RawSnapshotLocation 
-> Map RawSnapshotLocation SnapshotLocation

Cached snapshot locations from lock file

-> Map RawPackageLocationImmutable PackageLocationImmutable

Cached locations from lock file

-> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) 

Parse a Snapshot (all layers) from a RawSnapshotLocation completing any incomplete package locations. Debug output will include the raw snapshot layer.

Since: pantry-0.1.0.0

loadAndCompleteSnapshotRaw' #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Bool

Debug output includes the raw snapshot layer

-> RawSnapshotLocation 
-> Map RawSnapshotLocation SnapshotLocation

Cached snapshot locations from lock file

-> Map RawPackageLocationImmutable PackageLocationImmutable

Cached locations from lock file

-> RIO env (Snapshot, [CompletedSL], [CompletedPLI]) 

As for loadAndCompleteSnapshotRaw but allows toggling of the debug output of the raw snapshot layer.

Since: pantry-0.5.7

addPackagesToSnapshot #

Arguments

:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) 
=> Utf8Builder

Text description of where these new packages are coming from, for error messages only

-> [RawPackageLocationImmutable]

new packages

-> AddPackagesConfig 
-> Map PackageName RawSnapshotPackage

packages from parent

-> RIO env (Map PackageName RawSnapshotPackage, AddPackagesConfig) 

Add more packages to a snapshot

Note that any settings on a parent flag which is being replaced will be ignored. For example, if package foo is in the parent and has flag bar set, and foo also appears in new packages, then bar will no longer be set.

Returns any of the AddPackagesConfig values not used.

Since: pantry-0.1.0.0

loadRawSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env (Either WantedCompiler (RawSnapshotLayer, CompletedSL)) #

Parse a SnapshotLayer value from a SnapshotLocation.

Returns a Left value if provided an SLCompiler constructor. Otherwise, returns a Right value providing both the Snapshot and a hash of the input configuration file.

Since: pantry-0.1.0.0

loadSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => SnapshotLocation -> RIO env (Either WantedCompiler RawSnapshotLayer) #

Parse a SnapshotLayer value from a SnapshotLocation.

Returns a Left value if provided an SLCompiler constructor. Otherwise, returns a Right value providing both the Snapshot and a hash of the input configuration file.

Since: pantry-0.1.0.0

getPackageLocationName :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageName #

Get the PackageName of the package at the given location.

Since: pantry-0.1.0.0

packageLocationIdent :: PackageLocationImmutable -> PackageIdentifier #

Get the PackageIdentifier of the package at the given location.

Since: pantry-0.1.0.0

packageLocationVersion :: PackageLocationImmutable -> Version #

Get version of the package at the given location.

Since: pantry-0.1.0.0

getRawPackageLocationIdent :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageIdentifier #

Get the PackageIdentifier of the package at the given location.

Since: pantry-0.1.0.0

getRawPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env TreeKey #

Get the TreeKey of the package at the given location.

Since: pantry-0.1.0.0

getPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env TreeKey #

Get the TreeKey of the package at the given location.

Since: pantry-0.1.0.0

hpackExecutableL :: Lens' PantryConfig HpackExecutable #

Lens to view or modify the HpackExecutable of a PantryConfig.

Since: pantry-0.1.0.0

hpackForceL :: Lens' PantryConfig Force #

Lens to view or modify the Force of a PantryConfig.

Since: pantry-0.10.0

runPantryApp :: MonadIO m => RIO PantryApp a -> m a #

Run some code against pantry using basic sane settings.

For testing, see runPantryAppClean.

Since: pantry-0.1.0.0

runPantryAppWith :: MonadIO m => Int -> CasaRepoPrefix -> Int -> RIO PantryApp a -> m a #

Run some code against pantry using basic sane settings.

For testing, see runPantryAppClean.

Since: pantry-0.1.1.1

runPantryAppClean :: MonadIO m => RIO PantryApp a -> m a #

Like runPantryApp, but uses an empty pantry directory instead of sharing with Stack. Useful for testing.

Since: pantry-0.1.0.0

loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version)) #

Load the global hints.

Since: pantry-9.4.0

partitionReplacedDependencies #

Arguments

:: Ord id 
=> Map PackageName a

global packages

-> (a -> PackageName)

package name getter

-> (a -> id)

returns unique package id used for dependency pruning

-> (a -> [id])

returns unique package ids of direct package dependencies

-> Set PackageName

overrides which global dependencies should get pruned

-> (Map PackageName [PackageName], Map PackageName a) 

Partition a map of global packages with its versions into a Set of replaced packages and its dependencies and a map of remaining (untouched) packages.

Since: pantry-0.1.0.0

withSnapshotCache :: (HasPantryConfig env, HasLogFunc env) => SnapshotCacheHash -> RIO env (Map PackageName (Set ModuleName)) -> ((ModuleName -> RIO env [PackageName]) -> RIO env a) -> RIO env a #

Use a snapshot cache, which caches which modules are in which packages in a given snapshot. This is mostly intended for usage by Stack.

Since: pantry-0.1.0.0

data Abs #

An absolute path.

Instances

Instances details
Data Abs 
Instance details

Defined in Path.Posix

Methods

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

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

toConstr :: Abs -> Constr #

dataTypeOf :: Abs -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData (PrecompiledCache Abs) Source # 
Instance details

Defined in Stack.Types.Build

Methods

rnf :: PrecompiledCache Abs -> () #

FromJSON (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSON (Path Abs File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs File) 
Instance details

Defined in Path.Posix

data Rel #

A relative path; one without a root. Note that a .. path component to represent the parent directory is not allowed by this library.

Instances

Instances details
Data Rel 
Instance details

Defined in Path.Posix

Methods

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

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

toConstr :: Rel -> Constr #

dataTypeOf :: Rel -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData (PrecompiledCache Rel) Source # 
Instance details

Defined in Stack.Types.Build

Methods

rnf :: PrecompiledCache Rel -> () #

FromJSON (Path Rel Dir) 
Instance details

Defined in Path.Posix

FromJSON (Path Rel File) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel File) 
Instance details

Defined in Path.Posix

data Dir #

A directory path.

Instances

Instances details
Data Dir 
Instance details

Defined in Path.Posix

Methods

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

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

toConstr :: Dir -> Constr #

dataTypeOf :: Dir -> DataType #

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

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

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

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

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

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

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

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

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

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

FromJSON (SomeBase Dir) 
Instance details

Defined in Path.Posix

AnyPath (SomeBase Dir)

Since: path-io-1.8.0

Instance details

Defined in Path.IO

Associated Types

type AbsPath (SomeBase Dir) 
Instance details

Defined in Path.IO

type RelPath (SomeBase Dir) 
Instance details

Defined in Path.IO

Pretty (SomeBase Dir) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

FromJSON (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSON (Path Rel Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Abs Dir) 
Instance details

Defined in Path.Posix

FromJSONKey (Path Rel Dir) 
Instance details

Defined in Path.Posix

AnyPath (Path b Dir) 
Instance details

Defined in Path.IO

Associated Types

type AbsPath (Path b Dir) 
Instance details

Defined in Path.IO

type AbsPath (Path b Dir) = Path Abs Dir
type RelPath (Path b Dir) 
Instance details

Defined in Path.IO

type RelPath (Path b Dir) = Path Rel Dir
Pretty (Path b Dir) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b Dir -> StyleDoc #

type AbsPath (SomeBase Dir) 
Instance details

Defined in Path.IO

type RelPath (SomeBase Dir) 
Instance details

Defined in Path.IO

type AbsPath (Path b Dir) 
Instance details

Defined in Path.IO

type AbsPath (Path b Dir) = Path Abs Dir
type RelPath (Path b Dir) 
Instance details

Defined in Path.IO

type RelPath (Path b Dir) = Path Rel Dir

ensureFileDurable :: MonadIO m => FilePath -> m () #

After a file is closed, this function opens it again and executes fsync() internally on both the file and the directory that contains it. Note that this function is intended to work around the non-durability of existing file APIs, as opposed to being necessary for the API functions provided in this module.

The effectiveness of calling this function is debatable, as it relies on internal implementation details at the Kernel level that might change. We argue that, despite this fact, calling this function may bring benefits in terms of durability.

This function does not provide the same guarantee as if you would open and modify a file using withBinaryFileDurable or writeBinaryFileDurable, since they ensure that the fsync() is called before the file is closed, so if possible use those instead.

Cross-Platform support

This function is a noop on Windows platforms.

Since: unliftio-0.2.12

writeBinaryFileDurable :: MonadIO m => FilePath -> ByteString -> m () #

Similar to writeBinaryFile, but it also ensures that changes executed to the file are guaranteed to be durable. It internally uses fsync() and makes sure it synchronizes the file on disk.

Cross-Platform support

This function behaves the same as writeBinaryFile on Windows platforms.

Since: unliftio-0.2.12

writeBinaryFileDurableAtomic :: MonadIO m => FilePath -> ByteString -> m () #

Similar to writeBinaryFile, but it also guarantes that changes executed to the file are durable, also, in case of failure, the modified file is never going to get corrupted. It internally uses fsync() and makes sure it synchronizes the file on disk.

Cross-Platform support

This function behaves the same as writeBinaryFile on Windows platforms.

Since: unliftio-0.2.12

withBinaryFileDurable :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r #

Opens a file with the following guarantees:

  • It successfully closes the file in case of an asynchronous exception
  • It reliably saves the file in the correct directory; including edge case situations like a different device being mounted to the current directory, or the current directory being renamed to some other name while the file is being used.
  • It ensures durability by executing an fsync() call before closing the file handle

Cross-Platform support

This function behaves the same as withBinaryFile on Windows platforms.

Since: unliftio-0.2.12

withBinaryFileDurableAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r #

Opens a file with the following guarantees:

  • It successfully closes the file in case of an asynchronous exception
  • It reliably saves the file in the correct directory; including edge case situations like a different device being mounted to the current directory, or the current directory being renamed to some other name while the file is being used.
  • It ensures durability by executing an fsync() call before closing the file handle
  • It keeps all changes in a temporary file, and after it is closed it atomically moves the temporary file to the original filepath, in case of catastrophic failure, the original file stays unaffected.

If you do not need durability but only atomicity, use withBinaryFileAtomic instead, which is faster as it does not perform fsync().

Important - Make sure not to close the Handle, it will be closed for you, otherwise it will result in invalid argument (Bad file descriptor) exception.

Performance Considerations

When using a writable but non-truncating IOMode (i.e. ReadWriteMode and AppendMode), this function performs a copy operation of the specified input file to guarantee the original file is intact in case of a catastrophic failure (no partial writes). This approach may be prohibitive in scenarios where the input file is expected to be large in size.

Cross-Platform support

This function behaves the same as withBinaryFile on Windows platforms.

Since: unliftio-0.2.12

withBinaryFileAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r #

Perform an action on a new or existing file at the destination file path. If previously the file existed at the supplied file path then:

  • in case of WriteMode it will be overwritten
  • upon ReadWriteMode or AppendMode files contents will be copied over into a temporary file, thus making sure no corruption can happen to an existing file upon any failures, even catastrophic one, yet its contents are availble for modification.
  • There is nothing atomic about ReadMode, so no special treatment there.

It is similar to withBinaryFileDurableAtomic, but without the durability part. It means that all modification can still disappear after it has been succesfully written due to some extreme event like an abrupt power loss, but the contents will not be corrupted in case when the file write did not end successfully.

The same performance caveats apply as for withBinaryFileDurableAtomic due to making a copy of the content of existing files during non-truncating writes.

Important - Do not close the handle, otherwise it will result in invalid argument (Bad file descriptor) exception

Note - on Linux operating system and only with supported file systems an anonymous temporary file will be used while working on the file (see O_TMPFILE in man openat). In case when such feature is not available or not supported a temporary file ".target-file-nameXXX.ext.tmp", where XXX is some random number, will be created alongside the target file in the same directory

Since: unliftio-0.2.12

writeBinaryFile :: MonadIO m => FilePath -> ByteString -> m () #

Lifted version of writeFile

Since: unliftio-0.2.12

Re-exports from the rio-pretty print package

class HasStylesUpdate env where #

Environment values with a styles update.

Since: rio-prettyprint-0.1.0.0

Instances

Instances details
HasStylesUpdate PantryApp 
Instance details

Defined in Pantry

HasStylesUpdate SimplePrettyApp 
Instance details

Defined in RIO.PrettyPrint.Simple

HasStylesUpdate StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

HasStylesUpdate EnvConfigPathInfo Source # 
Instance details

Defined in Stack.Path

HasStylesUpdate Ctx Source # 
Instance details

Defined in Stack.Types.Build.ConstructPlan

HasStylesUpdate BuildConfig Source # 
Instance details

Defined in Stack.Types.BuildConfig

HasStylesUpdate Config Source # 
Instance details

Defined in Stack.Types.Config

HasStylesUpdate DotConfig Source # 
Instance details

Defined in Stack.Types.DotConfig

HasStylesUpdate EnvConfig Source # 
Instance details

Defined in Stack.Types.EnvConfig

HasStylesUpdate GetPackageFileContext Source # 
Instance details

Defined in Stack.Types.PackageFile

HasStylesUpdate Runner Source # 
Instance details

Defined in Stack.Types.Runner

class (HasLogFunc env, HasStylesUpdate env) => HasTerm env where #

Methods

useColorL :: Lens' env Bool #

termWidthL :: Lens' env Int #

Instances

Instances details
HasTerm PantryApp 
Instance details

Defined in Pantry

HasTerm SimplePrettyApp 
Instance details

Defined in RIO.PrettyPrint.Simple

HasTerm EnvConfigPathInfo Source # 
Instance details

Defined in Stack.Path

HasTerm Ctx Source # 
Instance details

Defined in Stack.Types.Build.ConstructPlan

HasTerm BuildConfig Source # 
Instance details

Defined in Stack.Types.BuildConfig

HasTerm Config Source # 
Instance details

Defined in Stack.Types.Config

HasTerm DotConfig Source # 
Instance details

Defined in Stack.Types.DotConfig

HasTerm EnvConfig Source # 
Instance details

Defined in Stack.Types.EnvConfig

HasTerm GetPackageFileContext Source # 
Instance details

Defined in Stack.Types.PackageFile

HasTerm Runner Source # 
Instance details

Defined in Stack.Types.Runner

class Pretty a where #

Minimal complete definition

Nothing

Methods

pretty :: a -> StyleDoc #

default pretty :: Show a => a -> StyleDoc #

Instances

Instances details
Pretty ModuleName 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty Arch 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Arch -> StyleDoc #

Pretty OS 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: OS -> StyleDoc #

Pretty ArchiveLocation 
Instance details

Defined in Pantry.Types

Pretty GlobalHintsLocation 
Instance details

Defined in Pantry.Types

Pretty PantryException 
Instance details

Defined in Pantry.Types

Pretty RawPackageLocationImmutable 
Instance details

Defined in Pantry.Types

Pretty RawSnapshotLocation 
Instance details

Defined in Pantry.Types

Pretty PrettyException 
Instance details

Defined in RIO.PrettyPrint.PrettyException

Pretty StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: StyleDoc -> StyleDoc #

Pretty GhciPrettyException Source # 
Instance details

Defined in Stack.Ghci

Pretty PrettyRawSnapshotLocation Source # 
Instance details

Defined in Stack.Prelude

Pretty BuildPrettyException Source # 
Instance details

Defined in Stack.Types.Build.Exception

Pretty ConfigPrettyException Source # 
Instance details

Defined in Stack.Types.Config.Exception

Pretty StoragePrettyException Source # 
Instance details

Defined in Stack.Types.Storage

Pretty (SomeBase Dir) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty (SomeBase File) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty (Path b Dir) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b Dir -> StyleDoc #

Pretty (Path b File) 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b File -> StyleDoc #

data PrettyException #

Type representing pretty exceptions.

Since: rio-prettyprint-0.1.4.0

Constructors

(Exception e, Pretty e) => PrettyException e 

data StyleDoc #

A document annotated by a style.

Instances

Instances details
IsString StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Monoid StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Semigroup StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Show StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty StyleDoc 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: StyleDoc -> StyleDoc #

data Style #

Type representing styles of output.

Constructors

Error

Intended to be used sparingly, not to style entire long messages. For example, to style the Error: or [error] label for an error message, not the entire message.

Warning

Intended to be used sparingly, not to style entire long messages. For example, to style the Warning: or [warn] label for a warning message, not the entire message.

Info

Intended to be used sparingly, not to style entire long messages. For example, to style the [info] label for an info message, not the entire message.

Debug

Intended to be used sparingly, not to style entire long messages. For example, to style the [debug] label for a debug message, not the entire message.

OtherLevel

Intended to be used sparingly, not to style entire long messages. For example, to style the [...] label for an other log level message, not the entire message.

Good

Style in a way to emphasize that it is a particularly good thing.

Shell

Style as a shell command, i.e. when suggesting something to the user that should be typed in directly as written.

File

Style as a filename. See Dir for directories.

Url

Style as a URL.

Dir

Style as a directory name. See File for files.

Recommendation

Style used to highlight part of a recommended course of action.

Current

Style in a way that emphasizes that it is related to a current thing. For example, to report the current package that is being processed when outputting the name of it.

Target

Style used the highlight the target of a course of action.

Module

Style as a module name.

PkgComponent

Style used to highlight the named component of a package.

Secondary

Style for secondary content. For example, to style timestamps.

Highlight

Intended to be used sparingly, not to style entire long messages. For example, to style the duration in a Finished process in ... ms message.

Instances

Instances details
Semigroup Style

The first style overrides the second.

Instance details

Defined in RIO.PrettyPrint.Types

Methods

(<>) :: Style -> Style -> Style #

sconcat :: NonEmpty Style -> Style #

stimes :: Integral b => b -> Style -> Style #

Bounded Style 
Instance details

Defined in RIO.PrettyPrint.Types

Enum Style 
Instance details

Defined in RIO.PrettyPrint.Types

Ix Style 
Instance details

Defined in RIO.PrettyPrint.Types

Show Style 
Instance details

Defined in RIO.PrettyPrint.Types

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Eq Style 
Instance details

Defined in RIO.PrettyPrint.Types

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

Ord Style 
Instance details

Defined in RIO.PrettyPrint.Types

Methods

compare :: Style -> Style -> Ordering #

(<) :: Style -> Style -> Bool #

(<=) :: Style -> Style -> Bool #

(>) :: Style -> Style -> Bool #

(>=) :: Style -> Style -> Bool #

max :: Style -> Style -> Style #

min :: Style -> Style -> Style #

type StyleSpec = (Text, [SGR]) #

A style specification, pairing its 'key' with the corresponding list of SGR codes.

newtype StylesUpdate #

Updates to Styles

Constructors

StylesUpdate 

Fields

Instances

Instances details
FromJSON StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

Monoid StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

Semigroup StylesUpdate

The first styles update overrides the second one.

Instance details

Defined in RIO.PrettyPrint.StylesUpdate

Show StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

Eq StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

HasStylesUpdate StylesUpdate 
Instance details

Defined in RIO.PrettyPrint.StylesUpdate

FromJSON (WithJSONWarnings StylesUpdate) 
Instance details

Defined in Data.Aeson.WarningParser

(<+>) :: StyleDoc -> StyleDoc -> StyleDoc #

The document (x <+> y) concatenates document x and y with a (fromString " ") in between. (infixr 6)

align :: StyleDoc -> StyleDoc #

The document (align x) renders document x with the nesting level set to the current column. It is used for example to implement hang.

As an example, we will put a document right above another one, regardless of the current nesting level:

x $$ y = align (x <> line <> y)
test = fromString "hi" <+> (fromString "nice" $$ fromString "world")

which will be layed out as:

hi nice
   world

bulletedList :: [StyleDoc] -> StyleDoc #

Display a bulleted list of StyleDoc with * as the bullet point.

debugBracket :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m, MonadUnliftIO m) => StyleDoc -> m a -> m a #

debug message action brackets any output of the specified action with an initial and final message at log level LevelDebug. The initial message is prefixed with the label Start:. The final message is prefixed with information about the duration of the action in milliseconds (ms) and, if an exception is thrown by the action, the exception. For example:

Start: <message>
<output of action>
Finished in ...ms: <message>

or:

Start: <message>
<output of action>
Finished with exception in ...ms: <message>
Exception thrown: <exception_message>

defaultStyles :: Styles #

Default styles for rio-prettyprint output.

encloseSep :: StyleDoc -> StyleDoc -> StyleDoc -> [StyleDoc] -> StyleDoc #

The document (encloseSep l r sep xs) concatenates the documents xs separated by sep and encloses the resulting document by l and r. The documents are rendered horizontally if that fits the page. Otherwise they are aligned vertically. All separators are put in front of the elements. For example, the combinator list can be defined with encloseSep:

list xs = encloseSep lbracket rbracket comma xs
test = fromString "list" <+> (list (map int [10, 200, 3000]))

Which is layed out with a page width of 20 as:

list [10,200,3000]

But when the page width is 15, it is layed out as:

list [10
     ,200
     ,3000]

fill :: Int -> StyleDoc -> StyleDoc #

The document (fill i x) renders document x. It than appends (fromString " ")s until the width is equal to i. If the width of x is already larger, nothing is appended. This combinator is quite useful in practice to output a list of bindings. The following example demonstrates this.

types = [ ("empty", "Doc a")
        , ("nest", "Int -> Doc a -> Doc a")
        , ("linebreak", "Doc a")
        ]

ptype (name, tp) =
  fill 6 (fromString name) <+> fromString "::" <+> fromString tp

test = fromString "let" <+> align (vcat (map ptype types))

Which is layed out as:

let empty  :: Doc a
    nest   :: Int -> Doc a -> Doc a
    linebreak :: Doc a

fillSep :: [StyleDoc] -> StyleDoc #

The document (fillSep xs) concatenates documents xs horizontally with (<+>) as long as its fits the page, than inserts a line and continues doing that for all documents in xs.

fillSep xs = foldr (<> softline <>) mempty xs

foldr' :: Foldable t => (a -> b -> b) -> b -> t a -> b #

foldr' is a variant of foldr that performs strict reduction from right to left, i.e. starting with the right-most element. The input structure must be finite, otherwise foldr' runs out of space (diverges).

If you want a strict right fold in constant space, you need a structure that supports faster than O(n) access to the right-most element, such as Seq from the containers package.

This method does not run in constant space for structures such as lists that don't support efficient right-to-left iteration and so require O(n) space to perform right-to-left reduction. Use of this method with such a structure is a hint that the chosen structure may be a poor fit for the task at hand. If the order in which the elements are combined is not important, use foldl' instead.

Since: base-4.6.0.0

fromPackageId :: IsString a => PackageIdentifier -> a Source #

Convert a package identifier to a value of a string-like type.

fromPackageName :: IsString a => PackageName -> a Source #

Convert a package name to a value of a string-like type.

flow :: String -> StyleDoc #

Wordwrap a String

hang :: Int -> StyleDoc -> StyleDoc #

The hang combinator implements hanging indentation. The document (hang i x) renders document x with a nesting level set to the current column plus i. The following example uses hanging indentation for some text:

test = hang 4 (fillSep (map fromString
       (words "the hang combinator indents these words !")))

Which lays out on a page with a width of 20 characters as:

the hang combinator
    indents these
    words !

The hang combinator is implemented as:

hang i x = align (nest i x)

hcat :: [StyleDoc] -> StyleDoc #

The document (hcat xs) concatenates all documents xs horizontally with (<>).

hsep :: [StyleDoc] -> StyleDoc #

The document (hsep xs) concatenates all documents xs horizontally with (<+>).

indent :: Int -> StyleDoc -> StyleDoc #

The document (indent i x) indents document x with i spaces.

test = indent 4 (fillSep (map fromString
       (words "the indent combinator indents these words !")))

Which lays out with a page width of 20 as:

    the indent
    combinator
    indents these
    words !

line :: StyleDoc #

The line document advances to the next line and indents to the current nesting level. Document line behaves like (fromString " ") if the line break is undone by group.

logLevelToStyle :: LogLevel -> Style #

The Style intended to be associated with a LogLevel.

Since: rio-prettyprint-0.1.1.0

mkNarrativeList #

Arguments

:: Pretty a 
=> Maybe Style

Style the items in the list?

-> Bool

Use a serial comma?

-> [a] 
-> [StyleDoc] 

A helper function to yield a narrative list from a list of items, with a final fullstop. For example, helps produce the output "apple, ball and cat." (no serial comma) or "apple, ball, and cat." (serial comma) from ["apple", "ball", "cat"].

Since: rio-prettyprint-0.1.4.0

parens :: StyleDoc -> StyleDoc #

Document (parens x) encloses document x in parenthesis, "(" and ")".

parseStylesUpdateFromString :: String -> StylesUpdate #

Parse a string that is a colon-delimited sequence of key=value, where key is a style name and value is a semicolon-delimited list of ANSI SGR (Select Graphic Rendition) control codes (in decimal). Keys that are not present in defaultStyles are ignored. Items in the semicolon-delimited list that are not recognised as valid control codes are ignored.

prettyDebugL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m () #

prettyErrorL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m () #

prettyGeneric :: (HasTerm env, HasCallStack, Pretty b, MonadReader env m, MonadIO m) => LogLevel -> b -> m () #

prettyInfoL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m () #

prettyInfoS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m () #

prettyNoteL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m () #

prettyNoteS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m () #

prettyWarnL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m () #

prettyWarnS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m () #

punctuate :: StyleDoc -> [StyleDoc] -> [StyleDoc] #

(punctuate p xs) concatenates all documents in xs with document p except for the last document.

someText = map fromString ["words", "in", "a", "tuple"]
test = parens (align (cat (punctuate comma someText)))

This is layed out on a page width of 20 as:

(words,in,a,tuple)

But when the page width is 15, it is layed out as:

(words,
 in,
 a,
 tuple)

(If you want put the commas in front of their elements instead of at the end, you should use encloseSep.)

sep :: [StyleDoc] -> StyleDoc #

The document (sep xs) concatenates all documents xs either horizontally with (<+>), if it fits the page, or vertically with (<> line <>).

sep xs = group (vsep xs)

softbreak :: StyleDoc #

The document softbreak behaves like mempty if the resulting output fits the page, otherwise it behaves like line.

softbreak = group linebreak

softline :: StyleDoc #

The document softline behaves like (fromString " ") if the resulting output fits the page, otherwise it behaves like line.

softline = group line

spacedBulletedList :: [StyleDoc] -> StyleDoc #

Display a bulleted list of StyleDoc with a blank line between each and * as the bullet point.

string :: String -> StyleDoc #

The document string s concatenates all characters in s using line for newline characters and fromString for all other characters. It is used whenever the text contains newline characters.

Since: rio-prettyprint-0.1.4.0

style :: Style -> StyleDoc -> StyleDoc #

Annotate a StyleDoc with a Style.

vsep :: [StyleDoc] -> StyleDoc #

The document (vsep xs) concatenates all documents xs vertically with (<> line <>). If a group undoes the line breaks inserted by vsep, all documents are separated with a space.

someText = map fromString (words ("text to lay out"))

test = fromString "some" <+> vsep someText

This is layed out as:

some text
to
lay
out

The align combinator can be used to align the documents under their first element

test = fromString "some" <+> align (vsep someText)

Which is printed as:

some text
     to
     lay
     out