Skip to content

Some extra functions, fixes #20 #27

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

Closed
wants to merge 1 commit into from

Conversation

hdgarrood
Copy link
Contributor

Some of this is already in purescript-posets, but it could potentially be more helpful to have it in Prelude.

@garyb
Copy link
Member

garyb commented May 27, 2015

I wonder if we'd be better off with breaking some of these out into libraries like purescript-ordering for Data.Ord, etc instead. Adding these to the Prelude as they are are going to cause some problems: min, max, and abs are already defined in purescript-math, succ and pred will conflict with purescript-enums.

Also, this is just a personal opinion, but I think keeping the Prelude compact is something we should try to hold on to.

@hdgarrood
Copy link
Contributor Author

Ok, makes sense.

Exporting generalised versions of functions with the same name as Math functions doesn't both me very much though, particularly since I find I use integers far more often than floating point numbers, and nothing in Math works for Int. If we have generalised min, max, and abs, is there a reason to use the Math versions at all?

@sharkdp
Copy link
Contributor

sharkdp commented Aug 7, 2015

I haven't looked at all the new functions in this PR, but I would strongly vote in favor of generalizing max and min!

Exporting generalised versions of functions with the same name as Math functions doesn't both me very much though, particularly since I find I use integers far more often than floating point numbers, and nothing in Math works for Int.

👍
It seems a shame that we have no min/max :: Int -> Int -> Int which we would get for free.

If we have generalised min, max, and abs, is there a reason to use the Math versions at all?

Related: purescript-deprecated/purescript-math#8

@hdgarrood
Copy link
Contributor Author

Since I finally got around to publishing purescript-posets (now purescript-orders, given that we decided Ord should be a total ordering), I think we can close this.

turlando pushed a commit to purescm/purescript-prelude that referenced this pull request Sep 4, 2021
Update CI to build with the latest version of the compiler, update the bower repository URL to match the URL in the registry, upgrade bower dependencies, and update the changelog.
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.

3 participants