All Projects β†’ fumieval β†’ Monad Skeleton

fumieval / Monad Skeleton

Licence: other
Operational monad library

Programming Languages

haskell
3896 projects

Labels

Projects that are alternatives of or similar to Monad Skeleton

meiga
πŸ§™ A simple, typed and monad-based Result type for Python.
Stars: ✭ 24 (-20%)
Mutual labels:  monads
Mu Scala
Mu is a purely functional library for building RPC endpoint based services with support for RPC and HTTP/2
Stars: ✭ 266 (+786.67%)
Mutual labels:  monads
Fetch
Simple & Efficient data access for Scala and Scala.js
Stars: ✭ 453 (+1410%)
Mutual labels:  monads
fpEs
Functional Programming for EcmaScript(Javascript)
Stars: ✭ 40 (+33.33%)
Mutual labels:  monads
typescript-monads
πŸ“šWrite safer TypeScript using Maybe, List, Result, and Either monads.
Stars: ✭ 94 (+213.33%)
Mutual labels:  monads
Language Ext
C# functional language extensions - a base class library for functional programming
Stars: ✭ 3,964 (+13113.33%)
Mutual labels:  monads
freestyle-cassandra
Freestyle Cassandra
Stars: ✭ 17 (-43.33%)
Mutual labels:  monads
Freestyle
A cohesive & pragmatic framework of FP centric Scala libraries
Stars: ✭ 627 (+1990%)
Mutual labels:  monads
monadic-cfa
Generic implementation of different CFA families based on monadic decomposition
Stars: ✭ 16 (-46.67%)
Mutual labels:  monads
Arrow
Ξ›rrow - Functional companion to Kotlin's Standard Library
Stars: ✭ 4,771 (+15803.33%)
Mutual labels:  monads
dry-matcher
Flexible, expressive pattern matching for Ruby
Stars: ✭ 91 (+203.33%)
Mutual labels:  monads
declarative-form-generator
A simple react form generator using functional programming concepts
Stars: ✭ 14 (-53.33%)
Mutual labels:  monads
True Myth
A library for safer and smarter error- and "nothing"-handling in TypeScript.
Stars: ✭ 360 (+1100%)
Mutual labels:  monads
fp-ts-cheatsheet
FP-TS Cheat Sheet
Stars: ✭ 276 (+820%)
Mutual labels:  monads
Learn Fp
learn-by-doing course/tutorial for functional programming on scala
Stars: ✭ 548 (+1726.67%)
Mutual labels:  monads
Forbind
Functional chaining and promises in Swift
Stars: ✭ 44 (+46.67%)
Mutual labels:  monads
Monio
Async-capable IO monad for JS
Stars: ✭ 311 (+936.67%)
Mutual labels:  monads
Kea
Composable Functional Programming in R
Stars: ✭ 18 (-40%)
Mutual labels:  monads
Oslash
Functors, Applicatives, And Monads in Python
Stars: ✭ 561 (+1770%)
Mutual labels:  monads
Whyhaskellmatters
In this article I try to explain why Haskell keeps being such an important language by presenting some of its most important and distinguishing features and detailing them with working code examples. The presentation aims to be self-contained and does not require any previous knowledge of the language.
Stars: ✭ 418 (+1293.33%)
Mutual labels:  monads

monad-skeleton

Build Status Hackage

This package provides Skeleton, an operational monad. The internal encoding gives O(1) bind and monadic reflection.

Skeleton promotes unit instructions to a monad. It is isomorphic to MonadView (Skeleton t):

data MonadView t m x where
  Return :: a -> MonadView t m a
  (:>>=) :: !(t a) -> (a -> m b) -> MonadView t m b

boned :: MonadView t (Skeleton t) a -> Skeleton t a
debone :: Skeleton t a -> MonadView t (Skeleton t) a

GADTs are handy to define instructions:

data Interaction x where
  Get :: Interaction String
  Put :: String -> Interaction ()

echo :: Skeleton Interaction ()
echo = bone Get >>= bone . Put

Use debone to interpret a computation.

interpret :: Skeleton Interaction a -> IO a
interpret m = case debone m of
  Return a -> return a
  Get :>>= k -> getLine >>= interpret . k
  Put s :>>= k -> putStrLn s >>= interpret . k
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].