aoc2018-0.1.0.0: Advent of Code 2018 solutions and auto-runner

Copyright(c) Justin Le 2018
LicenseBSD3
Maintainerjustin@jle.im
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

AOC.Run.Config

Description

Utilities for loading configuration file.

Synopsis

Documentation

data Config Source #

Configuration for auto-runner.

Constructors

Cfg 

Fields

Instances
Generic Config Source # 
Instance details

Defined in AOC.Run.Config

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

ToJSON Config Source # 
Instance details

Defined in AOC.Run.Config

FromJSON Config Source # 
Instance details

Defined in AOC.Run.Config

Default Config Source #

No session key, and 2015.

Instance details

Defined in AOC.Run.Config

Methods

def :: Config #

type Rep Config Source # 
Instance details

Defined in AOC.Run.Config

type Rep Config = D1 (MetaData "Config" "AOC.Run.Config" "aoc2018-0.1.0.0-Hkhvhpmf68i25W661VmcCR" False) (C1 (MetaCons "Cfg" PrefixI True) (S1 (MetaSel (Just "_cfgSession") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "_cfgYear") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))

configFile :: FilePath -> IO Config Source #

Load a Config from a given filepath.

defConfPath :: FilePath Source #

Default math to find a configuration file.

session :: FilePath -> IO (Maybe String) Source #

Load a session token from the configuration file at a given filepath.