cookbook 2.3.4.2 → 2.3.4.3
raw patch · 4 files changed
+17/−10 lines, 4 files
Files
- Cookbook/Project/Quill/Quill2/Q2Api.hs +1/−1
- Cookbook/Project/Quill/Quill2/Q2Io.hs +11/−2
- Cookbook/Project/Quill/Quill2/Q2Parse.hs +4/−6
- cookbook.cabal +1/−1
Cookbook/Project/Quill/Quill2/Q2Api.hs view
@@ -52,7 +52,7 @@ | x == c = removeQuill xs c -- See [Q2N1] | otherwise = (x,y) : removeQuill xs c --- | Remove an item from a Quill within a database. Works aggressively, meaning it removes all copies to help sanitize QuillMultiples out.+-- | Remove an item from a Quill within a database. Works aggressively, meaning it removes all copies to help sanitize QuillMultiples out. th removeItem :: [Quill] -> (String, String) -> QuillStatus [Quill] removeItem x (a,b) = case getQuill x a of QuillSuccess (c,j) -> case j of
Cookbook/Project/Quill/Quill2/Q2Io.hs view
@@ -21,8 +21,17 @@ -- | Read a Quill database from a file. fromFile :: FilePath -> IO [Quill]-fromFile x = fmap pFile $ Io.filelines x+fromFile x = do+ y <- Io.filelines x+ return $ pFile y -- | Send a Quill database into a parsable format in a file. toFile :: FilePath -> [Quill] -> IO ()-toFile x c = writeFile x $ unlines $ map Q2Api.toString c+toFile _ [] = do+ return ()+toFile x (c:cs) = do+ putStrLn $ show c+ putStrLn (Q2Api.toString c)+ appendFile x (Q2Api.toString c)+ toFile x cs+ return ()
Cookbook/Project/Quill/Quill2/Q2Parse.hs view
@@ -39,9 +39,7 @@ -- | Turn the lines of a file into a list of tables, AKA a Database. pFile :: [String] -> [Quill]-pFile x = case allTables of- [] -> []- (y:ys) -> pTable y : pFile ys- where- prepared = prepare x- allTables = Md.splitOn prepared '}'+pFile x = map pTable $ Md.splitOn (prepare x) '}'+++
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.4.2+version: 2.3.4.3 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