Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type family FindOp orig hierarchy (needle :: *) :: * where ...
- 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
- runOp :: Op op obj origObj impl => op -> origObj -> Ref obj -> impl
- castTo :: Ref a -> Ref r
- safeCast :: Parent a r => Ref a -> Ref r
- class Parent a b
FindOp
Functions
type family Functions (x :: *) :: * Source #
Associate a "class" with it's member functions
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 implementsop
origObj
- the class in the hierarchy where the search forop
started.
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 a Ref
origobj
, casted down to Ref
obj
and
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
.