packages feed

halfsplit 0.2.0.0 → 0.3.0.0

raw patch · 4 files changed

+26/−2 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Phladiprelio.Halfsplit: print23 :: String -> String -> Int -> [String] -> IO ()

Files

CHANGELOG.md view
@@ -8,3 +8,7 @@  * Second version. Added showWithSpaces function. +## 0.3.0.0 -- 2023-08-14++* Trird version. Added a new function print23.+
Phladiprelio/Halfsplit.hs view
@@ -20,6 +20,8 @@ import Data.List hiding (foldr) import GHC.Int (Int8) import Text.Show (Show(..))+import System.IO (putStrLn,getLine,putStr)+import Data.Tuple (fst)  -- | Converts the data that is an instance of 'Show' typeclass to be printed in two-column way. halfsplit @@ -73,3 +75,15 @@     where xs = show x           l = length xs +print23 :: String -> String -> Int -> [String] -> IO ()+print23 prestr poststr n xss = do+  putStrLn prestr+  let linez = zip xss [1..]+  if n >= 2 && n <= l - 1+      then do+          let linez3 = (\(x:y:t:xs) -> x:(' ':y):(' ':' ':t):xs) . map fst . filter (\(ts,m) -> m `elem` [n - 1..n + 1]) $ linez+          mapM (putStrLn) linez3 >> putStrLn poststr+      else (case n of+             1 -> putStr " " >> mapM putStrLn (take 2 xss)+             m -> if m == l then mapM putStrLn ((\(x:y:xs) -> x:(' ':y):xs) . drop (l - 2) $ xss) else mapM putStrLn []) >> putStrLn poststr+         where l = length xss
README.md view
@@ -3,8 +3,14 @@  The author would like to devote this project to support the Foundation GASTROSTARS. -If you would like to share some financial support, please, contact the foundation+If you would like to share some financial support, please, contact the mentioned foundation using the URL:  [Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren)++The version 0.3.0.0 is devoted to [Enzo Kok](https://enzokok.nl) whose Birthday is on the 14th of August. 
halfsplit.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               halfsplit-version:            0.2.0.0+version:            0.3.0.0  -- A short (one-line) description of the package. synopsis:           A library to provide special kind of two-column terminal output for Phladiprelio.