on master help sign in
Add Fuse annotation to parser constructors
commitba08f9fecc80dddf460b808e9aeb619a5469b104 authorHarendra Kumar <harendra@composewell.com> dateSun 22 Mar 2020, 02:48 (7 years ago) parent2723c15
1 file changed+4
src/Streamly/Internal/Data/Parse/Types.hs+4
src/Streamly/Internal/Data/Parse/Types.hs+4
@@ -51,6 +51,8 @@ module Streamly.Internal.Data.Parse.Types
5151 )
5252where
5353
54+import Fusion.Plugin.Types (Fuse(..))
55+
5456-- | The return type of a fold step. A fold is driven by a fold driver one step
5557-- at a time, at any time the driver may @extract@ and examine the result of
5658-- the fold. The fold may backtrack at any point, therefore, the driver holds
@@ -64,6 +66,7 @@ where
6466--
6567-- /Internal/
6668--
69+{-# ANN type Step Fuse #-}
6770data Step s =
6871 Hold s -- ^ Hold the current input in the buffer, the input is
6972 -- accepted tentatively, but the fold may later fail with the
@@ -116,6 +119,7 @@ instance Monad m => Functor (Parse m a) where
116119 {-# INLINE (<$) #-}
117120 (<$) b = \_ -> pure b
118121
122+{-# ANN type SeqParseState Fuse #-}
119123data SeqParseState sl f sr =
120124 SeqParseL sl | SeqParseR f sr | SeqParseLErr String
121125