Jikka-5.0.11.1: A transpiler from Python to C++ for competitive programming
Copyright(c) Kimiyuki Onaka 2020
LicenseApache License 2.0
Maintainerkimiyuki95@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Jikka.Common.Alpha

Description

Alpha provides a monad to run alpha-conversion. This monad has only a feature to make unique numbers.

Documentation

class Monad m => MonadAlpha m where Source #

Methods

nextCounter :: m Int Source #

Instances

Instances details
Monad m => MonadAlpha (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

MonadAlpha m => MonadAlpha (ExceptT e m) Source # 
Instance details

Defined in Jikka.Common.Alpha

MonadAlpha m => MonadAlpha (ReaderT r m) Source # 
Instance details

Defined in Jikka.Common.Alpha

MonadAlpha m => MonadAlpha (StateT s m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

nextCounter :: StateT s m Int Source #

(MonadAlpha m, Monoid w) => MonadAlpha (WriterT w m) Source # 
Instance details

Defined in Jikka.Common.Alpha

newtype AlphaT m a Source #

Constructors

AlphaT 

Fields

Instances

Instances details
MonadTrans AlphaT Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

lift :: Monad m => m a -> AlphaT m a #

MonadError e m => MonadError e (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

throwError :: e -> AlphaT m a #

catchError :: AlphaT m a -> (e -> AlphaT m a) -> AlphaT m a #

Monad m => Monad (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

(>>=) :: AlphaT m a -> (a -> AlphaT m b) -> AlphaT m b #

(>>) :: AlphaT m a -> AlphaT m b -> AlphaT m b #

return :: a -> AlphaT m a #

Functor m => Functor (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

fmap :: (a -> b) -> AlphaT m a -> AlphaT m b #

(<$) :: a -> AlphaT m b -> AlphaT m a #

MonadFix m => MonadFix (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

mfix :: (a -> AlphaT m a) -> AlphaT m a #

Monad m => Applicative (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

pure :: a -> AlphaT m a #

(<*>) :: AlphaT m (a -> b) -> AlphaT m a -> AlphaT m b #

liftA2 :: (a -> b -> c) -> AlphaT m a -> AlphaT m b -> AlphaT m c #

(*>) :: AlphaT m a -> AlphaT m b -> AlphaT m b #

(<*) :: AlphaT m a -> AlphaT m b -> AlphaT m a #

MonadIO m => MonadIO (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

Methods

liftIO :: IO a -> AlphaT m a #

Monad m => MonadAlpha (AlphaT m) Source # 
Instance details

Defined in Jikka.Common.Alpha

liftCatch :: Catch e m (a, Int) -> Catch e (AlphaT m) a Source #

evalAlphaT :: Functor m => AlphaT m a -> Int -> m a Source #