diff --git a/src/Lib/MTL.hs b/src/Lib/MTL.hs index ecf6f9e..27f632a 100644 --- a/src/Lib/MTL.hs +++ b/src/Lib/MTL.hs @@ -5,6 +5,7 @@ import Lola import Syntax.HLPrelude import Syntax.Booleans import Syntax.Ord +import Syntax.Num import Lib.Utils -- Reference: https://www.cs.ox.ac.uk/people/james.worrell/mtlsurvey08.pdf @@ -37,4 +38,4 @@ historicallyMTL k dec = "historicallyMTL" <: k <: dec =: consecutiveTrueMTL :: Stream Bool -> Stream Int consecutiveTrueMTL dec = "consecutiveTrueMTL" <: dec =: - if not $ Now dec then 0 else consecutiveTrueMTL dec @: (-1, 0) + 1 + if not $ Now dec then 0 else consecutiveTrueMTL dec :@ (-1, 0) + 1 diff --git a/src/Syntax/HLPrelude.hs b/src/Syntax/HLPrelude.hs index 22916fe..2c4bd15 100644 --- a/src/Syntax/HLPrelude.hs +++ b/src/Syntax/HLPrelude.hs @@ -1,3 +1,3 @@ module Syntax.HLPrelude (module All) where -import Prelude as All hiding (mod, not, (&&), (/), (<$>), (<*>), (<=),(<), (>), (||)) +import Prelude as All hiding (mod, not, (&&), (/), (<$>), (<*>), (<=),(<), (>), (||), (>=)) diff --git a/src/Syntax/Ord.hs b/src/Syntax/Ord.hs index e9c78ee..a6c2ad9 100644 --- a/src/Syntax/Ord.hs +++ b/src/Syntax/Ord.hs @@ -16,3 +16,7 @@ a > b = (P.>) <$> a <*> b infix 4 <= (<=) :: (Ord a, Streamable a) => Expr a -> Expr a -> Expr Bool a <= b = (P.<=) <$> a <*> b + +infix 4 >= +(>=) :: (Ord a, Streamable a) => Expr a -> Expr a -> Expr Bool +a >= b = (P.>=) <$> a <*> b