File: fix-tests

package info (click to toggle)
haskell-ap-normalize 0.1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 100 kB
  • sloc: haskell: 199; makefile: 3
file content (36 lines) | stat: -rw-r--r-- 1,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 869fca8255d9903a8131e88803fa9f8787d9beaa Mon Sep 17 00:00:00 2001
From: Li-yao Xia <lysxia@gmail.com>
Date: Sun, 17 Mar 2024 23:14:44 +0100
Subject: [PATCH] test: add strict RWS and temporarily patch test for lazy RWS

---
 .gitlab-ci.yml | 9 ++++++++-
 test/assoc.hs  | 7 +++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

Index: b/test/assoc.hs
===================================================================
--- a/test/assoc.hs
+++ b/test/assoc.hs
@@ -24,6 +24,7 @@ import Control.Monad.Trans.Cont (ContT)
 import qualified Control.Monad.Trans.State.Lazy as Lazy
 import qualified Control.Monad.Trans.State.Strict as Strict
 import Control.Monad.Trans.RWS (RWS)
+import qualified Control.Monad.Trans.RWS.Strict as Strict
 import Control.Monad.Trans.Reader (Reader)
 import Control.Monad.Trans.Select (Select)
 import Control.Monad.Trans.Writer (Writer)
@@ -80,7 +81,13 @@ TEST_ASSOC(Cont,ContT r m,===)
 -- monoid is also definitionally associative.
 TEST_ASSOC(AccumEndo,Accum (Endo w),===)
 TEST_ASSOC(WriterEndo,Writer (Endo w),===)
+#if __GLASGOW_HASKELL__ < 906
 TEST_ASSOC(RWSEndo,RWS r (Endo w) s,==-)
+#else
+TEST_ASSOC(RWSEndo,RWS r (Endo w) s,=/=) -- TODO: issue https://hub.darcs.net/ross/transformers/issue/97
+#endif
+
+TEST_ASSOC(SRWSEndo,Strict.RWS r (Endo w) s,==-)
 TEST_ASSOC_(Accum,Accum w,=/=,Monoid w =>)
 TEST_ASSOC_(Writer,Writer w,=/=,Monoid w =>)
 TEST_ASSOC_(RWS,RWS r w s,=/=,Monoid w =>)