The THEff package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

This package implements effects, as alternative to monad transformers. Actually, the effects themselves are created without the use of TH, but the binding of nested effects described by mkEff splice. For example.

mkEff "MyReader"    ''Reader    ''Int       ''Lift
mkEff "SomeState"   ''State     ''Bool      ''MyReader
mkEff "OtherRdr"    ''Reader    ''Float     ''SomeState

main:: IO ()
main = do
    r <- runMyReader  100
       $ runSomeState False
       $ runOtherRdr  pi  $ do
            i :: Int   <- ask                    -- MyReader
            f :: Float <- ask                    -- OtherRdr
            b <- get                             -- SomeState
            put $ not b                          -- SomeState
            lift $ putStrLn "print from effect!" -- Lift
            return $ show $ fromIntegral i * f
    print r

For more information about extensible effects , see the original paper at http://okmij.org/ftp/Haskell/extensible/exteff.pdf. But, this package is significantly different from the original. It uses a chains of ordinary GADTs created by TH. No Typeable, unsafe... , ExistentialQuantification ...

Properties

Versions0.1.0.1, 0.1.1.0, 0.1.1.0, 0.1.3, 0.1.4
Change logNone available
Dependenciesbase (==4.8.*), template-haskell (>=2.4 && <2.11) [details]
LicenseBSD3
AuthorKolodezny Diver
Maintainerkolodeznydiver@gmail.com
CategoryControl, Effect, TH
Source repositoryhead: git clone https://github.com/KolodeznyDiver/THEff.git
UploadedMon Aug 31 13:22:27 UTC 2015 by kolodeznydiver

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees