packages feed

cookbook 2.0.0.0 → 2.0.0.1

raw patch · 5 files changed

+25/−6 lines, 5 files

Files

Cookbook/Essential/Common.hs view
@@ -5,7 +5,7 @@ --informational contexts for modifying/accessing lists. They are placed in this high of a module because --of how ubiquitous their use is, even though they fit in with Cookbook.Ingredients.Lists -module Cookbook.Essential.Common(sub,positions,pos,apply,flt) where+module Cookbook.Essential.Common(sub,positions,pos,apply,flt,fromLast) where  -- | Returns a new list starting at a position. List positions start at 0. sub :: (Eq a) => [a] -> Int -> [a]@@ -33,4 +33,7 @@ flt [] = [] flt (x:xs) = x ++ flt xs -+fromLast :: ([a] -> [a]) -> [a] -> [a]+fromLast f c = rev $ f $ rev c+  where rev [] = []+        rev (x:xs) = rev xs ++ [x]
Cookbook/Ingredients/Lists/Replace.hs view
@@ -13,7 +13,7 @@  -- | Transforms lists of any type.   replace  :: list -> repls -> list-+   instance (Eq a) => Replacable [a] (a,a) where   replace lst (on,tw) = map (\c -> if c == on then tw else c) lst   
+ Cookbook/Ingredients/Lists/Splice.hs view
@@ -0,0 +1,14 @@+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+module Cookbook.Ingredients.Lists.Splice(Splicable(..)) where+import qualified Cookbook.Essential.Continuous as Ct+import qualified Cookbook.Essential.Common     as Cm++class Splicable a b where+  splice :: a -> b -> a++instance (Eq a) => Splicable [a] (a,a) where+  splice ls (a,b) = Ct.before ls a ++ Cm.fromLast ((flip Ct.before) b) ls++instance (Eq a) => Splicable [a] ([a],[a]) where+  splice ls (a,b)  = Ct.before ls a ++ Ct.after (Ct.after ls a) b
Cookbook/Project/Quill/Quill.hs view
@@ -4,14 +4,16 @@ import qualified Cookbook.Ingredients.Lists.Remove as Rm import qualified Cookbook.Ingredients.Lists.Modify as Md import qualified Cookbook.Ingredients.Lists.Access as Ac+import qualified Cookbook.Ingredients.Lists.Splice as Sp import qualified Cookbook.Ingredients.Tupples.Look as Lk import qualified Cookbook.Recipes.Sanitize         as Sn+ --Custom data data Table = Table {name :: String, info :: [(String,String)]}  -- Parsing prepare :: [String] -> String-prepare = ((flip Sn.blacklist) [' ','\n']) . Cm.flt+prepare = ((flip Sp.splice) ("(*","*)")) . ((flip Sn.blacklist) [' ','\n']) . Cm.flt  tokenize :: [a] -> [(a,a)] tokenize []  = []
cookbook.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             2.0.0.0+version:             2.0.0.1  -- A short (one-line) description of the package. synopsis:            A delicious set of interdependant libraries.@@ -48,7 +48,7 @@  library   -- Modules exported by the library.-  exposed-modules:     Cookbook.Project.Context.Context, Cookbook.Essential.Common, Cookbook.Essential.Continuous, Cookbook.Essential.IO, Cookbook.Recipes.DiffStat,  Cookbook.Project.Configuration.Configuration, Cookbook.Project.Scribe.Scribe, Cookbook.Project.Preprocess.Preprocess, Cookbook.Ingredients.Functional.Break, Cookbook.Ingredients.Lists.Access, Cookbook.Ingredients.Lists.Remove, Cookbook.Ingredients.Lists.Modify, Cookbook.Ingredients.Lists.Stats, Cookbook.Ingredients.Tupples.Look, Cookbook.Ingredients.Tupples.Assemble, Cookbook.Recipes.Detect, Cookbook.Project.Groups.Groups, Cookbook.Recipes.Sanitize, Cookbook.Ingredients.Lists.Replace, Cookbook.Recipes.Math,Cookbook.Recipes.DataStructures,Cookbook.Recipes.Algorithm, Cookbook.Project.Quill.Quill+  exposed-modules:     Cookbook.Project.Context.Context, Cookbook.Essential.Common, Cookbook.Essential.Continuous, Cookbook.Essential.IO, Cookbook.Recipes.DiffStat,  Cookbook.Project.Configuration.Configuration, Cookbook.Project.Scribe.Scribe, Cookbook.Project.Preprocess.Preprocess, Cookbook.Ingredients.Functional.Break, Cookbook.Ingredients.Lists.Access, Cookbook.Ingredients.Lists.Remove, Cookbook.Ingredients.Lists.Modify, Cookbook.Ingredients.Lists.Stats, Cookbook.Ingredients.Tupples.Look, Cookbook.Ingredients.Tupples.Assemble, Cookbook.Recipes.Detect, Cookbook.Project.Groups.Groups, Cookbook.Recipes.Sanitize, Cookbook.Ingredients.Lists.Replace, Cookbook.Recipes.Math,Cookbook.Recipes.DataStructures,Cookbook.Recipes.Algorithm, Cookbook.Project.Quill.Quill, Cookbook.Ingredients.Lists.Splice      -- Modules included in this library but not exported.   -- other-modules: