Skip to content

Conversation

@fendor
Copy link
Collaborator

@fendor fendor commented Mar 10, 2024

@fendor
Copy link
Collaborator Author

fendor commented Mar 10, 2024

Genuine test suite bugs uncovered :)

@michaelpj
Copy link
Collaborator

How did this not just break before??

@jhrcek
Copy link
Collaborator

jhrcek commented Mar 11, 2024

Isn't this due to the default CPP behavior which is that it evaluates a symbol to false if it's not defined?

I didn't find where this behavior is described, but you can see it behaves like this in this example:

$ cat Main.hs
{-# LANGUAGE CPP #-}
#if hello
main = putStrLn "hello is on"
#else
main = putStrLn "hello is off"
#endif

$ ghc Main.hs
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking Main

$ ./Main
hello is off

@michaelpj
Copy link
Collaborator

The horror 😱

@fendor
Copy link
Collaborator Author

fendor commented Mar 11, 2024

A lot of our tests are running (or not running) but failing or not failing for the wrong reasons, also see #4130 and #4036.

@fendor
Copy link
Collaborator Author

fendor commented Apr 5, 2024

This Pr is superseded by the work of @jhrcek, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants