Having spent a bit of time staring at GHC's sources, I noticed that there are around 140 modules using a set of C macros for assertions, namely:
ASSERT > ASSERT2 > MASSERT > MASSERT2 > ASSERTM > ASSERTM2 However, I see that Control.Exception already provides a first class Haskell assertion function: assert :: Bool -> a -> a that is turned off automatically when optimizations are turned on, and provides an error containing the filename and line number, which was why I thought the above macros existed and were still in use. My question is: is there any reason to keep using these macros instead of *assert*?
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
