From f959abd8fb7524f66e5b23fc31e53207bc499557 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Mon, 4 Nov 2024 20:04:04 +0530 Subject: [PATCH] Deprecate Partial, Continue, and Done patterns --- core/src/Streamly/Internal/Data/Parser/Type.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/Streamly/Internal/Data/Parser/Type.hs b/core/src/Streamly/Internal/Data/Parser/Type.hs index 48ff1dc1fa..55463e47f6 100644 --- a/core/src/Streamly/Internal/Data/Parser/Type.hs +++ b/core/src/Streamly/Internal/Data/Parser/Type.hs @@ -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