From 94d5979bf60fae0e759c888a72c06695d891d7b1 Mon Sep 17 00:00:00 2001 From: ncaq <ncaq@ncaq.net> Date: Wed, 9 Aug 2023 17:35:35 +0900 Subject: [PATCH] test: `cabal test -w ghc-9.4 --constraint="mtl == 2.3.1"` The test with the following command did not pass because the decision to import the mtl module was made by referring to the transformers version. ~~~console cabal test -w ghc-9.4 --constraint="mtl == 2.3.1" ~~~ There were two avenues to resolve this. One is by making it refer to the mtl version, The other is to change the transformers module to import. It seems more natural to reference the mtl version, but since `mtl-2.3.1` still supports `transformers-0.5.6.2` which still provides `ErrorT` and so on, we can use `cabal test -w ghc-9.6 --constraint=" transformers=0.5.6.2" --constraint="mtl==2.3.1"`, the API will change when assuming `mtl-2.3.1`. Therefore, we decided to change to import the transformers module. --- tests/Control/Monad/Catch/Tests.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Control/Monad/Catch/Tests.hs b/tests/Control/Monad/Catch/Tests.hs index 9f5e7a7..e1e4559 100644 --- a/tests/Control/Monad/Catch/Tests.hs +++ b/tests/Control/Monad/Catch/Tests.hs @@ -40,8 +40,8 @@ import qualified Control.Monad.Writer.Strict as StrictWriter import qualified Control.Monad.RWS.Lazy as LazyRWS import qualified Control.Monad.RWS.Strict as StrictRWS #if !(MIN_VERSION_transformers(0,6,0)) -import Control.Monad.Error (ErrorT(..)) -import Control.Monad.List (ListT(..)) +import Control.Monad.Trans.Error (ErrorT(..)) +import Control.Monad.Trans.List (ListT(..)) #endif import Control.Monad.Catch -- GitLab