summoner-2.0.1.0: Tool for scaffolding fully configured batteries-included production-level Haskell projects.
Copyright(c) 2017-2019 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Summoner.Source

Description

This module contains the Source data that describes how to fetch custom files.

Synopsis

Documentation

data Source Source #

Type of the source resource.

Constructors

Url !Text

URL link to the source file. Such files will be downloaded by URL. But they are ingored in the offline mode.

Local !FilePath

File path to the local source file.

Raw !Text

Raw file text content.

Instances

Instances details
Eq Source Source # 
Instance details

Defined in Summoner.Source

Methods

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

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

Show Source Source # 
Instance details

Defined in Summoner.Source

sourceCodec :: TomlCodec Source Source #

This TomlCodec is used in the files field of config. It decodes corresponding constructor from the top-level key.

fetchSources :: ConnectMode -> Map FilePath Source -> IO [TreeFs] Source #

This function fetches contents of extra file sources.

fetchSource :: ConnectMode -> Source -> IO (Maybe Text) Source #

Fetches content of the given extra file source. Doesn't fetch Url if the ConnectMode is Offline.