{-# LANGUAGE GADTs, KindSignatures, TypeOperators #-}
-- | This library allows one to create mutable (but thread-safe)
-- lists of values and access them quickly
-- with certain automatically updated indices (foreign keys).
module Data.HMemDb
     MS, GS, SP,
-- * Tables
     Table, foldTable_,
     TableVar, TableVarS,
     deleteTV, modifyTV, readTV,
     ForeignKey, keyTarget,
-- * Ids
     TableVarId, idToVar, varToId,
-- * Specs
     FullSpec(FullSpec, keySpec, tabSpec),
-- ** Table specs
     TableSpec, ColSpec, val, key, tref,
-- ** Key specs
     KeySpec, unique, nonunique,
-- * Creating tables
     Keys(Keys), RefContainer, IsKeySpec, (:+:)((:+:)),
-- * Basic operations
     insert, select, delete, update,
-- * Serialization
     getTable, putTable,
import Data.HMemDb.Binary (GS, SP)
import Data.HMemDb.CreateTable (CreateTable, IsKeySpec, createTable)
import Data.HMemDb.ForeignKeys (ForeignKey, delete, keyTarget, select, update)
import Data.HMemDb.MapTVar (MS)
import Data.HMemDb.Persistence (getTable, putTable)
import Data.HMemDb.RefContainer (RefContainer)
import Data.HMemDb.Specs
    (ColSpec, FullSpec(FullSpec, keySpec, tabSpec),
     Keys(Keys), KeySpec, TableSpec,
     key, nonunique, tref, val, unique, (:+:)((:+:)))
import Data.HMemDb.Tables (Table, foldTable_)
import Data.HMemDb.TableVarId (TableVarId, idToVar, varToId)
import Data.HMemDb.TableVars
    (TableVar, TableVarS,
     deleteTV, forTV, insert, modifyTV, readTV, selectAll, tableVarTarget)