traq

Safe HaskellSafe
LanguageHaskell2010

Traq.CQPL.Cost

Contents

Synopsis

Documentation

procCost :: (Integral sizeT, Floating costT, Ord costT, HoleCost holeT costT, m ~ CostCalculator holeT sizeT costT) => Ident -> m costT #

programCost :: (Integral sizeT, Floating costT, Ord costT, HoleCost holeT costT) => Program holeT sizeT costT -> (costT, CostMap costT) #

types

type CostMap costT = Map Ident costT #

Cache the costs of each procedure

type CostCalculator holeT sizeT costT = ReaderT (CostEnv holeT sizeT costT) (StateT (CostMap costT) (Either String)) #

Monad to compute unitary cost.

Holes

class HoleCost holeT costT where #

Compute the cost of a placeholder (hole) program.

Methods

holeCost :: forall sizeT m. (Integral sizeT, Floating costT, Ord costT, m ~ CostCalculator holeT sizeT costT) => holeT -> m costT #

Instances
HoleCost Void costT # 
Instance details

Defined in Traq.CQPL.Cost

Methods

holeCost :: (Integral sizeT, Floating costT, Ord costT, m ~ CostCalculator Void sizeT costT) => Void -> m costT #