Skip to content

deriveSafeCopy not working for mutual recursive data-types in GHC 9.2.4 #90

@marco-comini

Description

@marco-comini

Hi folks, I've just installed GHC 9.2.4 (now that is the recommended versio) and tried to compile one of my projects that is working fine in GHC 8.10.7.

To rule out many details, let's say that I have to define two mutual recursive types TypeA and Type B. With 9.2.4 I get errors that can be abstracted as

Could not deduce (SafeCopy TypeB) ... arising from a use of ‘getSafePut’ ... in
$(deriveSafeCopy 0 'base ''TypeA)

and if I try to swap the order of definitions of TypeA/TypeB I get the dual error message.
Am I missing something new that has to be done with 9.2.4 or is it a bug in deriveSafeCopy?

Thanks in advance for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions