IntersectMBO / IntersectMBO/plutus

Why DefaultUni is so complicated?

Open
#4,781 16 comments 0 reactions 1 assignee Claimed by @effectfully View on GitHub
Low priority Objective status: triaged tech debt
Dominant language
Haskell
Stars
1.6k
Forks
508
Avg merge
3d 10h
Merged PRs (30d)
22

Description

Why cannot pair and list be represented as

```
DefaultUniList :: DefaultUni a -> DefaultUni [a]
DefaultUniPair :: DefaultUni a -> DefaultUni b -> DefaultUni (a, b)
```

Is `DefaultUni (Esc a)` used anywhere (where?) at any other kind than `Type`? In `ValueOf` it is at type `Type`, and above simplification would be massive.

EDIT: The problem is that I have no idea how to exhaustively match on `DefaultUni`. Indeed the `plutus-core` itself has
(somewhat ugly):

```haskell
bring _ (f `DefaultUniApply` _ `DefaultUniApply` _ `DefaultUniApply` _) _ =
noMoreTypeFunctions f
```

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.