hermit-0.7.0.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellNone
LanguageHaskell2010

HERMIT.Dictionary.Function

Synopsis

Documentation

appArgM :: Monad m => Int -> CoreExpr -> m CoreExpr Source

Get the nth argument of an application. Arg 0 is the function being applied.

buildAppM :: MonadCatch m => CoreExpr -> CoreExpr -> m CoreExpr Source

Given expression for f and for x, build f x, figuring out the type arguments.

buildCompositionT :: (BoundVars c, HasHermitMEnv m, HasHscEnv m, MonadCatch m, MonadIO m, MonadThings m) => CoreExpr -> CoreExpr -> Transform c m x CoreExpr Source

Build composition of two functions.

buildFixT :: (BoundVars c, HasHscEnv m, HasHermitMEnv m, MonadCatch m, MonadIO m, MonadThings m) => CoreExpr -> Transform c m x CoreExpr Source

Given expression for f, build fix f.

buildIdT :: (BoundVars c, HasHscEnv m, HasHermitMEnv m, MonadCatch m, MonadIO m, MonadThings m) => Type -> Transform c m x CoreExpr Source

Build an expression that is the monomorphic id function for given type.

staticArgR :: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreDef Source

Traditional Static Argument Transformation

staticArgPosR :: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) => [Int] -> Rewrite c m CoreDef Source

Static Argument Transformations which requires that arguments in the given position are static.

staticArgPredR Source

Arguments

:: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) 
=> ([(Int, Var)] -> m [Int])

given list of static args and positions, decided which to transform

-> Rewrite c m CoreDef 

Generalized Static Argument Transformation, which allows static arguments to be filtered.

staticArgTypesR :: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreDef Source

Static Argument Transformation that only considers type arguments to be static.