From 2c608d4cc18c9b93252bb445b1e5806b85543e01 Mon Sep 17 00:00:00 2001 From: Roly Perera Date: Wed, 11 Oct 2023 14:40:14 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A7=A9=20[refactor]:=20Backtick=20inf?= =?UTF-8?q?ix=20does=20seem=20to=20work..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fluid/lib/dtw.fld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/lib/dtw.fld b/fluid/lib/dtw.fld index 5293e561e..736370262 100644 --- a/fluid/lib/dtw.fld +++ b/fluid/lib/dtw.fld @@ -3,7 +3,7 @@ let nextIndices n m window = j <- [max 1 (i - window) .. min m (i + window)]]; let costMatrixInit rows cols window = - [| let initV = if or (and (n == 1) (m == 1)) (and (abs n m <= window) (not (or (n == 1) (m == 1)))) + [| let initV = if ((n == 1) `and` (m == 1)) `or` ((abs n m <= window) `and` not ((n == 1) `or` (m == 1))) then FNum 0 else Infty in initV | (n, m) in (rows, cols) |]; @@ -19,7 +19,7 @@ let minAndPrev (i, j) im1 jm1 ijm1 = let extractPath indmatrix (i, j) = let traverser (n, m) matrix accum = - if and (n == 1) (m == 1) + if (n == 1) `and` (m == 1) then accum else traverser (matrix!(n, m)) matrix ((n - 1, m - 1) : accum) From f3af7d31dc26ef204be8eed000b8b51621a369fc Mon Sep 17 00:00:00 2001 From: Roly Perera Date: Wed, 11 Oct 2023 14:41:01 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A7=A9=20[remove-unused]:=20Forgot=20?= =?UTF-8?q?to=20delete.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ann.purs | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 src/Ann.purs diff --git a/src/Ann.purs b/src/Ann.purs deleted file mode 100644 index 664a26c69..000000000 --- a/src/Ann.purs +++ /dev/null @@ -1,9 +0,0 @@ -module Ann where - -import Prelude - -erase :: forall t a. Functor t => t a -> Raw t -erase = (<$>) (const unit) - -type 𝔹 = Boolean -type Raw (c :: Type -> Type) = c Unit From f2b27a9fe666c72b6b5beed855b4c8d20900814a Mon Sep 17 00:00:00 2001 From: Roly Perera Date: Wed, 11 Oct 2023 15:10:36 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9D=97=20[fix]:=20Oops,=20borked=20impor?= =?UTF-8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Module.purs | 2 +- test/Util.purs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module.purs b/src/Module.purs index 20cebe207..465dd2546 100644 --- a/src/Module.purs +++ b/src/Module.purs @@ -4,7 +4,6 @@ import Prelude import Affjax.ResponseFormat (string) import Affjax.Web (defaultRequest, printError, request) -import Ann (Raw) import Bindings (Var, (↦)) import Control.Monad.Error.Class (liftEither, throwError) import Control.Monad.Except (class MonadError) @@ -22,6 +21,7 @@ import Expr (ProgCxt(..)) import Graph (empty) as G import Graph.GraphImpl (GraphImpl) import Graph.GraphWriter (alloc, runWithGraphAllocT) +import Lattice (Raw) import Parse (module_, program) as P import Parsing (runParser) import Primitive.Defs (primitives) diff --git a/test/Util.purs b/test/Util.purs index abd567399..218fd477f 100644 --- a/test/Util.purs +++ b/test/Util.purs @@ -42,7 +42,7 @@ type TestConfig = type AffError m a = MonadAff m => MonadError Error m => m a logging :: Boolean -logging = true +logging = false test ∷ forall m. File -> ProgCxt Unit -> TestConfig -> (Int × Boolean) -> AffError m BenchRow test file progCxt tconfig (n × is_bench) = do