traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.Primitives.Class.Prelude

Synopsis

Primitives

type family PrimFnShape prim :: Type -> Type #

The shape of the function arguments that primitive prim expects. The type PrimFnShape prim a should be a subtype of [a], for every a. This type is useful to specify record constructor names for readability.

Instances

Instances details
type PrimFnShape (DefaultPrimCollection sizeT precT) # 
Instance details

Defined in Traq.Primitives

type PrimFnShape (CAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.CAmplify

type PrimFnShape (CAmplify size prec) = SamplerFn
type PrimFnShape (Amplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.Prelude

type PrimFnShape (Amplify size prec) = SamplerFn
type PrimFnShape (QAmplify size prec) # 
Instance details

Defined in Traq.Primitives.Amplify.QAmplify

type PrimFnShape (QAmplify size prec) = SamplerFn
type PrimFnShape (QMax size prec) # 
Instance details

Defined in Traq.Primitives.Max.QMax

type PrimFnShape (QMax size prec)
type PrimFnShape (DetSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.DetSearch

type PrimFnShape (PrimSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.Prelude

type PrimFnShape (QSearchCFNW size prec) # 
Instance details

Defined in Traq.Primitives.Search.QSearchCFNW

type PrimFnShape (RandomSearch size prec) # 
Instance details

Defined in Traq.Primitives.Search.RandomSearch

type PrimFnShape (QSearchSym size prec) # 
Instance details

Defined in Traq.Primitives.Search.Symbolic

type PrimFnShape (FindXorPeriod sizeT precT) # 
Instance details

Defined in Traq.Primitives.Simons.Prelude

type PrimFnShape (SimonsFindXorPeriod sizeT precT) # 
Instance details

Defined in Traq.Primitives.Simons.Quantum

class ValidPrimShape shape where #

Conversion between shaped information and a list.

Methods

listToShape :: [a] -> Either String (shape a) #

shapeToList :: shape a -> [a] #

Instances

Instances details
ValidPrimShape SamplerFn # 
Instance details

Defined in Traq.Primitives.Amplify.Prelude

Methods

listToShape :: [a] -> Either String (SamplerFn a) #

shapeToList :: SamplerFn a -> [a] #

ValidPrimShape BooleanPredicate # 
Instance details

Defined in Traq.Primitives.Search.Prelude

ValidPrimShape FindXorPeriodArg # 
Instance details

Defined in Traq.Primitives.Simons.Prelude

ValidPrimShape List # 
Instance details

Defined in Traq.Primitives.Class.Prelude

Methods

listToShape :: [a] -> Either String [a] #

shapeToList :: [a] -> [a] #

reshape :: (ValidPrimShape shape, ValidPrimShape shape') => shape a -> Either String (shape' a) #

reshapeUnsafe :: (ValidPrimShape shape, ValidPrimShape shape') => shape a -> shape' a #

Partial Functions

data PartialFun #

A partially applied function Syntax: f(a_1, ..., a_n) where each a_i is either an identifier, or a blank _

Constructors

PartialFun 

Instances

Instances details
Show PartialFun # 
Instance details

Defined in Traq.Primitives.Class.Prelude

Eq PartialFun # 
Instance details

Defined in Traq.Primitives.Class.Prelude

Parseable PartialFun # 
Instance details

Defined in Traq.Primitives.Class.Prelude

RenameVars PartialFun # 
Instance details

Defined in Traq.Primitives.Class.Prelude

ToCodeString PartialFun # 
Instance details

Defined in Traq.Primitives.Class.Prelude

Methods

build :: (MonadWriter [String] m, MonadFail m) => PartialFun -> m () #

placeArgs :: [Maybe a] -> [a] -> [a] #

Place a list of concrete values inside a list of incomplete values. For example, placeArgs [Just 0, Nothing, Just 2, Nothing] [1, 3] = [0,1,2,3]