Skip to content
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

Add These to this library #9

Open
4 tasks
emilypi opened this issue Jun 26, 2020 · 4 comments
Open
4 tasks

Add These to this library #9

emilypi opened this issue Jun 26, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@emilypi
Copy link
Owner

emilypi commented Jun 26, 2020

Let's complete the picture and just add These here. Here is the following checklist:

  • Import the these-skinny datastructures and basic functionalities into smash-core.
  • REMEMBER THE LICENSE. These are terms of art owed to C. McCann. Alternatively, we could name it something else like Ior for "inclusive or" to avoid this.
  • Write the missing instances for all relevant deps (see the these library).
  • Write the corresponding optics + aeson support.
@emilypi emilypi added enhancement New feature or request help wanted Extra attention is needed labels Jun 26, 2020
@emilypi emilypi added this to the Smash-0.1.2.0 Release milestone Jun 26, 2020
@masaeedu
Copy link
Contributor

we could name it something else like Ior for "inclusive or" to avoid this.

I am strongly in favor of names that facilitate Eeyore puns

eeyore

@emilypi
Copy link
Owner Author

emilypi commented Sep 17, 2020

Omg I never noticed that until now. I always say "eye-or" not "ee-or"! 😆

@subttle
Copy link
Contributor

subttle commented Apr 8, 2021

Hi, just a suggestion that would perhaps ease the merging would be to implement instances for https://hackage.haskell.org/package/assoc (because this is how it's done in the these package), so for example:

-- Data.Smash
import Data.Bifunctor.Swap
import Data.Bifunctor.Assoc

instance Swap Smash where
  swap = swapSmash
instance Assoc Smash where
  assoc = reassocLR
  unassoc = reassocRL
-- Data.Can
import Data.Bifunctor.Swap
import Data.Bifunctor.Assoc

instance Swap Can where
  swap = swapCan
instance Assoc Can where
  assoc = reassocLR
  unassoc = reassocRL
-- Data.Wedge
import Data.Bifunctor.Swap
import Data.Bifunctor.Assoc

instance Swap Wedge where
  swap = swapWedge

instance Assoc Wedge where
  assoc = reassocLR
  unassoc = reassocRL

Feel free to ignore the suggestion, of course, just thought it may help. Have a nice day :)

@masaeedu
Copy link
Contributor

masaeedu commented Apr 8, 2021

Another alternative is https://github.com/masaeedu/monoidal, which has those classes plus a few more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants