Re: How to fool the divergence checker in ghc 9
Michael Sperber <[email protected]> Fri, 20 Jan 2023 11:17:49 +0100
| Newsgroups | gmane.comp.lang.haskell.glasgow.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jan 20 2023, David Feuer <[email protected]> wrote: > I don't know what all that means exactly (especially since GHC's demand > signatures have changed recently in a way I don't understand at all). But > for hiding divergence, one option is to use a module with demand analysis > disabled. Try {-# options_ghc -fno-strictness #-}. You'll likely need to > put oops in its own module to avoid interfering with desired optimizations. THanks for the suggestion! So I did this: {-# options_ghc -fno-strictness #-} module ConCat.Oops(oops) where import GHC.Stack (errorWithStackTrace) -- for oops -- | Pseudo function to fool GHC's divergence checker. oops :: String -> b oops str = errorWithStackTrace ("Oops: "++str) {-# NOINLINE oops #-} ... but am getting the same result from the divergence checker, sadly ... -- Regards, Mike _______________________________________________ Glasgow-haskell-users mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users