I noticed that ersatz failed to compile with mtl-2.3 with the following errors:
ersatz/examples/regexp-grid/RegexpGrid/Problem.hs:134:19: error:
Variable not in scope: guard :: Bool -> m b
|
134 | endOfFields = guard . Seq.null =<< use rbsFields
| ^^^^^
ersatz/examples/sudoku/Sudoku/Problem.hs:27:17: error:
• Variable not in scope: replicateM :: Int -> m2 a1 -> m [Cell]
• Perhaps you meant ‘replicate’ (imported from Prelude)
|
27 | <$> replicateM (Array.rangeSize range) exists
| ^^^^^^^^^^
ersatz/examples/sudoku/Sudoku/Problem.hs:32:3: error:
Variable not in scope:
forM_ :: [(Index, Word8)] -> ((Index, Word8) -> t1) -> m a0
|
32 | forM_ (Array.assocs initValues) $ \(idx, val) ->
| ^^^^^
ersatz/examples/sudoku/Sudoku/Problem.hs:33:5: error:
Variable not in scope: when :: Bool -> m1 () -> t1
|
33 | when (1 <= val && val <= 9) $
| ^^^^
ersatz/examples/sudoku/Sudoku/Problem.hs:58:3: error:
Variable not in scope:
forM_ :: [(Cell, Cell)] -> ((t0, t0) -> m0 ()) -> ReaderT Env m ()
|
58 | forM_ pairs $ \(cellA, cellB) -> assert (cellA /== cellB)
| ^^^^^
I noticed that
ersatz
failed to compile withmtl-2.3
with the following errors:This is because
mtl-2.3
stopped re-exporingControl.Monad
fromControl.Monad.Reader
so that importingControl.Monad.Reader
is not enough for using those functions.Note that
mtl-2.3
was deprecated, so there may be no need to rush to fix the issue.