blarney
Copyright(c) 2020 Matthew Naylor
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred

Blarney.Stmt

Description

 
Synopsis

Documentation

data Stmt a Source #

Statement monad, with mondic bind for sequential composition.

Instances

Instances details
Applicative Stmt # 
Instance details

Defined in Blarney.Stmt

Methods

pure :: a -> Stmt a #

(<*>) :: Stmt (a -> b) -> Stmt a -> Stmt b #

liftA2 :: (a -> b -> c) -> Stmt a -> Stmt b -> Stmt c

(*>) :: Stmt a -> Stmt b -> Stmt b #

(<*) :: Stmt a -> Stmt b -> Stmt a #

Functor Stmt # 
Instance details

Defined in Blarney.Stmt

Methods

fmap :: (a -> b) -> Stmt a -> Stmt b #

(<$) :: a -> Stmt b -> Stmt a #

Monad Stmt # 
Instance details

Defined in Blarney.Stmt

Methods

(>>=) :: Stmt a -> (a -> Stmt b) -> Stmt b #

(>>) :: Stmt a -> Stmt b -> Stmt b #

return :: a -> Stmt a #

When (Bit 1) Stmt # 
Instance details

Defined in Blarney.Stmt

Methods

when :: Bit 1 -> Stmt () -> Stmt () Source #

IfThenElse (Bit 1) (Stmt ()) # 
Instance details

Defined in Blarney.Stmt

Methods

ifThenElse :: Bit 1 -> Stmt () -> Stmt () -> Stmt () Source #

action :: Action () -> Stmt () Source #

wait :: Bit 1 -> Stmt () Source #

par :: [Stmt ()] -> Stmt () Source #

while :: Bit 1 -> Stmt () -> Stmt () Source #

runStmt :: Stmt () -> Module () Source #

Run a statement with a start pulse that is high only on the first cycle of execution, and ignore the finish pulse.

runStmtOn :: Bit 1 -> Stmt () -> Module (Bit 1) Source #

Run a statement, triggered by the given start pulse. Returns the finish pulse.