on master help sign in
Add Streamly.Data.Unbox
569dbe9Adithya Kumar
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
336
336
337 -- streamly-core exposed modules
337 -- streamly-core exposed modules
338 , Streamly.Data.Stream
338 , Streamly.Data.Stream
339+ , Streamly.Data.Unbox
339 , Streamly.Data.Fold
340 , Streamly.Data.Fold
340 , Streamly.Data.Fold.Tee
341 , Streamly.Data.Fold.Tee
341 , Streamly.Data.Unfold
342 , Streamly.Data.Unfold
streamly.cabal+1
@@ -214,6 +214,7 @@ extra-source-files:
214 core/src/Streamly/Data/Fold/Tee.hs
214 core/src/Streamly/Data/Fold/Tee.hs
215 core/src/Streamly/Data/Unfold.hs
215 core/src/Streamly/Data/Unfold.hs
216 core/src/Streamly/Internal/Data/Fold/Window.hs
216 core/src/Streamly/Internal/Data/Fold/Window.hs
217+ core/src/Streamly/Data/Unbox.hs
217 core/src/Streamly/Data/Array/Unboxed.hs
218 core/src/Streamly/Data/Array/Unboxed.hs
218 core/src/Streamly/Data/Array/Unboxed/Mut.hs
219 core/src/Streamly/Data/Array/Unboxed/Mut.hs
219 core/src/Streamly/Internal/Data/Time/Clock/Darwin.c
220 core/src/Streamly/Internal/Data/Time/Clock/Darwin.c