on master help sign in
Add Streamly.Data.Unbox
commit569dbe92e54060254a059ba62e085aca90b642ce authorAdithya Kumar <adithya@composewell.com> dateTue 16 Aug 2022, 15:27 (4 years ago) parentc4dd0cb
3 files changed+30
core/src/Streamly/Data/Unbox.hs+28 core/streamly-core.cabal+1 streamly.cabal+1
core/src/Streamly/Data/Unbox.hsnew file+28
@@ -0,0 +1,28 @@
1+-- |
2+-- Module : Streamly.Data.Unbox
3+-- Copyright : (c) 2022 Composewell Technologies
4+--
5+-- License : BSD3
6+-- Maintainer : streamly@composewell.com
7+-- Stability : released
8+-- Portability : GHC
9+--
10+-- This module provides the 'Unbox' type class for converting Haskell values to
11+-- unboxed representation in a 'MutableByteArray' and boxing values from
12+-- 'MutableByteArray' to create Haskell representation.
13+--
14+
15+module Streamly.Data.Unbox
16+ (
17+ Unbox(..)
18+ , MutableByteArray(..)
19+ )
20+where
21+
22+import Streamly.Internal.Data.Unboxed (Unbox(..), MutableByteArray(..))
23+
24+-- $setup
25+-- >>> :m
26+-- >>> :set -XFlexibleContexts
27+-- >>> :set -package streamly
28+-- >>> import Streamly.Internal.Data.Unboxed (Unbox(..), MutableByteArray(..))
core/streamly-core.cabal+1
@@ -336,6 +336,7 @@ library
336336
337337 -- streamly-core exposed modules
338338 , Streamly.Data.Stream
339+ , Streamly.Data.Unbox
339340 , Streamly.Data.Fold
340341 , Streamly.Data.Fold.Tee
341342 , Streamly.Data.Unfold
streamly.cabal+1
@@ -214,6 +214,7 @@ extra-source-files:
214214 core/src/Streamly/Data/Fold/Tee.hs
215215 core/src/Streamly/Data/Unfold.hs
216216 core/src/Streamly/Internal/Data/Fold/Window.hs
217+ core/src/Streamly/Data/Unbox.hs
217218 core/src/Streamly/Data/Array/Unboxed.hs
218219 core/src/Streamly/Data/Array/Unboxed/Mut.hs
219220 core/src/Streamly/Internal/Data/Time/Clock/Darwin.c