File: Array.hs

package info (click to toggle)
haskell-isomorphism-class 0.1.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88 kB
  • sloc: haskell: 529; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE CPP #-}

module IsomorphismClass.TextCompat.Array where

import Data.Text.Array
import GHC.Exts (ByteArray#)

{-# INLINE toUnliftedByteArray #-}
toUnliftedByteArray :: Array -> ByteArray#
#if MIN_VERSION_text(2,0,0)
toUnliftedByteArray (ByteArray a) = a
#else
toUnliftedByteArray (Array a) = a
#endif

{-# INLINE fromUnliftedByteArray #-}
fromUnliftedByteArray :: ByteArray# -> Array
#if MIN_VERSION_text(2,0,0)
fromUnliftedByteArray = ByteArray
#else
fromUnliftedByteArray = Array
#endif