- 108

This is a toy problem to investigate how the Glasgow Haskell Compiler can optimize a monad transformer stack. Discussion on reddit.

https://github.com/HeinrichApfelmus/optimize-monad-transTags | haskell monad-transformers compiler-optimization explanatory |

Implementation | Haskell |

License | Public |

Platform |

This course/tutorial was created with purpose to better understand functional programming idioms using Scala language. It covers type classes, monoids, functors, applicatives, monads, traversable/foldable, monad transformers, free monad. Material is structured as set of stub/unimplemented functions/classes and tests for them. Your objective is to make all unit tests green. It is learn-by-doing course. NICTA course was a great and interesting challenge for me to do in Haskell. I think Scala community will benefit from the similar course.

course functional-programming monad monoid functor typeclasses functional-idioms monad-transformers tutorial comonads monads applicativeExtensible effects are an alternative to monad transformers for computing with effects in a functional way. This library is based on the "free-er" monad and extensible effects described in Oleg Kiselyov in Freer monads, more extensible effects. You can also check out this presentation at flatMap Oslo 2016 (slides).

monad monad-transformers effectsThis repository is filled with articles I have written and needed online for various reasons. Below is a short summary of the articles available publically; the repository may contain files not mentioned below, in which case they're probably unfinished or otherwise not worth reading at this point. Applicative-Monad proposal (AMP) is the original text of the 2013 Applicative-Monad proposal, which was the starting point for Applicative becoming a superclass of Monad in GHC 7.10.

haskell hindley-milner articles tutorialsPowerful Streams and functional data types for building modern Java 8 applications. We extend JDK interfaces where possible for maximum integration.ReactiveSeq extends JDK Stream and offers multiple modes of execution - synchonous, asynchronous, asynchronous with backpressure, parallel and more.

functional-programming reactive-streams monoid streams collections data-structures monad monad-transformers reactive asynchronous java8 streams-apiΛrrow is a library for Typed Functional Programming in Kotlin. Arrow aims to provide a lingua franca of interfaces and abstractions across Kotlin libraries. For this, it includes the most popular data types, type classes and abstractions such as Option, Try, Either, IO, Functor, Applicative, Monad to empower users to write pure FP apps and libraries built atop higher order abstractions.

functional-programming kotlin-library monads monad-transformers functional-data-structure kotlin fp-types free-monads tagless-final mtl for-comprehension category-theory metaprogramming kategory funktionale optics recursion-schemesClosure Compiler is the most advanced JavaScript optimization tool. It generates smallest bundle and emits efficient JavaScript code by doing whole program analysis and optimization, removing closures and inlining function calls, as well as tree-shaking for AMD, CommonJS and ES2015 modules. While there's JavaScript version of Closure Compiler, the original compiler is written in Java and thus Java version is more complete and performs better in terms of JavaScript code optimizations and compilation speed. If you want to use Java-based compiler, make sure you have installed Java SDK.

closure-compiler webpack-closure-compiler optimization tree-shaking webpack closure compiler build optimize dead code pluginEta is a pure, lazy, strongly typed functional programming language on the JVM. It is a dialect of Haskell on the JVM. It is pure by default which means that calling a function with the same arguments will yield the same results every time. It is lazy by default which means that data stays in unevaluated state until a function needs to peek inside.

programming-language functional-language jvm-language concurrency functional-programmingMonadEx introduces monads into Elixir. Monads encapsulate state and control the flow of code. A monad's bind operation is similar, but more powerful, than Elixir's built-in pipelines. Monads may be combined to make even more useful constructs. For example, you may want to use a state monad in combination with a result monad. The state monad can track a shared environment and the result monad can keep track of the success or failure state.

Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers.

This library provides simple Ruby implementations of some common monads. The most important method of each implementation is #and_then (a.k.a. bind or >>=), which is used to connect together a sequence of operations involving the value(s) inside the monad. Each monad also has a .from_value class method (a.k.a. return or unit) for constructing an instance of that monad from an arbitrary value.

This library uses and abuses the features of C# 6+ to provide a functional 'Base class library', that, if you squint, can look like extensions to the language itself.language-ext is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome backers. If you'd like to join them, check out the language-ext Patreon campaign. Or if you'd just like to help support the coffee fund, that is very welcome too!.

c-sharp functional-languages monads monad-transformers immutable-collections higher-kinded-types language-ext f-sharpEff is a functional programming language based on algebraic effects and their handlers. Algebraic effects are a way of adding computational effects to a pure functional setting. In a technical sense they are subsumed by the monadic approach to computational effects, but they offer new ways of programming that are not easily achieved with monads. In particular, algebraic effects are combined seamlessly, whereas monad transformers are needed in the monadic style.

A complete and extensible base library for F#. In the Sample folder you can find scripts showing how to use F#+ in your code.

f-sharp generic-functions monad-transformers arrow-functions extensions lenses computation-expressionsA mini Scala utility library. Compatible with functional programming beginners. For the JVM and Scala.js.

functional-programming hlist union-types monad-transformers minimal enums validation error-handling typeclassContinuation.js is a compiler for Continuation-Passing Style transformation, which simplifies asynchronous JavaScript programming. It translates slightly flavored JavaScript syntax into standard JavaScript, so it can be also called a "translator". Continuation.js introduces a virtual function cont, which allow you to write continuation-passing style code (or asynchronous callback style code) far easier. cont is not a actual function, but a mark with the same syntax to function calls in JavaScript. By using Continuation.js you can write asynchronous control flows like flat threaded code, and it compiles it into continuation-passing style code. The code above is flatted by using the virtual function cont. Control flow must "wait" for the return of asynchronous function call fs.readFile. Parameters in the argument list of cont will be set after it returns. "Return" here is a little confusing because in an asynchronous function "return" means callback function called, not "return" in the literal sense. An asynchronous function usually returns immediately (by encountering return statement or the end of the function scope) while the callback function could be called later. You can be understood as all the statements after cont until the end of the function are the callback function of the asynchronous function call. The code feels like threaded code, but it is still asynchronous while executing.

compiler continuation async cps monad coffeescript livescriptIt's a bit mind bending in that it's like using a higher-level list monad, but it's very, very cool. For beginning Haskellers, what would be really useful is a visualisation of what happens when you do various distributed/parallel stuff. It's almost shocking how effortlessly you can run computations across threads/nodes. The cool part is the composability in the distributed setting. You can make higher-order monadic functions that allow you to compose & reuse a long chain of distributed transactions via wormhole and teleport. Another benefit is that the transaction becomes first class and you can see exactly what's going on in one place instead of distributing the logic across actors making the code equivalent to event callbacks, as you've stated.

distributed-computing web events threading composition backtracking composability haskell transaction concurrencyAn extension to the core Scala library for functional programming. It provides purely functional data structures to complement those from the Scala standard library. It defines a set of foundational type classes (e.g. Functor, Monad) and corresponding instances for a large number of data structures.

scala-extension scala-library functor monadElegant error/exception handling in Elixir, with result monads. The OK module works with result tuples by treating them as a result monad.

pipeline monad macros elixir elixir-pipelinesBow is a library for Typed Functional Programming in Swift. Bow is available using CocoaPods, Carthage, and Swift Package Manager.

functional-programming category-theory functor monad swift-library free-monad tagless-final mtl cocoapods carthage bow effects composition fp spm declarative-programming reactive-programmingAn asynchronous effect monad and threading model for PureScript. This looks like ordinary, synchronous, imperative code, but actually operates asynchronously without any callbacks. Error handling is baked in so you only deal with it when you want to.

We have large collection of open source products. Follow the tags from
Tag Cloud >>

Open source products are scattered around the web. Please provide information
about the open source projects you own / you use.
**Add Projects.**