polysemy-methodology: Domain modelling algebra for polysemy

[ library, mit, polysemy ] [ Propose Tags ]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.2.1, 0.1.3.0, 0.1.3.1, 0.1.3.2, 0.1.4.0, 0.1.5.0, 0.1.6.0, 0.1.7.0, 0.1.8.0, 0.2.0.0, 0.2.1.0, 0.2.2.0
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), polysemy, polysemy-plugin, polysemy-zoo [details]
License MIT
Copyright 2020 Daniel Firth
Author Daniel Firth
Maintainer dan.firth@homotopic.tech
Category Polysemy
Source repo head: git clone https://gitlab.com/homotopic-tech/polysemy-methodology
Uploaded by locallycompact at 2020-10-29T13:09:28Z
Distributions
Reverse Dependencies 5 direct, 0 indirect [details]
Downloads 2601 total (37 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-10-29 [all 1 reports]

Readme for polysemy-methodology-0.1.1.0

[back to package description]

polysemy-methodology

polysemy-methodology provides an algebra for domain modelling in polysemy.

A simple program might look something like this:

prog :: Members '[ Input a
                 , Methodology a b
                 , Output b]
prog = input @a >>= process @a @b >>= output @b

That is, this program transforms an Input a into an Output b by way of a Methodology a b that turns a into b. We can then type apply a and b and connect this to main.

If we have a solution readily available, we can consume a Methodology by running one of the interpreters runMethodologyPure or runMethodologySem.

Otherwise, we can use the other interpreters in this package to break the problem down into components or branches and solve each section separately. Each interpreter will produce a new set of Methodologys to be solved.

This allows you to work up a solution to a domain problem backwards, by running the program you intend to solve directly and using holes to guide the requirements.