Skip to content

Commit

Permalink
dunai-test: Remove deprecated definitions from FRP.Dunai.LTLPast. Refs
Browse files Browse the repository at this point in the history
…#444.

Module FRP.Dunai.LTLPast in dunai-test includes several deprecated
definitions that were deprecated a year ago. Per our policy to wait 3
versions until a deprecated definition can be removed, these function
can now be removed.

This commit removes deprecated functions from FRP.Dunai.LTLPast.
  • Loading branch information
solomon-b authored and ivanperez-keera committed Nov 3, 2024
1 parent 04c1dc3 commit 36a67fb
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions dunai-test/src/FRP/Dunai/LTLPast.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,57 +83,3 @@ lastSF = iPre False

-- | A signal predicate is an MSF whose output is a Boolean value.
type SPred m a = MSF m a Bool

-- ** Propositional MSFs

-- | Output True at times when the input is False.
{-# DEPRECATED notSF' "Use notSF instead" #-}
notSF' :: Monad m => SPred m a -> SPred m a
notSF' sf = sf >>> arr not

-- | Output True at times when both inputs are True.
{-# DEPRECATED andSF' "Use andSF instead" #-}
andSF' :: Monad m => SPred m a -> SPred m a -> SPred m a
andSF' sf1 sf2 = (sf1 &&& sf2) >>> arr (uncurry (&&))

-- | Output True at times when at least one of the inputs is True.
{-# DEPRECATED orSF' "Use orSF instead" #-}
orSF' :: Monad m => SPred m a -> SPred m a -> SPred m a
orSF' sf1 sf2 = (sf1 &&& sf2) >>> arr (uncurry (||))

-- | Output True at times when the first input stream is False or the second
-- one is True.
{-# DEPRECATED implySF' "Use impliesSF instead" #-}
implySF' :: Monad m => SPred m a -> SPred m a -> SPred m a
implySF' sf1 sf2 = orSF' sf2 (notSF' sf1)

-- ** Temporal MSFs

-- | Output True at a time if the input has always been True up until that
-- time.
--
-- This corresponds to Historically, or the past-time version of Globally or
-- Always.
{-# DEPRECATED history' "Use sofarSF instead" #-}
history' :: Monad m => SPred m a -> SPred m a
history' sf = feedback True $ proc (a, last) -> do
b <- sf -< a
let cur = last && b
returnA -< (cur, cur)

-- | Output True at a time if the input has ever been True up until that time.
--
-- This corresponds to Ever, or the past-time version of Eventually.
{-# DEPRECATED ever' "Use everSF instead" #-}
ever' :: Monad m => SPred m a -> SPred m a
ever' sf = feedback False $ proc (a, last) -> do
b <- sf -< a
let cur = last || b
returnA -< (cur, cur)

-- | Output True at a time if the input at the last time was True.
{-# DEPRECATED prev' "Use lastSF instead" #-}
prev' :: Monad m => SPred m a -> SPred m a
prev' sf = feedback True $ proc (a, last) -> do
b <- sf -< a
returnA -< (last, b)

0 comments on commit 36a67fb

Please sign in to comment.