IntersectMBO / IntersectMBO/plutus

Cannot compile some phantom types

Open
#7,498 0 comments 0 reactions 0 assignees View on GitHub
bug Plinth Plinth Plugin status: triaged
Dominant language
Haskell
Stars
1.6k
Forks
508
Avg merge
3d 10h
Merged PRs (30d)
22

Description

### Summary

A pir compile error

```
: 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.