Skip to content

Commit 4301ac3

Browse files
TeofilCphadej
authored andcommitted
Prepare for change of Data.Text.Array to type synonym
In an upcoming version of text, Array will become a type synonym for Data.Array.Byte.ByteArray, which means that importing its constructors will no longer bring the ByteArray constructor into scope.
1 parent 704a403 commit 4301ac3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Data/Aeson/Internal/Text.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Data.ByteString (ByteString)
88
import qualified Data.Text as T
99

1010
#if MIN_VERSION_text(2,0,0)
11-
import Data.Text.Array (Array (..))
11+
import qualified Data.Text.Array as A
1212
import qualified Data.Text.Internal as T (Text (..))
1313

1414
import qualified Data.ByteString.Short.Internal as SBS
@@ -27,7 +27,7 @@ unsafeDecodeASCII :: ByteString -> T.Text
2727

2828
#if MIN_VERSION_text(2,0,0)
2929
unsafeDecodeASCII bs = withBS bs $ \_fp len -> if len == 0 then T.empty else
30-
let !(SBS.SBS arr) = SBS.toShort bs in T.Text (ByteArray arr) 0 len
30+
let !(SBS.SBS arr) = SBS.toShort bs in T.Text (A.ByteArray arr) 0 len
3131

3232
#else
3333
unsafeDecodeASCII = TE.decodeLatin1

0 commit comments

Comments
 (0)