cookbook 2.3.3.0 → 2.3.3.1
raw patch · 3 files changed
+9/−11 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Cookbook.Project.Quill.Quill2.Q2Api: qUnsafeExtract :: QuillStatus a -> a
- Cookbook.Project.Quill.Quill2.Q2Api: qMap :: QuillStatus a -> a
+ Cookbook.Project.Quill.Quill2.Q2Api: qMap :: QuillStatus [Quill] -> ([Quill] -> QuillStatus [Quill]) -> QuillStatus [Quill]
Files
- Cookbook/Project/Quill/Quill2/Q2Api.hs +7/−9
- Cookbook/Project/Quill/Quill2/Q2Prelude.hs +1/−1
- cookbook.cabal +1/−1
Cookbook/Project/Quill/Quill2/Q2Api.hs view
@@ -81,19 +81,17 @@ (ATable (g,b,c)) -> g (AList (g,b)) -> g --- | VERY unsafe function. Extracts the value of a QuillStatus, with an error on failure.-qUnsafeExtract :: QuillStatus a -> a-qUnsafeExtract c = case c of- (QuillSuccess a) -> a- _ -> error "Generic error in qUnsafeExtract. Do not use this temporary function."--qMap = qUnsafeExtract+-- | Map a Quill function.+qMap :: QuillStatus [Quill] -> ([Quill] -> QuillStatus [Quill]) -> QuillStatus [Quill]+qMap c f = case c of+ (QuillSuccess a) -> f a+ _ -> c -- | Change an item within the database using a Quill addition. Wrapper of addItem and removeItem. changeItem :: [Quill] -> QuillAddition -> QuillStatus [Quill] changeItem x y = case y of- (ATable (a,b,c)) -> addItem (qMap (removeItem x (a,b))) y- (AList (a,b)) -> addItem (qMap (removeItem x (a,b))) y+ (ATable (a,b,c)) -> qMap (removeItem x (a,b)) (`addItem` y)+ (AList (a,b)) -> qMap (removeItem x (a,b)) (`addItem` y) -- | Turn a Quill table into a string.
Cookbook/Project/Quill/Quill2/Q2Prelude.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-}-{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE KindSignatures #-} {- | Module : Cookbook.Project.Quill.Quill2.Q2Prelude Copyright : (c) 2014 by Nate Pisarski
cookbook.cabal view
@@ -3,7 +3,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 2.3.3.0+version: 2.3.3.1 synopsis: Tiered general-purpose libraries with domain-specific applications. description: Cookbook is a line of libraries covering a wide variety of Haskell applications. Every application that I make, I add its functions to Cookbook, turning Cookbook into an all-encompassing general-purpose library over time. The claim-to-fame for the library is its use of overloaded typeclasses, called "Continuities". license: BSD3