Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class FindOp a b c | a b -> c
- class Functions a b | a -> b
- data Match a
- data NoFunction a
- class Op op obj origObj impl where
- dispatch :: forall op obj origObj impl. (FindOp origObj op (Match obj), Op op obj origObj impl) => op -> Ref origObj -> impl
- castTo :: Ref a -> Ref r
- safeCast :: Parent a r => Ref a -> Ref r
- class Parent a b
FindOp
class FindOp a b c | a b -> c Source
FindOp
searches a class hierarchy for a member function (an Op-eration)
and returns the first class in the hierarchy that support it.
Given a class hierarchy starting at a
and member function b
find c
, the
closest ancestor to a
(possibly a
) that has that function.
If found r
is Match c
, if not found r
is NoFunction b
.
Functions
class Functions a b | a -> b Source
Associate a "class" with it's member functions
Functions Base () Source | The Base of the hierarchy has no functions |
Functions IntInput () Source | |
Functions SelectBrowser () Source | |
Functions Box () Source | |
Functions ValueTimer () Source | |
Functions HiddenTimer () Source | |
Functions HorValueSlider () Source | |
Functions SimpleCounter () Source | |
Functions LineDial () Source | |
Functions FillDial () Source | |
Functions HorNiceSlider () Source | |
Functions NiceSlider () Source | |
Functions HorFillSlider () Source | |
Functions HorSlider () Source | |
Functions FillSlider () Source | |
Functions RadioLightButton () Source | |
Functions Widget WidgetFuncs Source | |
Functions GlContext () Source | |
Functions Region () Source |
Match
NoFunction
Op
class Op op obj origObj impl where Source
Implementations of methods on various types of objects.
op
- name of the functionobj
- the class that implementsop
origObj
- the class in the hierarchy where the search forop
started. Kept around in case the type in needed. The best example issetCallback
whose implementation is usually found much lower in the hierarchy but where we also want to enforce that the implementation take the type of the widget calling it.impl
- a function that takes the aRef
origobj
, casted down toRef
obj
and whatever other parameters the instance specifies.
dispatch
dispatch :: forall op obj origObj impl. (FindOp origObj op (Match obj), Op op obj origObj impl) => op -> Ref origObj -> impl Source
runOp
castTo
castTo :: Ref a -> Ref r Source
Cast any reference to any other reference. Unsafe, intended to be used by Op
.