Skip to content

Canno compile some phantom types #7498

@bezirg

Description

@bezirg

Summary

A pir compile error

<no location info>: error:
    GHC Core to PLC plugin: Error: Error from the PIR compiler:
                               Error during compilation: Type bindings cannot appear in recursive let, use datatypebind instead

This happens with the code

newtype Phantom a = Phantom ()
compiledPhantom = $$(compile [|| Phantom () :: Phantom Ordering ||])

It happens when phantom type is Ordering, Either...
It does not happen when phantom types is Bool or ()

Steps to reproduce the behavior

No response

Actual Result

No response

Expected Result

No response

Describe the approach you would take to fix this

No response

System info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions