do-notation-dsl: An alternative to monads

[ bsd3, control, deprecated, dsl, effect, general, io, language, library, mutable-state, polymorphism ] [ Propose Tags ]
Deprecated in favor of control-dsl

Please see the README on GitHub at https://github.com/Atry/do-notation-dsl#readme


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3 (info)
Change log ChangeLog.md
Dependencies base (>=4.8 && <5) [details]
License BSD-3-Clause
Copyright 2018 Yang Bo
Author Yang Bo
Maintainer pop.atry@gmail.com
Revised Revision 1 made by HerbertValerioRiedel at 2018-10-02T08:07:05Z
Category Control, DSL, Effect, General, Language, Mutable State, IO, Polymorphism
Home page https://github.com/Atry/do-notation-dsl#readme
Bug tracker https://github.com/Atry/do-notation-dsl/issues
Source repo head: git clone https://github.com/Atry/do-notation-dsl
Uploaded by yangbo at 2018-10-02T02:01:26Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2001 total (16 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-10-02 [all 1 reports]

Readme for do-notation-dsl-0.1.0.1

[back to package description]

Dsl

The Prelude.>>= combinator limits the return type as a m b, which cause Monads not composable. In order to ease this restrictions, this proposal introduces another type class Dsl for do notation.

Motivation

Monads do not compose. Normally a do block cannot contains operators defined in different monad instances.

The state of art solution is using only one monad Eff, which forwards all monadic bind operations to custom effect handlers, instead of defining new monads.

However, the Eff approach is heavy weight than ordinary monad. It's not very convenient to create an additional indirect layer for simple use cases.

The Eff approach of bypassing >>= combinator is quite embarrassing. Since >>= settles on our logo, In this proposal we present a new approach to enable multiple operations at once by improving >>=. This proposal aims to port the approach used in Dsl.scala to Haskell. This approach improves the extensibility of >>=.