stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Types.Resolver

Synopsis

- type Resolver = ResolverThat's NotLoaded
- data IsLoaded
  - = Loaded
  - | NotLoaded
- type LoadedResolver = ResolverThat's Loaded
- data ResolverThat's l where
  - ResolverSnapshot :: !SnapName -> ResolverThat's l
  - ResolverCompiler :: !CompilerVersion -> ResolverThat's l
  - ResolverCustom :: !Text -> !Text -> ResolverThat's NotLoaded
  - ResolverCustomLoaded :: !Text -> !Text -> !SnapshotHash -> ResolverThat's Loaded
- parseResolverText :: MonadThrow m => Text -> m Resolver
- resolverDirName :: LoadedResolver -> Text
- resolverName :: ResolverThat's l -> Text
- customResolverHash :: LoadedResolver -> Maybe SnapshotHash
- toResolverNotLoaded :: LoadedResolver -> Resolver
- data AbstractResolver
  - = ARLatestNightly
  - | ARLatestLTS
  - | ARLatestLTSMajor !Int
  - | ARResolver !Resolver
  - | ARGlobal
- readAbstractResolver :: ReadM AbstractResolver

# Documentation

type Resolver = ResolverThat's NotLoaded #

data IsLoaded #

Constructors

Loaded |
NotLoaded |

type LoadedResolver = ResolverThat's Loaded #

data ResolverThat's l where #

How we resolve which dependencies to install given a set of packages.

Constructors

ResolverSnapshot :: !SnapName -> ResolverThat's l |
ResolverCompiler :: !CompilerVersion -> ResolverThat's l |
ResolverCustom :: !Text -> !Text -> ResolverThat's NotLoaded |
ResolverCustomLoaded :: !Text -> !Text -> !SnapshotHash -> ResolverThat's Loaded |

Instances

Eq (ResolverThat's k) # |
Methods (==) :: ResolverThat's k -> ResolverThat's k -> Bool # (/=) :: ResolverThat's k -> ResolverThat's k -> Bool #
Show (ResolverThat's k) # |
Methods showsPrec :: Int -> ResolverThat's k -> ShowS # show :: ResolverThat's k -> String # showList :: [ResolverThat's k] -> ShowS #
FromJSON (WithJSONWarnings (CustomSnapshot, Maybe Resolver)) # |
Methods parseJSON :: Value -> Parser (WithJSONWarnings (CustomSnapshot, Maybe Resolver)) # parseJSONList :: Value -> Parser [WithJSONWarnings (CustomSnapshot, Maybe Resolver)] #
FromJSON (WithJSONWarnings (ResolverThat's NotLoaded)) # |
Methods parseJSON :: Value -> Parser (WithJSONWarnings (ResolverThat's NotLoaded)) # parseJSONList :: Value -> Parser [WithJSONWarnings (ResolverThat's NotLoaded)] #
ToJSON (ResolverThat's k) # |
Methods toJSON :: ResolverThat's k -> Value # toEncoding :: ResolverThat's k -> Encoding # toJSONList :: [ResolverThat's k] -> Value # toEncodingList :: [ResolverThat's k] -> Encoding #

parseResolverText :: MonadThrow m => Text -> m Resolver #

Try to parse a `Resolver` from a `Text`. Won't work for complex resolvers (like custom).

resolverDirName :: LoadedResolver -> Text #

Convert a Resolver into its `Text` representation, as will be used by directory names

resolverName :: ResolverThat's l -> Text #

Convert a Resolver into its `Text` representation for human presentation.

customResolverHash :: LoadedResolver -> Maybe SnapshotHash #

toResolverNotLoaded :: LoadedResolver -> Resolver #

data AbstractResolver #

Either an actual resolver value, or an abstract description of one (e.g., latest nightly).

Constructors

ARLatestNightly |
ARLatestLTS |
ARLatestLTSMajor !Int |
ARResolver !Resolver |
ARGlobal |

Instances

Show AbstractResolver # |
Methods showsPrec :: Int -> AbstractResolver -> ShowS # show :: AbstractResolver -> String # showList :: [AbstractResolver] -> ShowS #

readAbstractResolver :: ReadM AbstractResolver #