traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.Primitives.Class.TypeCheck

Synopsis

Documentation

class (size ~ SizeType prim, ValidPrimShape (PrimFnShape prim)) => TypeCheckPrim prim size | prim -> size where #

Type check a primitive given the types of its function arguments, and infer the return types. The typechecker internally checks that the bound arguments are correct, and only gives the user the final type of the partial function.

Minimal complete definition

Nothing

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape prim) => prim -> shape (FnType size) -> m [VarType size] #

default inferRetTypesPrim :: forall ext' shape m. (Generic prim, GTypeCheckPrim (Rep prim) size, m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape prim) => prim -> shape (FnType size) -> m [VarType size] #

Instances

Instances details
TypingReqs size => TypeCheckPrim (DefaultPrimCollection size prec) size # 
Instance details

Defined in Traq.Primitives

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (DefaultPrimCollection size prec)) => DefaultPrimCollection size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (CAmplify size prec) size # 
Instance details

Defined in Traq.Primitives.Amplify.CAmplify

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (CAmplify size prec)) => CAmplify size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (Amplify size prec) size # 
Instance details

Defined in Traq.Primitives.Amplify.Prelude

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (Amplify size prec)) => Amplify size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (QAmplify size prec) size # 
Instance details

Defined in Traq.Primitives.Amplify.QAmplify

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (QAmplify size prec)) => QAmplify size prec -> shape (FnType size) -> m [VarType size] #

Eq size => TypeCheckPrim (QMax size prec) size # 
Instance details

Defined in Traq.Primitives.Max.QMax

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (QMax size prec)) => QMax size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (DetSearch size prec) size # 
Instance details

Defined in Traq.Primitives.Search.DetSearch

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (DetSearch size prec)) => DetSearch size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (PrimSearch size prec) size # 
Instance details

Defined in Traq.Primitives.Search.Prelude

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (PrimSearch size prec)) => PrimSearch size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (QSearchCFNW size prec) size # 
Instance details

Defined in Traq.Primitives.Search.QSearchCFNW

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (QSearchCFNW size prec)) => QSearchCFNW size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (RandomSearch size prec) size # 
Instance details

Defined in Traq.Primitives.Search.RandomSearch

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (RandomSearch size prec)) => RandomSearch size prec -> shape (FnType size) -> m [VarType size] #

(TypingReqs size, Num prec, Ord prec, Show prec) => TypeCheckPrim (FindXorPeriod size prec) size # 
Instance details

Defined in Traq.Primitives.Simons.Prelude

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (FindXorPeriod size prec)) => FindXorPeriod size prec -> shape (FnType size) -> m [VarType size] #

(TypingReqs size, Num prec, Ord prec, Show prec) => TypeCheckPrim (SimonsFindXorPeriod size prec) size # 
Instance details

Defined in Traq.Primitives.Simons.Quantum

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape (SimonsFindXorPeriod size prec)) => SimonsFindXorPeriod size prec -> shape (FnType size) -> m [VarType size] #

TypingReqs size => TypeCheckPrim (QSearchSym size prec) (Sym size) # 
Instance details

Defined in Traq.Primitives.Search.Symbolic

Methods

inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', Sym size ~ SizeType ext', shape ~ PrimFnShape (QSearchSym size prec)) => QSearchSym size prec -> shape (FnType (Sym size)) -> m [VarType (Sym size)] #