Skip to content

Commit

Permalink
Deprecate Partial, Continue, and Done patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Nov 7, 2024
1 parent e610225 commit d047c6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/Streamly/Internal/Data/Parser/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,17 @@ negateDirection (SContinue i s) = SContinue (1 - i) s
negateDirection (SDone i b) = SDone (1 - i) b
negateDirection (Error s) = Error s

{-# DEPRECATED Partial "Please use @SPartial (1 - n)@ instead of @Partial n@" #-}
pattern Partial :: Int -> s -> Step s b
pattern Partial i s <- (negateDirection -> SPartial i s)
where Partial i s = SPartial (1 - i) s

{-# DEPRECATED Continue "Please use @SContinue (1 - n)@ instead of @Continue n@" #-}
pattern Continue :: Int -> s -> Step s b
pattern Continue i s <- (negateDirection -> SContinue i s)
where Continue i s = SContinue (1 - i) s

{-# DEPRECATED Done "Please use @SDone (1 - n)@ instead of @Done n@" #-}
pattern Done :: Int -> b -> Step s b
pattern Done i b <- (negateDirection -> SDone i b)
where Done i b = SDone (1 - i) b
Expand Down

0 comments on commit d047c6a

Please sign in to comment.