LambdaHack icon indicating copy to clipboard operation
LambdaHack copied to clipboard

Switch from `#ifdef WITH_EXPENSIVE_ASSERTIONS` to expensiveAssert

Open Mikolaj opened this issue 4 years ago • 0 comments

Define expensiveAssert (as in Cabal codebase) in Game.LambdaHack.Core.Prelude using #ifdef WITH_EXPENSIVE_ASSERTIONS and use everywhere. This avoids polluting a lot of the code with ifdefs.

Make sure it works in Allure of the Stars as well (e.g., when running Allure CI) and that it would work when used in Allure codebase (currently not used). It's fine if that requires the with_expensive_assertions flag for both LambdaHack and Allure in cabal.project for Allure.

See https://github.com/haskell/cabal/blob/769e4ede066108cf722ac4828884788429c2d310/cabal-install-solver/src-assertion/Distribution/Client/Utils/Assertion.hs

Mikolaj avatar Aug 04 '21 14:08 Mikolaj