@@ -74,6 +74,7 @@ import Data.Word (Word8)
7474import Foreign.ForeignPtr (touchForeignPtr)
7575import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
7676import Foreign.Storable (Storable(..))
77+import Fusion.Plugin.Types (Fuse(..))
7778import GHC.Base (assert, unsafeChr)
7879import GHC.ForeignPtr (ForeignPtr (..))
7980import GHC.IO.Encoding.Failure (isSurrogate)
@@ -248,6 +249,7 @@ decode1 table state codep byte =
248249--
249250data DecodeError = DecodeError !DecodeState !CodePoint deriving Show
250251
252+{-# ANN type FreshPoint Fuse #-}
251253data FreshPoint s a
252254 = FreshPointDecodeInit s
253255 | FreshPointDecodeInit1 s Word8
@@ -441,6 +443,7 @@ decodeUtf8EitherD :: Monad m
441443 => Stream m Word8 -> Stream m (Either DecodeError Char)
442444decodeUtf8EitherD = resumeDecodeUtf8EitherD 0 0
443445
446+{-# ANN type FlattenState Fuse #-}
444447data FlattenState s a
445448 = OuterLoop s !(Maybe (DecodeState, CodePoint))
446449 | InnerLoopDecodeInit s (ForeignPtr a) !(Ptr a) !(Ptr a)
@@ -579,6 +582,7 @@ decodeUtf8ArraysD_ ::
579582 -> Stream m Char
580583decodeUtf8ArraysD_ = decodeUtf8ArraysWithD DropOnCodingFailure
581584
585+{-# ANN type EncodeState Fuse #-}
582586data EncodeState s = EncodeState s !WList
583587
584588-- More yield points improve performance, but I am not sure if they can cause