traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.Analysis.Annotate.SplitBudget

Synopsis

Documentation

class AnnotateWithErrorBudgetU ext where #

Update the annotation given a total error budget for this primitive call.

Methods

annEpsU :: forall ext' size prec m. (ext' ~ AnnFailProb ext, size ~ SizeType ext, prec ~ PrecType ext, ErrorReqs size prec, m ~ AnnotateMonad ext ext') => FailProb prec -> ext' -> m ext' #

Instances

Instances details
UnitaryCostPrim prim size prec => AnnotateWithErrorBudgetU (Primitive prim) # 
Instance details

Defined in Traq.Primitives.Class

Methods

annEpsU :: (ext' ~ AnnFailProb (Primitive prim), size ~ SizeType (Primitive prim), prec ~ PrecType (Primitive prim), ErrorReqs size prec, m ~ AnnotateMonad (Primitive prim) ext') => FailProb prec -> ext' -> m ext' #

class AnnotateWithErrorBudgetQ ext where #

Methods

annEpsQ :: forall ext' size prec m. (ext' ~ AnnFailProb ext, size ~ SizeType ext, prec ~ PrecType ext, ErrorReqs size prec, m ~ AnnotateMonad ext ext') => FailProb prec -> ext' -> m ext' #

Instances

Instances details
(UnitaryCostPrim prim size prec, QuantumHavocCostPrim prim size prec) => AnnotateWithErrorBudgetQ (Primitive prim) # 
Instance details

Defined in Traq.Primitives.Class

Methods

annEpsQ :: (ext' ~ AnnFailProb (Primitive prim), size ~ SizeType (Primitive prim), prec ~ PrecType (Primitive prim), ErrorReqs size prec, m ~ AnnotateMonad (Primitive prim) ext') => FailProb prec -> ext' -> m ext' #

annEpsU1 :: forall ext ext' size prec m. (AnnotateWithErrorBudgetU1 p, AnnotateWithErrorBudgetU ext, ext' ~ AnnFailProb ext, size ~ SizeType ext, prec ~ PrecType ext, ErrorReqs size prec, m ~ AnnotateMonad ext ext') => FailProb prec -> p ext' -> m (p ext') #

annEpsQ1 :: forall ext ext' size prec m. (AnnotateWithErrorBudgetQ1 p, AnnotateWithErrorBudgetQ ext, ext' ~ AnnFailProb ext, size ~ SizeType ext, prec ~ PrecType ext, ErrorReqs size prec, m ~ AnnotateMonad ext ext') => FailProb prec -> p ext' -> m (p ext') #

canError :: (CanError p, ext ~ ExtensionType p, MonadState st m, HasFunCtx st ext) => p -> m Bool #

annotateProgWithErrorBudgetU :: (m ~ Either String, AnnotateWithErrorBudgetU ext, size ~ SizeType ext, prec ~ PrecType ext, ErrorReqs size prec) => FailProb prec -> Program ext -> m (Program (AnnFailProb ext)) #