| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.UI.FLTK.LowLevel.Dispatch
- type family FindOp orig hierarchy needle :: *
- type family Functions x :: *
- data Match a
- data NoFunction a b
- class Op op obj origObj impl where
- dispatch :: forall op obj origObj impl. (Match obj ~ FindOp origObj origObj op, 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
type family FindOp orig hierarchy needle :: * Source
Equations
| FindOp orig () n = NoFunction n orig | |
| FindOp orig hierarchy needle = FindOpHelper orig hierarchy needle (Contains (Functions hierarchy) needle) |
Functions
type family Functions x :: * Source
Associate a "class" with it's member functions
Instances
Match
NoFunction
data NoFunction a b Source
See FindOp for more details.
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 implementsoporigObj- the class in the hierarchy where the search foropstarted. Kept around in case the type in needed. The best example issetCallbackwhose 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 aReforigobj, casted down toRefobjand whatever other parameters the instance specifies.
dispatch
dispatch :: forall op obj origObj impl. (Match obj ~ FindOp origObj origObj op, 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.