@@ -297,7 +297,10 @@ decode1 table state codep byte =
297-- Resumable UTF-8 decoding
297-- Resumable UTF-8 decoding
298-------------------------------------------------------------------------------
298-------------------------------------------------------------------------------
300+-- Strangely, GHCJS hangs linking template-haskell with this
300{-# ANN type UTF8DecodeState Fuse #-}
302{-# ANN type UTF8DecodeState Fuse #-}
301data UTF8DecodeState s a
304data UTF8DecodeState s a
302 = UTF8DecodeInit s
305 = UTF8DecodeInit s
303 | UTF8DecodeInit1 s Word8
306 | UTF8DecodeInit1 s Word8
@@ -567,7 +570,9 @@ decodeUtf8Lax = decodeUtf8
567-- Decoding Array Streams
570-- Decoding Array Streams
568-------------------------------------------------------------------------------
571-------------------------------------------------------------------------------
570{-# ANN type FlattenState Fuse #-}
574{-# ANN type FlattenState Fuse #-}
571data FlattenState s a
576data FlattenState s a
572 = OuterLoop s !(Maybe (DecodeState, CodePoint))
577 = OuterLoop s !(Maybe (DecodeState, CodePoint))
573 | InnerLoopDecodeInit s (ForeignPtr a) !(Ptr a) !(Ptr a)
578 | InnerLoopDecodeInit s (ForeignPtr a) !(Ptr a) !(Ptr a)
@@ -777,10 +782,14 @@ ord4 c = assert (n >= 0x10000) (WCons x1 (WCons x2 (WCons x3 (WCons x4 WNil))))
777 x3 = fromIntegral $ ((n `shiftR` 6) .&. 0x3F) + 0x80
782 x3 = fromIntegral $ ((n `shiftR` 6) .&. 0x3F) + 0x80
778 x4 = fromIntegral $ (n .&. 0x3F) + 0x80
783 x4 = fromIntegral $ (n .&. 0x3F) + 0x80
780{-# ANN type EncodeState Fuse #-}
786{-# ANN type EncodeState Fuse #-}
781data EncodeState s = EncodeState s !WList
788data EncodeState s = EncodeState s !WList
783{-# ANN type InvalidAction Fuse #-}
791{-# ANN type InvalidAction Fuse #-}
784data InvalidAction =
793data InvalidAction =
785 DropInvalid | ErrorInvalid | IgnoreInvalid | ReplaceInvalid
794 DropInvalid | ErrorInvalid | IgnoreInvalid | ReplaceInvalid