Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sleexyz/rebindable
Better RebindableSyntax for Indexed Monads
https://github.com/sleexyz/rebindable
haskell indexed monads rebindablesyntax
Last synced: 9 days ago
JSON representation
Better RebindableSyntax for Indexed Monads
- Host: GitHub
- URL: https://github.com/sleexyz/rebindable
- Owner: sleexyz
- Created: 2016-11-20T08:56:51.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-20T09:50:45.000Z (almost 8 years ago)
- Last Synced: 2024-04-25T20:46:27.293Z (7 months ago)
- Topics: haskell, indexed, monads, rebindablesyntax
- Language: Haskell
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rebindable
[![Hackage Status](https://img.shields.io/hackage/v/rebindable.svg)](https://hackage.haskell.org/package/rebindable)
A library to facilitate rebinding of syntax.
## Example:
```haskell
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}module Example where
import Control.Monad.Indexed
import Control.Monad.Indexed.State
import Control.Monad.Indexed.Trans
import Control.Monad.IO.Class
import Preludeimport qualified Language.Haskell.Rebindable as Use
import Data.Defaultfoo :: IxStateT IO String Int ()
foo = let Use.IxMonad{..} = def in do
ilift . liftIO . print =<< igetimodify (length)
ilift . liftIO . print =<< iget
```