File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cabal-version : 2.4
22name : byteslice
3- version : 0.2.14 .0
3+ version : 0.2.15 .0
44synopsis : Slicing managed and unmanaged memory
55description :
66 This library provides types that allow the user to talk about a slice of
@@ -35,6 +35,7 @@ library
3535 exposed-modules :
3636 Data.Bytes
3737 Data.Bytes.Chunks
38+ Data.Bytes.Indexed
3839 Data.Bytes.Encode.BigEndian
3940 Data.Bytes.Encode.LittleEndian
4041 Data.Bytes.Internal
Original file line number Diff line number Diff line change 1+ {-# language DataKinds #-}
2+ {-# language TypeOperators #-}
3+
4+ module Data.Bytes.Indexed
5+ ( ByteArrayN
6+ , append
7+ ) where
8+
9+ import Data.Bytes.Types (ByteArrayN (ByteArrayN ))
10+ import GHC.TypeNats (type (+ ))
11+
12+ append :: ByteArrayN m -> ByteArrayN n -> ByteArrayN (m + n )
13+ {-# inline append #-}
14+ append (ByteArrayN x) (ByteArrayN y) = ByteArrayN (x <> y)
You can’t perform that action at this time.
0 commit comments