Skip to content

Commit

Permalink
Fixed MTL
Browse files Browse the repository at this point in the history
  • Loading branch information
fgorostiaga committed Feb 7, 2020
1 parent 9eecfbf commit 4087dc1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Lib/MTL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Syntax/HLPrelude.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Syntax.HLPrelude (module All) where

import Prelude as All hiding (mod, not, (&&), (/), (<$>), (<*>), (<=),(<), (>), (||))
import Prelude as All hiding (mod, not, (&&), (/), (<$>), (<*>), (<=),(<), (>), (||), (>=))
4 changes: 4 additions & 0 deletions src/Syntax/Ord.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4087dc1

Please sign in to comment.