boop-0.1.0.0: OOP primitives for Haskell

Safe HaskellSafe
LanguageHaskell2010

Control.OOP.Base

Synopsis

Documentation

class a :> b where Source #

The instance-of typeclass. a :> b means that a is an instance of b.

Minimal complete definition

cast

Methods

cast :: a -> b Source #

Instances

a :> a Source #

Every interface is trivially an instance of itself.

Methods

cast :: a -> a Source #

Applicative m => Double :> (ToString m) Source # 

Methods

cast :: Double -> ToString m Source #

Applicative m => Int :> (ToString m) Source # 

Methods

cast :: Int -> ToString m Source #

Applicative m => Integer :> (ToString m) Source # 

Methods

cast :: Integer -> ToString m Source #

Applicative m => Rational :> (ToString m) Source # 

Methods

cast :: Rational -> ToString m Source #

Applicative m => String :> (ToString m) Source # 

Methods

cast :: String -> ToString m Source #

Applicative m => Text :> (ToString m) Source # 

Methods

cast :: Text -> ToString m Source #

Applicative m => LText :> (ToString m) Source # 

Methods

cast :: LText -> ToString m Source #

member :: cls :> inst => (inst -> inst -> a) -> cls -> a Source #

Member accessor: get an object member through an interface.

imember :: (inst -> inst -> a) -> inst -> a Source #

pureMember :: (cls :> inst, Applicative m) => (inst -> inst -> a) -> cls -> m a Source #

Applicative accessor for a pure member.

mapMember :: (cls :> inst, Functor m) => (inst -> inst -> a) -> m cls -> m a Source #

Accessing a pure member through a Functor

(-->) :: cls :> inst => cls -> (inst -> inst -> a) -> a infixl 8 Source #

Flipped operator alias for member.

(==>) :: inst -> (inst -> inst -> a) -> a infixl 8 Source #

Flipped operator alias for imember.

(-->>) :: (cls :> inst, Applicative m) => cls -> (inst -> inst -> a) -> m a infixl 8 Source #

Flipped operator alias for pureMember.

(>-->) :: (cls :> inst, Functor m) => m cls -> (inst -> inst -> a) -> m a infixl 8 Source #

Flipped operator alias for mapMember.