ndmitchell / debug

Haskell library for debugging
BSD 3-Clause "New" or "Revised" License
122 stars 7 forks source link

GHC 8.0 compatibility #31

Closed ndmitchell closed 6 years ago

ndmitchell commented 6 years ago

Should we provide that? With the latest commits Debug.Hoed generates things using deriving strategies, which is a GHC 8.2 only feature. We should either fix that, or declare 8.0 unsupported.

CC @pepeiborra @marklnichols

pepeiborra commented 6 years ago

I would like to support 8.0 as long as it doesn’t imply major changes. I tried conditionally excluding the deriving bits from the build with CPP but GHC 8.0 had trouble typing the Hoed test file. I suspect there might a GHC bug involved but let me give it another try tonight.

pepeiborra commented 6 years ago

I couldn't get this working but the code now compiles with GHC 8.

We should probably keep the GHC 8.0 compatibility since the Variables backend does not have any issues, document that the Hoed backend requires 8.2 and disable the Hoed tests in GHC 8.0.

ndmitchell commented 6 years ago

That makes sense

ndmitchell commented 6 years ago

If Hoed isn't going to work at all for 8.0, should the Hoed annotator just produce an error immediately, rather than have code that compiles but doesn't work? Would result in less CPP.

pepeiborra commented 6 years ago

If the code compiles, it will work. Hoed is fine and the instrumentation can be applied manually, it's the TH that has issues.