Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Algebra Syntax (was #78 Symbolic Infix Operators) #199

Open
benhutchison opened this issue Jan 16, 2017 · 0 comments
Open

Algebra Syntax (was #78 Symbolic Infix Operators) #199

benhutchison opened this issue Jan 16, 2017 · 0 comments

Comments

@benhutchison
Copy link
Member

Goals:

  1. Enable use of syntax (infix or postfix operators) over datatypes for which Algebra typeclasses are defined, when using Algera standalone (doesn't require Spire or Algebird)
  2. (Lower priority) Achieve the above without duplicating syntax code between Algebra and Cats.

This issue extends #78 and links some recent gitter discussion. I chose a new issue over extending #78 because of the introduction of cats-kernel (eg #152) means that much discussion from the earlier issue is out of date.

As of Jan 2017:

  • The most fundamental typeclasses definitions sit in cats-kernel. Algebra builds upon them.
  • They have syntax, but it lives in cats-core, and so aren't available to Algebra.
  • Algebra defines another layer of typeclasses, but without syntax.
  • Spire depends-upon- and defines-syntax- for Algebra and Cats-Kernel typeclasses.
  • Algebird depends upon Algebra and Cats Kernel typeclasses, and AFAICT defines some very limited syntax over them.

In my (possibly overly idealistic) view, there are three problems here:

  • If you want to use cats-kernel or Algebra standalone you don't have any syntax/infix operators.
  • Syntax isn't defined along with the typeclasses to which it applies (ie related concerns are spaced wide apart).
  • There's syntax code duplication between Spire, Cats-Core and Algebird.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant