free-compiler-0.3.0.0: A Haskell to Coq compiler.

Safe HaskellNone
LanguageHaskell2010

FreeC.Util.Config

Description

This module contains utility functions for working with TOML configuration files and JSON data.

Synopsis

Documentation

loadConfig :: (MonadIO r, MonadReporter r, FromJSON a) => FilePath -> r a Source #

Loads a .json or .toml file and decodes its contents using the Aeson interface.

The configuration file type is inferred from the file extension.

saveConfig :: (MonadIO r, MonadReporter r, ToJSON a) => FilePath -> a -> r () Source #

Encodes the given value using its Aeson interface and saves the encoded value as .json file.