AutoForms-0.5.0: GUI library based upon generic programming (SYB3)ContentsIndex
Graphics.UI.AF.General.InstanceCreator
Synopsis
createInstance :: GInstanceCreator a => Maybe a
createInstance' :: GInstanceCreator a => a -> Maybe a
gInstanceCreatorCtx :: Proxy GInstanceCreatorD
class Data GInstanceCreatorD a => GInstanceCreator a where
gGenUpTo :: Int -> [a]
gGenUpTo :: GInstanceCreator a => Int -> [a]
Documentation
createInstance :: GInstanceCreator a => Maybe a
Creates an instance of a Haskell type. For this to work the compiler must be able to deduce the type from the callee's context.
createInstance'
:: GInstanceCreator a
=> aNot evaluated. Only used to force the right type.
-> Maybe a
Like createInstance excepts it uses a phantom type to elicit the correct type to return.
gInstanceCreatorCtx :: Proxy GInstanceCreatorD

Instantiation of the Sat class

The context for generic autoform

class Data GInstanceCreatorD a => GInstanceCreator a where
Used to creates instances of data types
Methods
gGenUpTo
:: IntMax number of recursions
-> [a]

Generates all possible instances of a, while using no more than n levels of recursion. Each subtype requires another level of recursion. For example:

Branch (Branch Leaf 17) (Leaf 3)

would require 4 levels of recursion. One for the first branch, one for second branch, one for the left Leaf, and one for the Int (the seventeen). The right part of the first branch (Left 3) would be done in two recursions.

gGenUpTo
:: GInstanceCreator a
=> IntMax number of recursions
-> [a]

Generates all possible instances of a, while using no more than n levels of recursion. Each subtype requires another level of recursion. For example:

Branch (Branch Leaf 17) (Leaf 3)

would require 4 levels of recursion. One for the first branch, one for second branch, one for the left Leaf, and one for the Int (the seventeen). The right part of the first branch (Left 3) would be done in two recursions.

Produced by Haddock version 2.0.0.0