tools-yj 0.1.0.33 → 0.1.0.34
raw patch · 2 files changed
+21/−2 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Data.Sequence.ToolsYj: cons :: a -> Seq a -> Seq a
+ Data.Sequence.ToolsYj: snoc :: Seq a -> a -> Seq a
+ Data.Sequence.ToolsYj: uncons :: Seq a -> Maybe (a, Seq a)
+ Data.Sequence.ToolsYj: unsnoc :: Seq a -> Maybe (Seq a, a)
Files
- src/Data/Sequence/ToolsYj.hs +20/−1
- tools-yj.cabal +1/−1
src/Data/Sequence/ToolsYj.hs view
@@ -1,9 +1,28 @@ {-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -Wall -fno-warn-tabs #-} -module Data.Sequence.ToolsYj (splitAt') where+module Data.Sequence.ToolsYj ( + cons, snoc, uncons, unsnoc,++ splitAt'++ ) where+ import Data.Sequence qualified as Seq++cons :: a -> Seq.Seq a -> Seq.Seq a+cons = (Seq.:<|)++snoc :: Seq.Seq a -> a -> Seq.Seq a+snoc = (Seq.:|>)++uncons :: Seq.Seq a -> Maybe (a, Seq.Seq a)+uncons = \case Seq.Empty -> Nothing; x Seq.:<| s -> Just (x, s)++unsnoc :: Seq.Seq a -> Maybe (Seq.Seq a, a)+unsnoc = \case Seq.Empty -> Nothing; s Seq.:|> x -> Just (s, x) splitAt' :: Int -> Seq.Seq a -> Maybe (Seq.Seq a, Seq.Seq a) splitAt' n s
tools-yj.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: tools-yj-version: 0.1.0.33+version: 0.1.0.34 synopsis: Tribial tools description: Please see the README on GitHub at <https://github.com/YoshikuniJujo/tools-yj#readme> category: Tools