Ticket #2517 (closed proposal: fixed)

Opened 5 years ago

Last modified 5 years ago

remove 'pure' method from Arrow class

Reported by: ross Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/base Version:
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The Arrow class as originally defined by John Hughes had methods arr, >>> and first. (>>> has since been moved by #1773 to the Category class.) When writing the Fun of Programming paper, I added pure as a synonym for arr, because Richard Bird preferred it. However this name hasn't caught on, and now it clashes with a method in the Applicative class, so I propose to remove it.

The usual practice would be to deprecate the name in one release and remove it in the following one, but I propose to remove it in one step because

  • no-one seems to be using this name, and
  • backward compatibility has been broken anyway by the Category split (#1773).

The only people who will be bitten by the change are those who import Control.Arrow hiding pure, and they wouldn't be warned by deprecation.

Attachments

pure.patch Download (102.4 KB) - added by ross 5 years ago.

Change History

Changed 5 years ago by ross

  Changed 5 years ago by igloo

  • difficulty set to Unknown
  • milestone set to Not GHC

  Changed 5 years ago by ross

  • status changed from new to closed
  • resolution set to fixed

Discussion was limited, with a few supporters and no dissent.

follow-up: ↓ 4   Changed 5 years ago by conal

Does anyone have a way to make code work before and after the removal of pure from Arrow? I import Arrow with "hiding (pure)" quite a lot, which is now required up to recent Arrow versions and forbidden after.

in reply to: ↑ 3   Changed 5 years ago by ross

Replying to conal:

Does anyone have a way to make code work before and after the removal of pure from Arrow? I import Arrow with "hiding (pure)" quite a lot, which is now required up to recent Arrow versions and forbidden after.

I suppose you don't want to hear about cpp. You could explicitly import all the stuff from Control.Arrow that you need, or qualify Control.Applicative.pure.

  Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

  Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.