| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Traq.Primitives.Class.Prelude
Contents
Synopsis
- type family PrimFnShape prim :: Type -> Type
- class ValidPrimShape shape where
- listToShape :: [a] -> Either String (shape a)
- shapeToList :: shape a -> [a]
- reshape :: (ValidPrimShape shape, ValidPrimShape shape') => shape a -> Either String (shape' a)
- reshapeUnsafe :: (ValidPrimShape shape, ValidPrimShape shape') => shape a -> shape' a
- data PartialFun = PartialFun {}
- placeArgs :: [Maybe a] -> [a] -> [a]
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
class ValidPrimShape shape where #
Conversion between shaped information and a list.
Instances
| ValidPrimShape SamplerFn # | |
Defined in Traq.Primitives.Amplify.Prelude | |
| ValidPrimShape BooleanPredicate # | |
Defined in Traq.Primitives.Search.Prelude Methods listToShape :: [a] -> Either String (BooleanPredicate a) # shapeToList :: BooleanPredicate a -> [a] # | |
| ValidPrimShape FindXorPeriodArg # | |
Defined in Traq.Primitives.Simons.Prelude Methods listToShape :: [a] -> Either String (FindXorPeriodArg a) # shapeToList :: FindXorPeriodArg a -> [a] # | |
| ValidPrimShape List # | |
Defined in Traq.Primitives.Class.Prelude | |
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 _
Instances
| Show PartialFun # | |
Defined in Traq.Primitives.Class.Prelude Methods showsPrec :: Int -> PartialFun -> ShowS # show :: PartialFun -> String # showList :: [PartialFun] -> ShowS # | |
| Eq PartialFun # | |
Defined in Traq.Primitives.Class.Prelude | |
| Parseable PartialFun # | |
Defined in Traq.Primitives.Class.Prelude Methods parseE :: TokenParser () -> Parser PartialFun # | |
| RenameVars PartialFun # | |
Defined in Traq.Primitives.Class.Prelude Methods renameVars :: Ident -> PartialFun -> PartialFun # | |
| ToCodeString PartialFun # | |
Defined in Traq.Primitives.Class.Prelude Methods build :: (MonadWriter [String] m, MonadFail m) => PartialFun -> m () # | |