{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE TypeApplications #-}
module Data.Bytes.Text.Latin1
( toString
, fromString
, equals1
, equals2
, equals3
, equals4
, equals5
, equals6
, equals7
, equals8
, equals9
, equals10
, equals11
, equals12
) where
import Data.Bytes.Types (Bytes(..))
import Data.Char (ord)
import Data.Primitive (ByteArray(ByteArray))
import GHC.Exts (Int(I#),Char(C#),word2Int#,chr#)
import GHC.Word (Word8(W8#))
import qualified Data.Bytes.Pure as Bytes
import qualified GHC.Exts as Exts
fromString :: String -> Bytes
fromString :: String -> Bytes
fromString =
ByteArray -> Bytes
Bytes.fromByteArray (ByteArray -> Bytes) -> (String -> ByteArray) -> String -> Bytes
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Word8] -> ByteArray
forall l. IsList l => [Item l] -> l
Exts.fromList ([Word8] -> ByteArray)
-> (String -> [Word8]) -> String -> ByteArray
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Word8) -> String -> [Word8]
forall a b. (a -> b) -> [a] -> [b]
map ((Integral Int, Num Word8) => Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral @Int @Word8 (Int -> Word8) -> (Char -> Int) -> Char -> Word8
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Int
ord)
toString :: Bytes -> String
{-# INLINE toString #-}
toString :: Bytes -> String
toString = (Word8 -> String -> String) -> String -> Bytes -> String
forall a. (Word8 -> a -> a) -> a -> Bytes -> a
Bytes.foldr (\(W8# Word#
w) String
xs -> Char# -> Char
C# (Int# -> Char#
chr# (Word# -> Int#
word2Int# Word#
w)) Char -> String -> String
forall a. a -> [a] -> [a]
: String
xs) []
equals1 :: Char -> Bytes -> Bool
{-# INLINE equals1 #-}
equals1 :: Char -> Bytes -> Bool
equals1 !Char
c0 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
1 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off
Int
_ -> Bool
False
equals2 :: Char -> Char -> Bytes -> Bool
equals2 :: Char -> Char -> Bytes -> Bool
equals2 !Char
c0 !Char
c1 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
2 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1)
Int
_ -> Bool
False
equals3 :: Char -> Char -> Char -> Bytes -> Bool
equals3 :: Char -> Char -> Char -> Bytes -> Bool
equals3 !Char
c0 !Char
c1 !Char
c2 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
3 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2)
Int
_ -> Bool
False
equals4 :: Char -> Char -> Char -> Char -> Bytes -> Bool
equals4 :: Char -> Char -> Char -> Char -> Bytes -> Bool
equals4 !Char
c0 !Char
c1 !Char
c2 !Char
c3 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
4 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3)
Int
_ -> Bool
False
equals5 :: Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals5 :: Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals5 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
5 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4)
Int
_ -> Bool
False
equals6 :: Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals6 :: Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals6 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
6 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5)
Int
_ -> Bool
False
equals7 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals7 :: Char
-> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals7 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
7 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6)
Int
_ -> Bool
False
equals8 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals8 :: Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Bytes
-> Bool
equals8 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 !Char
c7 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
8 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6) Bool -> Bool -> Bool
&&
Char
c7 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7)
Int
_ -> Bool
False
equals9 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals9 :: Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Bytes
-> Bool
equals9 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 !Char
c7 !Char
c8 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
9 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6) Bool -> Bool -> Bool
&&
Char
c7 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7) Bool -> Bool -> Bool
&&
Char
c8 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
8)
Int
_ -> Bool
False
equals10 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals10 :: Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Bytes
-> Bool
equals10 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 !Char
c7 !Char
c8 !Char
c9 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
10 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6) Bool -> Bool -> Bool
&&
Char
c7 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7) Bool -> Bool -> Bool
&&
Char
c8 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
8) Bool -> Bool -> Bool
&&
Char
c9 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
9)
Int
_ -> Bool
False
equals11 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals11 :: Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Bytes
-> Bool
equals11 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 !Char
c7 !Char
c8 !Char
c9 !Char
c10 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
11 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6) Bool -> Bool -> Bool
&&
Char
c7 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7) Bool -> Bool -> Bool
&&
Char
c8 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
8) Bool -> Bool -> Bool
&&
Char
c9 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
9) Bool -> Bool -> Bool
&&
Char
c10 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
10)
Int
_ -> Bool
False
equals12 :: Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Char -> Bytes -> Bool
equals12 :: Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Char
-> Bytes
-> Bool
equals12 !Char
c0 !Char
c1 !Char
c2 !Char
c3 !Char
c4 !Char
c5 !Char
c6 !Char
c7 !Char
c8 !Char
c9 !Char
c10 !Char
c11 (Bytes ByteArray
arr Int
off Int
len) = case Int
len of
Int
12 -> Char
c0 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr Int
off Bool -> Bool -> Bool
&&
Char
c1 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Bool -> Bool -> Bool
&&
Char
c2 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2) Bool -> Bool -> Bool
&&
Char
c3 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3) Bool -> Bool -> Bool
&&
Char
c4 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4) Bool -> Bool -> Bool
&&
Char
c5 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5) Bool -> Bool -> Bool
&&
Char
c6 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6) Bool -> Bool -> Bool
&&
Char
c7 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7) Bool -> Bool -> Bool
&&
Char
c8 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
8) Bool -> Bool -> Bool
&&
Char
c9 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
9) Bool -> Bool -> Bool
&&
Char
c10 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
10) Bool -> Bool -> Bool
&&
Char
c11 Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== ByteArray -> Int -> Char
indexCharArray ByteArray
arr (Int
off Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
11)
Int
_ -> Bool
False
indexCharArray :: ByteArray -> Int -> Char
indexCharArray :: ByteArray -> Int -> Char
indexCharArray (ByteArray ByteArray#
arr) (I# Int#
off) = Char# -> Char
C# (ByteArray# -> Int# -> Char#
Exts.indexCharArray# ByteArray#
arr Int#
off)