| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Traq.Primitives.Class.TypeCheck
Synopsis
- class (size ~ SizeType prim, ValidPrimShape (PrimFnShape prim)) => TypeCheckPrim prim size | prim -> size where
- inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', size ~ SizeType ext', shape ~ PrimFnShape prim) => prim -> shape (FnType size) -> m [VarType size]
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
| TypingReqs size => TypeCheckPrim (DefaultPrimCollection size prec) size # | |
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 sizeT => TypeCheckPrim (CAmplify sizeT precT) sizeT # | |
Defined in Traq.Primitives.Amplify.CAmplify Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (CAmplify sizeT precT)) => CAmplify sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| TypingReqs sizeT => TypeCheckPrim (Amplify sizeT precT) sizeT # | |
Defined in Traq.Primitives.Amplify.Prelude Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (Amplify sizeT precT)) => Amplify sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| TypingReqs sizeT => TypeCheckPrim (QAmplify sizeT precT) sizeT # | |
Defined in Traq.Primitives.Amplify.QAmplify Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (QAmplify sizeT precT)) => QAmplify sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| Eq sizeT => TypeCheckPrim (QMax sizeT precT) sizeT # | |
Defined in Traq.Primitives.Max.QMax Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (QMax sizeT precT)) => QMax sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| TypingReqs size => TypeCheckPrim (DetSearch size prec) size # | |
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 sizeT => TypeCheckPrim (PrimSearch sizeT precT) sizeT # | |
Defined in Traq.Primitives.Search.Prelude Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (PrimSearch sizeT precT)) => PrimSearch sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| TypingReqs size => TypeCheckPrim (QSearchCFNW size prec) size # | |
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 # | |
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 sizeT, Num precT, Ord precT, Show precT) => TypeCheckPrim (FindXorPeriod sizeT precT) sizeT # | |
Defined in Traq.Primitives.Simons.Prelude Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', sizeT ~ SizeType ext', shape ~ PrimFnShape (FindXorPeriod sizeT precT)) => FindXorPeriod sizeT precT -> shape (FnType sizeT) -> m [VarType sizeT] # | |
| (TypingReqs size, Num prec, Ord prec, Show prec) => TypeCheckPrim (SimonsFindXorPeriod size prec) size # | |
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 sizeT => TypeCheckPrim (QSearchSym sizeT precT) (Sym sizeT) # | |
Defined in Traq.Primitives.Search.Symbolic Methods inferRetTypesPrim :: forall ext' shape m. (m ~ TypeChecker ext', Sym sizeT ~ SizeType ext', shape ~ PrimFnShape (QSearchSym sizeT precT)) => QSearchSym sizeT precT -> shape (FnType (Sym sizeT)) -> m [VarType (Sym sizeT)] # | |