uni-events-2.2.2.1: uni events
Safe HaskellNone
LanguageHaskell98

Events.Destructible

Description

Things which instance Destroyable and Destructible can be destroyed.

Synopsis

Documentation

class Destroyable o where Source #

Methods

destroy :: o -> IO () Source #

Destroys an object

class Destroyable o => Destructible o where Source #

Methods

destroyed :: o -> Event () Source #

An event which occurs when the object is destroyed.

doOnce :: IO () -> IO (IO ()) Source #

doOnce can be used to produce an action which is identical to its argument, except that if it's already been called, it does nothing.