icicle-lang / p-ambiata

The prelude.
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

Remove Data.Monoid newtypes #121

Open jacobstanley opened 7 years ago

jacobstanley commented 7 years ago

Any, All, First, Last, Sum, and Product are all useful type/constructor names and it's very rare that I would use the newtype instead of just calling the function of the same name.

The only times that I've ever referred to these things in P is when I have to hide them so I can use the name for one of my own types/constructors.

Have other people found the same thing?

I would like to propose removing them and freeing up the names.

This will be a breaking change that will cause a little bit of churn, for one thing all the places where I have:

import P hiding (All) -- etc
jacobstanley commented 7 years ago

Could be done at the same time as https://github.com/ambiata/p/issues/74 if people agree

thumphries commented 7 years ago

Do we actually use these anywhere? I didn't know they existed. Would be good to estimate the churn before pulling the trigger

jacobstanley commented 7 years ago

Look at the code on my disk the only churn for projects I have would be removing the hiding (XYZ) clauses