spago-0.21.0
Safe HaskellNone
LanguageHaskell2010

Spago.Config

Synopsis

Documentation

defaultPath :: IsString t => t #

Default path for the Spago Config

makeConfig :: (HasConfigPath env, HasLogFunc env) => Force -> TemplateComments -> RIO env Config #

Copies over `spago.dhall` to set up a Spago project. Eventually ports an existing `psc-package.json` to the new config.

makeTempConfig :: (HasLogFunc env, HasPurs env) => Set PackageName -> Maybe Text -> Set SourcePath -> Maybe Text -> RIO env Config #

Create a Config in memory | For use by `spago script` and `spago repl`

ensureConfig :: (HasLogFunc env, HasConfigPath env) => RIO env (Either Utf8Builder Config) #

Checks that the Spago config is there and readable

addDependencies :: (HasLogFunc env, HasConfigPath env) => Config -> [PackageName] -> RIO env () #

Try to add the newPackages to the "dependencies" list in the Config. It will not add any dependency if any of them is not in the package set. If everything is fine instead, it will add the new deps, sort all the dependencies, and write the Config back to file.

parsePackage :: (MonadIO m, MonadThrow m, MonadReader env m, HasLogFunc env) => ResolvedExpr -> m Package #

parsePackageSet :: HasLogFunc env => Map Text (DhallExpr Void) -> RIO env PackageSet #

Parse the contents of a "packages.dhall" file (or the "packages" key of an evaluated "spago.dhall")

data Config #

Spago configuration file type

Instances

Instances details
Generic Config # 
Instance details

Defined in Spago.Types

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Show Config # 
Instance details

Defined in Spago.Types

type Rep Config # 
Instance details

Defined in Spago.Types

data PublishConfig #

The extra fields that are only needed for publishing libraries.

Instances

Instances details
Generic PublishConfig # 
Instance details

Defined in Spago.Types

Associated Types

type Rep PublishConfig 
Instance details

Defined in Spago.Types

type Rep PublishConfig = D1 ('MetaData "PublishConfig" "Spago.Types" "spago-0.21.0-7fGZ7CPhD6UKUhYlrl5wZv" 'False) (C1 ('MetaCons "PublishConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "publishLicense") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "publishRepository") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Show PublishConfig # 
Instance details

Defined in Spago.Types

type Rep PublishConfig # 
Instance details

Defined in Spago.Types

type Rep PublishConfig = D1 ('MetaData "PublishConfig" "Spago.Types" "spago-0.21.0-7fGZ7CPhD6UKUhYlrl5wZv" 'False) (C1 ('MetaCons "PublishConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "publishLicense") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "publishRepository") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))