HList-0.2.3: Heterogeneous lists

Data.HList.TypeCastGeneric2

Description

The HList library

(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke

A generic implementation of a type-safe cast. The specific coding here is only shown for completeness' sake and it is explained in the TR version of the paper. The shown coding does not rely on separate compilation (while Data.HList.TypeCastGeneric1 does), but on some other tricks.

Documentation

class TypeCast a b | a -> b, b -> a whereSource

Methods

typeCast :: a -> bSource

Instances

TypeCast' () a b => TypeCast a b 

class TypeCast' t a b | t a -> b, t b -> a whereSource

Methods

typeCast' :: t -> a -> bSource

Instances

TypeCast'' t a b => TypeCast' t a b 

class TypeCast'' t a b | t a -> b, t b -> a whereSource

Methods

typeCast'' :: t -> a -> bSource

Instances

TypeCast'' () a a