cookbook-3.0.1.1: Tiered general-purpose libraries with domain-specific applications.

Copyright(c) 2014 by Nate Pisarski
LicenseBSD3
Maintainernathanpisarski@gmail.com
StabilityStable
PortabilityPortable (Cookbook)
Safe HaskellSafe
LanguageHaskell98

Cookbook.Project.Quill2.Q2Api

Description

Q2Api is the user-facing part of Quill. It has all the functions necessar to Create, Read, Update, and Delete information from the database, and turn a database back into a Quill-readable string.

Synopsis

Documentation

getQuillName :: Quill -> String Source #

Get the name of a Quill.

getQuillBody :: Quill -> Element String Source #

Return the element of the Quill, specifically useful for lists.

getQuill :: [Quill] -> String -> QuillStatus Quill Source #

Find a quill in the database by name, returning it or a possible error type.

lookUp :: [Quill] -> (String, String) -> QuillStatus String Source #

Look up the value of a Quill TABLE. Will produce an error on a list.

removeQuill :: [Quill] -> String -> [Quill] Source #

Remove a quill from the database by name.

removeItem :: [Quill] -> (String, String) -> QuillStatus [Quill] Source #

Remove an item from a Quill within a database. Works aggressively, meaning it removes all copies to help sanitize QuillMultiples out. th

addQuill :: [Quill] -> Quill -> [Quill] Source #

Adds a Quill databse to the file.

addItem :: [Quill] -> QuillAddition -> QuillStatus [Quill] Source #

Add a QuillAddition to the databse. QuillAddition is a safe encapsulation of list and table values.

qMap :: QuillStatus [Quill] -> ([Quill] -> QuillStatus [Quill]) -> QuillStatus [Quill] Source #

Map a Quill function.

changeItem :: [Quill] -> QuillAddition -> QuillStatus [Quill] Source #

Change an item within the database using a Quill addition. Wrapper of addItem and removeItem.

toString :: Quill -> String Source #

Turn a Quill table into a string.