docmunch / antemodulum

Yet another prelude
MIT License
0 stars 0 forks source link

add non-conflicting Strict.Pair module #1

Closed gregwebs closed 10 years ago

spl commented 10 years ago

Instead of answering here, I decided to write up my thoughts in the README (43e64429193cb4698fc1565f8acbb2755caa0076). In the process, I realized I wasn't being consistent, so I updated the Strict module.

spl commented 10 years ago

Following my train of thought with module types, I think there are several options:

  1. Add Antemodulum.Strict.Pair as you have. That becomes a no-conflict module which should be exported from Antemodulum. Also, Antemodulum.Strict should no longer export the Pair names, but only Either and Maybe, to keep the modules orthogonal.
  2. Add a type class for both (a,b) and Pair a b that avoids the namespace conflicts by replacing the prelude functions with methods.
gregwebs commented 10 years ago

option 1 please, it is nice to have a non-overloaded option, and lens has _1 & _2, we should look at using them first.