diff --git a/src/Data/ByteArray/Builder/Small/Bounded.hs b/src/Data/ByteArray/Builder/Small/Bounded.hs index 429e0c5..892b36d 100644 --- a/src/Data/ByteArray/Builder/Small/Bounded.hs +++ b/src/Data/ByteArray/Builder/Small/Bounded.hs @@ -22,6 +22,7 @@ module Data.ByteArray.Builder.Small.Bounded , pasteGrowST , pasteIO -- * Combine + , empty , append -- * Bounds Manipulation , (<=) @@ -136,6 +137,10 @@ construct f = Builder infixr 9 `append` +-- | The monoidal unit of `append` +empty :: Builder 0 +empty = Builder $ \_ off0 s0 -> (# s0, off0 #) + -- | Concatenate two builders. append :: Builder n -> Builder m -> Builder (n + m) append (Builder f) (Builder g) =