pfile-0.1.0.1: CLI program for profiles management.
Copyright(c) 2024 Illia Shkroba
LicenseBSD3
MaintainerIllia Shkroba <[email protected]>
Stabilityunstable
Portabilitynon-portable (Non-Unix systems are not supported)
Safe HaskellSafe-Inferred
LanguageHaskell2010

PFile.Profile.Internal.Serialization

Description

Types and functions for profiles serialization.

Synopsis

Documentation

load :: (MonadReader Env m, MonadError LoadError m, MonadIO m) => Name -> m Profile Source #

Load Profile named Name from its profileState.

Since: 0.1.0.0

data LoadError Source #

Error thrown by load.

Since: 0.1.0.0

Constructors

LoadError !Absolute !IOException

IOException was encountered during eitherDecodeFileStrict.

DecodeError !Absolute ![Char]

Decoding error was encountered during eitherDecodeFileStrict.

dump :: (MonadReader Env m, MonadError DumpError m, MonadIO m) => Profile -> m () Source #

Dump Profile to its profileState.

Since: 0.1.0.0

data DumpError Source #

Error thrown by dump.

Since: 0.1.0.0

Constructors

CreateParentInDumpError !CreateParentError

Unable to create a parent directory for profileState.

DumpError !Absolute !IOException

IOException was encountered during encodeFile.