Opened 4 years ago

Closed 4 years ago

#10216 closed bug (fixed)

Allow arr ∧ (first ∨ (***)) as minimal definition of Arrow instance

Reported by: strake888 Owned by:
Priority: normal Milestone: 8.0.1
Component: Core Libraries Version: 7.10.1
Keywords: Cc: core-libraries-committee@…, ekmett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by strake888)

Add default definitions of first, second in terms of (***) to let one define an Arrow instance in terms of (***) rather than first, which is sometimes more elegant or convenient.

Attachments (1)

0001-Allow-arr-first-as-minimal-definition-of-Arrow-insta.patch (2.1 KB) - added by strake888 4 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 4 years ago by ekmett

This would also necessitate a change to the MINIMAL pragma, I suppose.

comment:2 Changed 4 years ago by ekmett

No objection here, BTW. This makes Arrow's internals far more symmetrical.

comment:3 Changed 4 years ago by simonpj

I suggest that

  • You add a description to the ticket that explains what you are doing, and why it is a good thing. Perhaps add comments in the code to explain subtleties?
  • Pursue it through the core libraries committee (Edward clearly has it on his radar, which is good).

Simon

comment:4 Changed 4 years ago by thomie

Milestone: 7.12.1
Status: newpatch

comment:5 Changed 4 years ago by strake888

Description: modified (diff)

comment:6 in reply to:  3 Changed 4 years ago by strake888

Replying to simonpj:

Perhaps add comments in the code to explain subtleties?

I'm not sure what is subtle here; you mean any subtleties in particular?

Version 0, edited 4 years ago by strake888 (next)

comment:7 Changed 4 years ago by bgamari

Status: patchinfoneeded

Yes, I think it would be best to put together a formal proposal and send it through the core libraries committee. It needn't be much effort and it sounds like it shouldn't be terribly controversial but I would like to make sure that this goes through the correct channels.

comment:8 Changed 4 years ago by strake888

Description: modified (diff)

comment:9 in reply to:  7 Changed 4 years ago by strake888

Replying to bgamari:

Yes, I think it would be best to put together a formal proposal and send it through the core libraries committee.

Done. (I wasn't sure earlier whether to do so as the core-libraries-committee chair had already seen this ticket.)

comment:10 Changed 4 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:11 Changed 4 years ago by strake888

Status: infoneededpatch

I sent a proposal to libraries@… and no one complained so I'm setting the status back to patch ☺

comment:12 Changed 4 years ago by simonpj

Edward, can we have your ok?

comment:13 Changed 4 years ago by thomie

Owner: ekmett deleted

comment:14 Changed 4 years ago by ekmett

Cc: ekmett added

Granted.

comment:15 Changed 4 years ago by Austin Seipp <austin@…>

In e8c81739/ghc:

Allow arr ∧ (first ∨ (***)) as minimal definition of Arrow instance

See #10216.

Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:16 Changed 4 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Thanks, merged!

Note: See TracTickets for help on using tickets.