unlifted 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+20/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Data.Unlifted: [Bool#] :: Int# -> Bool#
+ Data.Unlifted: [Bool#] :: Word# -> Bool#
- Data.Unlifted: newtype Bool# :: TYPE 'IntRep
+ Data.Unlifted: newtype Bool# :: TYPE 'WordRep
Files
- CHANGELOG.md +4/−0
- src/Data/Unlifted.hs +15/−7
- unlifted.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for unlifted +## 0.2.0.0 -- 2023-08-22++* Add `Text#`. Change `Bool#` to use `Word#` instead of `Int#`.+ ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world.
src/Data/Unlifted.hs view
@@ -27,7 +27,7 @@ ) where import Data.Kind (Type)-import GHC.Exts (TYPE,State#,Levity(Unlifted),RuntimeRep(..),Int#,ByteArray#,MutableByteArray#)+import GHC.Exts (TYPE,State#,Levity(Unlifted),RuntimeRep(..),Int#,ByteArray#,MutableByteArray#,Word#,Int32#) -- | Variant of @ST@ where the argument type does not have to be lifted. -- This does not have a monad instance and is difficult to use.@@ -36,10 +36,9 @@ { unST# :: State# s -> (# State# s, a #) } -> ST# s a --- | Unboxed variant of @Bool@. This might be changed to use @Int8Rep@ in the--- future.-newtype Bool# :: TYPE 'IntRep where- Bool# :: Int# -> Bool#+-- | Unboxed variant of @Bool@.+newtype Bool# :: TYPE 'WordRep where+ Bool# :: Word# -> Bool# -- | Unboxed variant of @Maybe@. newtype Maybe# :: forall (r :: RuntimeRep). TYPE r -> TYPE ('SumRep '[ 'TupleRep '[], r ]) where@@ -52,10 +51,10 @@ {-# complete True#, False# #-} pattern True# :: Bool#-pattern True# = Bool# 1#+pattern True# = Bool# 1## pattern False# :: Bool#-pattern False# = Bool# 0#+pattern False# = Bool# 0## -- | Mutable variant of 'PrimArray#'. newtype MutablePrimArray# :: forall (r :: RuntimeRep). Type -> TYPE r -> TYPE ('BoxedRep 'Unlifted) where@@ -72,3 +71,12 @@ -- | Unlifted variant of @ShortText@. newtype ShortText# :: TYPE ('BoxedRep 'Unlifted) where ShortText# :: ByteArray# -> ShortText#++-- | Unboxed variant of @Text@. This includes a somewhat dubious restriction+-- that on the offset and length that prevents byte arrays larger than 2GiB+-- from being used as the backing store.+--+-- This decision makes the type work well in the vext library, and it makes+-- the in-memory format close to what Apache Arrow uses. +newtype Text# :: TYPE ('TupleRep ['BoxedRep 'Unlifted, 'Int32Rep, 'Int32Rep]) where+ Text# :: (# ByteArray#, Int32#, Int32# #) -> Text#
unlifted.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: unlifted-version: 0.1.0.0+version: 0.2.0.0 synopsis: Unlifted and levity-polymorphic types description: Unlifted and levity-polymorphic variants of several types from