snaplet-redson-0.1.0.0: CRUD for JSON data with Redis storage

Safe HaskellSafe-Infered

Snap.Snaplet.Redson.Snapless.Metamodel.Loader

Contents

Description

Model definitions loader.

Synopsis

Lower-level operations

loadGroups :: FilePath -> IO (Maybe Groups)Source

Load groups from definitions file.

loadModelSource

Arguments

:: FilePath

Path to model definition file

-> Groups

Group definitions

-> IO (Maybe Model) 

Load model from specified location, performing group splicing, applications and filling index cache.

High-level helper

loadModelsSource

Arguments

:: FilePath

Models directory

-> FilePath

Group definitions file

-> IO (Map ModelName Model) 

Read all models from directory to a map.

TODO: Perhaps rely on special directory file which explicitly lists all models.