Closed DoctorRyner closed 4 years ago
For example, that is valid
But that is not, I can't use update syntax for record that wasn't compiled with record-dot-preprocessor
Note from the user manual at https://github.com/ndmitchell/record-dot-preprocessor#how-do-i-use-this-magic:
You must make sure that the OPTIONS_GHC is applied both to the file where your records are defined, and where the record syntax is used
Does that answer your question? Unfortunately it's a fundamental limitation of this technique until after GHC gets support for deriving these instances itself (which is coming in a future GHC).
Not exactly, because it's also a native syntax to update a record, but ok, I get it, I will divide my code into parts that use only records made with record-dot-preprocessor and that don't use it at all
One option would be to write the necessary instances to get update working via hand. Unfortunately, they would be orphan instances.
There is a workaround, I can enable it with pragma in each file where I use it and divide code that uses preprocessor but it's not that convenient at all