roles-0.2.0.0: Composable class-based roles

Safe HaskellNone
LanguageHaskell98

Data.Roles

Documentation

class Representational (t :: k1 -> k2) where #

Methods

rep :: Coercion a b -> Coercion (t a) (t b) #

An argument is representational if you can lift a coercion of the argument into one of the whole

rep :: Phantom t => Coercion a b -> Coercion (t a) (t b) #

An argument is representational if you can lift a coercion of the argument into one of the whole

Instances

Representational k1 * (Proxy k1) # 

Methods

rep :: Coercion (Proxy k1) a b -> Coercion k2 (t a) (t b) #

Representational k1 * (Coercion k1 a) # 

Methods

rep :: Coercion (Coercion k1 a) a b -> Coercion k2 (t a) (t b) #

Representational k1 * (Const k1 a) # 

Methods

rep :: Coercion (Const k1 a) a b -> Coercion k2 (t a) (t b) #

Representational k1 (k1 -> *) (Coercion k1) # 

Methods

rep :: Coercion (Coercion k1) a b -> Coercion k2 (t a) (t b) #

Representational * * [] # 

Methods

rep :: Coercion [] a b -> Coercion k2 (t a) (t b) #

Representational * * Maybe # 

Methods

rep :: Coercion Maybe a b -> Coercion k2 (t a) (t b) #

Representational * * IO # 

Methods

rep :: Coercion IO a b -> Coercion k2 (t a) (t b) #

Representational * * Complex # 

Methods

rep :: Coercion Complex a b -> Coercion k2 (t a) (t b) #

Representational * * Dual # 

Methods

rep :: Coercion Dual a b -> Coercion k2 (t a) (t b) #

Representational * * Endo # 

Methods

rep :: Coercion Endo a b -> Coercion k2 (t a) (t b) #

Representational * * Sum # 

Methods

rep :: Coercion Sum a b -> Coercion k2 (t a) (t b) #

Representational * * Product # 

Methods

rep :: Coercion Product a b -> Coercion k2 (t a) (t b) #

Representational * * First # 

Methods

rep :: Coercion First a b -> Coercion k2 (t a) (t b) #

Representational * * Last # 

Methods

rep :: Coercion Last a b -> Coercion k2 (t a) (t b) #

Representational * * IntMap # 

Methods

rep :: Coercion IntMap a b -> Coercion k2 (t a) (t b) #

Representational * * (Either a) # 

Methods

rep :: Coercion (Either a) a b -> Coercion k2 (t a) (t b) #

Representational * * ((,) a) # 

Methods

rep :: Coercion ((,) a) a b -> Coercion k2 (t a) (t b) #

Representational * * (ST s) # 

Methods

rep :: Coercion (ST s) a b -> Coercion k2 (t a) (t b) #

Representational * * (Map k) # 

Methods

rep :: Coercion (Map k) a b -> Coercion k2 (t a) (t b) #

Representational * * ((,,) a b) # 

Methods

rep :: Coercion ((,,) a b) a b -> Coercion k2 (t a) (t b) #

Representational * * ((->) LiftedRep LiftedRep a) # 

Methods

rep :: Coercion ((LiftedRep -> LiftedRep) a) a b -> Coercion k2 (t a) (t b) #

Representational * * ((,,,) a b c) # 

Methods

rep :: Coercion ((,,,) a b c) a b -> Coercion k2 (t a) (t b) #

Representational * * ((,,,,) a b c d) # 

Methods

rep :: Coercion ((,,,,) a b c d) a b -> Coercion k2 (t a) (t b) #

Representational * * ((,,,,,) a b c d e) # 

Methods

rep :: Coercion ((,,,,,) a b c d e) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> * -> * -> *) (,,,,,) # 

Methods

rep :: Coercion (,,,,,) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> * -> *) (,,,,) # 

Methods

rep :: Coercion (,,,,) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> *) (,,,) # 

Methods

rep :: Coercion (,,,) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> *) (,,) # 

Methods

rep :: Coercion (,,) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) Either # 

Methods

rep :: Coercion Either a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) (,) # 

Methods

rep :: Coercion (,) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> * -> *) ((,,,,,) a) # 

Methods

rep :: Coercion ((,,,,,) a) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> *) ((,,,,) a) # 

Methods

rep :: Coercion ((,,,,) a) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> *) ((,,,) a) # 

Methods

rep :: Coercion ((,,,) a) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) ((,,) a) # 

Methods

rep :: Coercion ((,,) a) a b -> Coercion k2 (t a) (t b) #

Representational * (k -> *) (Const k) # 

Methods

rep :: Coercion (Const k) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> * -> *) ((,,,,,) a b) # 

Methods

rep :: Coercion ((,,,,,) a b) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> *) ((,,,,) a b) # 

Methods

rep :: Coercion ((,,,,) a b) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) ((->) LiftedRep LiftedRep) # 

Methods

rep :: Coercion (LiftedRep -> LiftedRep) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) ((,,,) a b) # 

Methods

rep :: Coercion ((,,,) a b) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> * -> *) ((,,,,,) a b c) # 

Methods

rep :: Coercion ((,,,,,) a b c) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) ((,,,,) a b c) # 

Methods

rep :: Coercion ((,,,,) a b c) a b -> Coercion k2 (t a) (t b) #

Representational * (* -> *) ((,,,,,) a b c d) # 

Methods

rep :: Coercion ((,,,,,) a b c d) a b -> Coercion k2 (t a) (t b) #

class Representational t => Phantom (t :: k1 -> k2) where #

Methods

phantom :: Coercion (t a) (t b) #

An argument is phantom if you can coerce the whole ignoring the argument

phantom :: Coercible (t a) (t b) => Coercion (t a) (t b) #

An argument is phantom if you can coerce the whole ignoring the argument

Instances

Phantom k1 * (Proxy k1) # 

Methods

phantom :: Coercion k2 (t a) (t b) #

Phantom k1 * (Const k1 a) # 

Methods

phantom :: Coercion k2 (t a) (t b) #