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

Fix for punionWith argument-flipping, issue #556 #558

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blamario
Copy link
Collaborator

No description provided.

Copy link
Member

@L-as L-as left a comment

Choose a reason for hiding this comment

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

Do note this doesn't make punionWith (-) work.

@@ -371,33 +371,37 @@ mapUnionCarrier = phoistAcyclic $ plam \combine self ->
MapUnionCarrier
Copy link
Member

Choose a reason for hiding this comment

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

Can you use QualifiedDo or TermCont to make this code cleaner?

@@ -357,7 +357,7 @@ punionWith = phoistAcyclic $

data MapUnionCarrier k v s = MapUnionCarrier
{ merge :: Term s (PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v)
, mergeInsert :: Term s (PBuiltinPair (PAsData k) (PAsData v) :--> PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v)
, mergeInsert :: Term s (PBuiltinPair (PAsData k) (PAsData v) :--> PBuiltinPair (PAsData k) (PAsData v) :--> PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v :--> PBuiltinListOfPairs k v)
Copy link
Member

Choose a reason for hiding this comment

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

What is this extra pair for?

@L-as L-as linked an issue Oct 10, 2022 that may be closed by this pull request
@L-as
Copy link
Member

L-as commented Oct 10, 2022

As discussed on Discord, we want a more general solution, i.e. a zipWith essentially.

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.

punionWith flips arguments
2 participants