Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 673 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 673 Bytes

rebindable

Hackage Status

A library to facilitate rebinding of syntax.

Example:

{-# 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 Prelude

import qualified Language.Haskell.Rebindable as Use
import Data.Default

foo :: IxStateT IO String Int ()
foo = let Use.IxMonad{..} = def in do
  ilift . liftIO . print =<< iget

  imodify (length)
  ilift . liftIO . print =<< iget