src/Data/Text/Manipulate/Internal/Fusion.hs:81:17: error:
• Couldn't match expected type: Char -> CC s
with actual type: CC s
• The function ‘CC’ is applied to three value arguments,
but its type ‘s -> GHC.Int.Int64 -> CC s’ has only two
In the first argument of ‘Skip’, namely ‘(CC s '\0' '\0')’
In the expression: Skip (CC s '\0' '\0')
• Relevant bindings include
s :: s (bound at src/Data/Text/Manipulate/Internal/Fusion.hs:81:7)
skip' :: s -> Step (CC s) Char
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:81:1)
|
81 | skip' s = Skip (CC s '\0' '\0')
| ^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:81:22: error:
• Couldn't match expected type ‘GHC.Int.Int64’
with actual type ‘Char’
• In the second argument of ‘CC’, namely ‘'\0'’
In the first argument of ‘Skip’, namely ‘(CC s '\0' '\0')’
In the expression: Skip (CC s '\0' '\0')
|
81 | skip' s = Skip (CC s '\0' '\0')
| ^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:84:23: error:
• Couldn't match expected type: Char -> CC s
with actual type: CC s
• The function ‘CC’ is applied to three value arguments,
but its type ‘s -> GHC.Int.Int64 -> CC s’ has only two
In the second argument of ‘Yield’, namely ‘(CC s '\0' '\0')’
In the expression: Yield c (CC s '\0' '\0')
• Relevant bindings include
s :: s (bound at src/Data/Text/Manipulate/Internal/Fusion.hs:84:10)
yield :: Char -> s -> Step (CC s) Char
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:84:1)
|
84 | yield !c s = Yield c (CC s '\0' '\0')
| ^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:84:28: error:
• Couldn't match expected type ‘GHC.Int.Int64’
with actual type ‘Char’
• In the second argument of ‘CC’, namely ‘'\0'’
In the second argument of ‘Yield’, namely ‘(CC s '\0' '\0')’
In the expression: Yield c (CC s '\0' '\0')
|
84 | yield !c s = Yield c (CC s '\0' '\0')
| ^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:85:14: error:
• Couldn't match expected type ‘s -> Step (CC s) Char’
with actual type ‘ghc-prim-0.8.0:GHC.Prim.Int#’
• The function ‘upperMapping’ is applied to two value arguments,
but its type ‘ghc-prim-0.8.0:GHC.Prim.Char#
-> ghc-prim-0.8.0:GHC.Prim.Int#’
has only one
In the expression: upperMapping c s
In an equation for ‘upper’: upper !c s = upperMapping c s
• Relevant bindings include
s :: s (bound at src/Data/Text/Manipulate/Internal/Fusion.hs:85:10)
upper :: Char -> s -> Step (CC s) Char
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:85:1)
|
85 | upper !c s = upperMapping c s
| ^^^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:85:27: error:
• Couldn't match expected type ‘ghc-prim-0.8.0:GHC.Prim.Char#’
with actual type ‘Char’
• In the first argument of ‘upperMapping’, namely ‘c’
In the expression: upperMapping c s
In an equation for ‘upper’: upper !c s = upperMapping c s
|
85 | upper !c s = upperMapping c s
| ^
src/Data/Text/Manipulate/Internal/Fusion.hs:86:14: error:
• Couldn't match expected type ‘s -> Step (CC s) Char’
with actual type ‘ghc-prim-0.8.0:GHC.Prim.Int#’
• The function ‘lowerMapping’ is applied to two value arguments,
but its type ‘ghc-prim-0.8.0:GHC.Prim.Char#
-> ghc-prim-0.8.0:GHC.Prim.Int#’
has only one
In the expression: lowerMapping c s
In an equation for ‘lower’: lower !c s = lowerMapping c s
• Relevant bindings include
s :: s (bound at src/Data/Text/Manipulate/Internal/Fusion.hs:86:10)
lower :: Char -> s -> Step (CC s) Char
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:86:1)
|
86 | lower !c s = lowerMapping c s
| ^^^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:86:27: error:
• Couldn't match expected type ‘ghc-prim-0.8.0:GHC.Prim.Char#’
with actual type ‘Char’
• In the first argument of ‘lowerMapping’, namely ‘c’
In the expression: lowerMapping c s
In an equation for ‘lower’: lower !c s = lowerMapping c s
|
86 | lower !c s = lowerMapping c s
| ^
src/Data/Text/Manipulate/Internal/Fusion.hs:118:16: error:
• Couldn't match expected type: Char -> s1
with actual type: CC (PairS (PairS Bool Bool) s)
• The function ‘CC’ is applied to three value arguments,
but its type ‘PairS (PairS Bool Bool) s
-> GHC.Int.Int64 -> CC (PairS (PairS Bool Bool) s)’
has only two
In the second argument of ‘Stream’, namely
‘(CC (False :*: False :*: s0) '\0' '\0')’
In the expression:
Stream next (CC (False :*: False :*: s0) '\0' '\0') len
• Relevant bindings include
s0 :: s
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:116:38)
next0 :: s -> Step s Token
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:116:32)
|
118 | Stream next (CC (False :*: False :*: s0) '\0' '\0') len
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:118:44: error:
• Couldn't match expected type ‘GHC.Int.Int64’
with actual type ‘Char’
• In the second argument of ‘CC’, namely ‘'\0'’
In the second argument of ‘Stream’, namely
‘(CC (False :*: False :*: s0) '\0' '\0')’
In the expression:
Stream next (CC (False :*: False :*: s0) '\0' '\0') len
|
118 | Stream next (CC (False :*: False :*: s0) '\0' '\0') len
| ^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:120:11: error:
• The constructor ‘CC’ should have 2 arguments, but has been given 3
• In the pattern: CC (up :*: prev :*: s) '\0' _
In an equation for ‘next’:
next (CC (up :*: prev :*: s) '\0' _)
= case next0 s of
Done -> Done
Skip s' -> Skip (CC (up :*: prev :*: s') '\0' '\0')
Yield t s'
-> case t of
B _ -> md (False :*: True :*: s')
U c | prev -> mu c (True :*: False :*: s')
L c | prev -> mu c (False :*: False :*: s')
U c | up -> mu c (True :*: False :*: s')
U c -> mc c (True :*: False :*: s')
L c -> mc c (False :*: False :*: s')
In an equation for ‘transformWith’:
transformWith md mu mc (Stream next0 s0 len)
= Stream next (CC (False :*: False :*: s0) '\0' '\0') len
where
next (CC (up :*: prev :*: s) '\0' _)
= case next0 s of
Done -> Done
Skip s' -> Skip (CC (up :*: prev :*: s') '\0' '\0')
Yield t s' -> ...
next (CC s a b) = Yield a (CC s b '\0')
|
120 | next (CC (up :*: prev :*: s) '\0' _) =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:164:16: error:
• Couldn't match expected type: Char -> s0
with actual type: CC (PairS (PairS (PairS Bool Bool) Bool) s)
• The function ‘CC’ is applied to three value arguments,
but its type ‘PairS (PairS (PairS Bool Bool) Bool) s
-> GHC.Int.Int64 -> CC (PairS (PairS (PairS Bool Bool) Bool) s)’
has only two
In the second argument of ‘Stream’, namely
‘(CC (True :*: False :*: False :*: s0) '\0' '\0')’
In the expression:
Stream next (CC (True :*: False :*: False :*: s0) '\0' '\0') len
• Relevant bindings include
s0 :: s
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:162:30)
next0 :: s -> Step s Char
(bound at src/Data/Text/Manipulate/Internal/Fusion.hs:162:24)
|
164 | Stream next (CC (True :*: False :*: False :*: s0) '\0' '\0') len
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:164:53: error:
• Couldn't match expected type ‘GHC.Int.Int64’
with actual type ‘Char’
• In the second argument of ‘CC’, namely ‘'\0'’
In the second argument of ‘Stream’, namely
‘(CC (True :*: False :*: False :*: s0) '\0' '\0')’
In the expression:
Stream next (CC (True :*: False :*: False :*: s0) '\0' '\0') len
|
164 | Stream next (CC (True :*: False :*: False :*: s0) '\0' '\0') len
| ^^^^
src/Data/Text/Manipulate/Internal/Fusion.hs:166:11: error:
• The constructor ‘CC’ should have 2 arguments, but has been given 3
• In the pattern: CC (start :*: up :*: prev :*: s) '\0' _
In an equation for ‘next’:
next (CC (start :*: up :*: prev :*: s) '\0' _)
= case next0 s of
Done -> Done
Skip s' -> Skip (CC (start :*: up :*: prev :*: s') '\0' '\0')
Yield c s'
| not b, start -> push
| up -> push
| b, prev -> Skip (step start)
| otherwise -> push
where
push
| b = Yield (B c) (step False)
| u, skip = Yield (U c) (step False)
| u = Yield (B '\0') (CC (False :*: u :*: b :*: s') c '\0')
| otherwise = Yield (L c) (step False)
step p = CC (p :*: u :*: b :*: s') '\0' '\0'
....
In an equation for ‘tokeniseWith’:
tokeniseWith f (Stream next0 s0 len)
= Stream next (CC (True :*: False :*: False :*: s0) '\0' '\0') len
where
next (CC (start :*: up :*: prev :*: s) '\0' _)
= case next0 s of
Done -> Done
Skip s' -> Skip (CC (start :*: up :*: prev :*: s') '\0' '\0')
Yield c s'
| not b, start -> push
| up -> push
| b, prev -> Skip (step start)
| otherwise -> push
where
...
next (CC s a b) = Yield (U a) (CC s b '\0')
|
166 | next (CC (start :*: up :*: prev :*: s) '\0' _) =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As a Hackage trustee I have created revisions that should prevent users from encountering these errors. See e.g. https://hackage.haskell.org/package/text-manipulate-0.3.0.0/revisions/