Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proposal about primitives to do destination-passing style structure building in compact regions #7

Open
wants to merge 2 commits into
base: upstream-master-20241107
Choose a base branch
from

Conversation

tbagrel1
Copy link
Member

@tbagrel1 tbagrel1 commented Nov 7, 2024

No description provided.

proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
Copy link
Member

@aspiwack aspiwack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better. A few extra comments.

proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
proposals/0000-dps-compact.md Outdated Show resolved Hide resolved
Without the new built-in typeclass, the syntax would become:

```haskell
fill @'MkIdCard @"MkIdCard" d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be fill @IdCard @"MkIdCard" instead? Still not great, but at least not repetitive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If fill no longer receive the constructor lifted as a type ('Left), then we need to implement the resolution (name :: Symbol, baseType :: Type) -> DataCon inside reifyInfoTablePtr#. That means a more complex reifyInfoTablePtr#, with little advantage (still 2 type parameters to supply)

@tbagrel1 tbagrel1 force-pushed the tbagrel1/dps-compact-regions-prims branch from e89e955 to 74365e8 Compare November 20, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants