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

Represent expressions as arrows #38

Open
9 of 13 tasks
fehu opened this issue Jul 3, 2018 · 4 comments
Open
9 of 13 tasks

Represent expressions as arrows #38

fehu opened this issue Jul 3, 2018 · 4 comments
Assignees
Labels
arrows Uses arrow/morphism abstraction cmplx_norm Normal complexity enhancement New feature or request mapper Intermediate mapper level theory It has something to do with category theory

Comments

@fehu
Copy link
Contributor

fehu commented Jul 3, 2018

TBD: I'm not really confident with Category Theory, so I'll fill the description after a couple of discussions.

  • Arrows
    • Definition
    • Composition
      • syntax compose
      • syntax andThen
    • Unchaining - recursive decomposition
    • Pipes - arrows of tuples
      • Splitting - A ~> (B, C, D, E)
      • processing a single tuple element (A, B, C, D) ~> (A, E, C, D), similar to first/second
      • Joining - (A, B, C) ~> D
  • Functor - map arrows
    • generic functor for composition arrow
    • generic functor for split arrow
@fehu fehu added help wanted mapper Intermediate mapper level static Static API theory It has something to do with category theory and removed help wanted labels Jul 3, 2018
@fehu fehu mentioned this issue Jul 3, 2018
@fehu
Copy link
Contributor Author

fehu commented Jul 10, 2018

Upd: #41

@fehu fehu self-assigned this Jul 10, 2018
@fehu fehu added the cmplx_high High complexity label Jul 10, 2018
fehu added a commit that referenced this issue Jul 11, 2018
- ScalaExpr: Id, SelectField, FMap, MBind, SelectIn (TODO);
@fehu
Copy link
Contributor Author

fehu commented Jul 11, 2018

Introduced ScalaExpr "high-level" arrows and syntax for them

  • Id - identity arrow (self selection)
  • SelectField - expression representing selection of a field of an ADT (case class)
  • FMap - expression representing functor map operation
  • MBind - expression representing monadic bind / flatMap operation
  • SelectIn - TODO - expressions like index or key selection - TODO

@fehu
Copy link
Contributor Author

fehu commented Jul 11, 2018

TODO:

  • ScalaExpr.FieldSelectionOps#selectDynamic must compose field selection with itself.

fehu added a commit that referenced this issue Jul 11, 2018
- compose field selection with current arrow;
fehu added a commit that referenced this issue Jul 11, 2018
@fehu fehu changed the title Represent expressions as arrows between objects Represent scala expressions as arrows between types Jul 11, 2018
@fehu fehu added high-level High-level API experimental This task might yield no positive result enhancement New feature or request cmplx_high High complexity and removed cmplx_high High complexity experimental This task might yield no positive result labels Jul 11, 2018
@fehu
Copy link
Contributor Author

fehu commented Jul 11, 2018

Issue was split, see #42.

@fehu fehu added cmplx_norm Normal complexity and removed cmplx_high High complexity high-level High-level API static Static API labels Jul 11, 2018
@fehu fehu changed the title Represent scala expressions as arrows between types Represent expressions as arrows Jul 11, 2018
@fehu fehu added the arrows Uses arrow/morphism abstraction label Jul 11, 2018
fehu added a commit that referenced this issue Jul 11, 2018
- defined generic `splitFunctor` implicit
- overriding default `Split` functor for `FuncArrow` with `FuncArrow.mapSplitToFunc1Arrow` (import is required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrows Uses arrow/morphism abstraction cmplx_norm Normal complexity enhancement New feature or request mapper Intermediate mapper level theory It has something to do with category theory
Projects
None yet
Development

No branches or pull requests

1 participant