type-level-numbers-0.1.1.2: Type level numbers implemented using type families.

Copyright | Alexey Khudyakov
License | BSD3-style (see LICENSE)
Maintainer | Alexey Khudyakov <alexey.skladnoy@gmail.com>
Stability | unstable
Portability | unportable (GHC only)
Safe Haskell | Safe-Inferred
Language | Haskell2010

TypeLevel.Reify

Description

Synopsis

- data Witness t a = Witness {
  - getValue :: a
  }
- class Reify t a where
  - witness :: Witness t a

# Documentation

data Witness t a Source #

Value with type tag

Constructors

Witness |

Fields

- getValue :: a

#### Instances

Instances details

(Data t, Data a) => Data (Witness t a) Source # |

Instance details

Defined in TypeLevel.Reify

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Witness t a -> c (Witness t a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Witness t a) Source #

toConstr :: Witness t a -> Constr Source #

dataTypeOf :: Witness t a -> DataType Source #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Witness t a)) Source #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Witness t a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Witness t a -> Witness t a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Witness t a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Witness t a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Witness t a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Witness t a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Witness t a -> m (Witness t a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Witness t a -> m (Witness t a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Witness t a -> m (Witness t a) Source #

Show a => Show (Witness t a) Source # |
Instance details Defined in TypeLevel.Reify Methods showsPrec :: Int -> Witness t a -> ShowS Source # show :: Witness t a -> String Source # showList :: [Witness t a] -> ShowS Source #
Eq a => Eq (Witness t a) Source # |
Instance details Defined in TypeLevel.Reify Methods (==) :: Witness t a -> Witness t a -> Bool Source # (/=) :: Witness t a -> Witness t a -> Bool Source #

class Reify t a where Source #

Convert type level into value level using

Methods

witness :: Witness t a Source #

#### Instances

Instances details

Reify False Bool Source # |
Instance details Defined in TypeLevel.Boolean Methods witness :: Witness False Bool Source #
Reify True Bool Source # |
Instance details Defined in TypeLevel.Boolean Methods witness :: Witness True Bool Source #
Reify Z Int16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Int16 Source #
Reify Z Int32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Int32 Source #
Reify Z Int64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Int64 Source #
Reify Z Int8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Int8 Source #
Reify Z Word16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Word16 Source #
Reify Z Word32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Word32 Source #
Reify Z Word64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Word64 Source #
Reify Z Word8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Word8 Source #
Reify Z Integer Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Integer Source #
Reify Z Int Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness Z Int Source #
(Nat (I n), Lesser (I n) (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (I Z))))))))))))))))) => Reify (I n) Int16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Int16 Source #
Nat (I n) => Reify (I n) Int32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Int32 Source #
Nat (I n) => Reify (I n) Int64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Int64 Source #
(Nat (I n), Lesser (I n) (O (O (O (O (O (O (O (I Z))))))))) => Reify (I n) Int8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Int8 Source #
(Nat (I n), Lesser (I n) (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (I Z)))))))))))))))))) => Reify (I n) Word16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Word16 Source #
Nat (I n) => Reify (I n) Word32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Word32 Source #
Nat (I n) => Reify (I n) Word64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Word64 Source #
(Nat (I n), Lesser (I n) (O (O (O (O (O (O (O (O (I Z)))))))))) => Reify (I n) Word8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Word8 Source #
Nat (I n) => Reify (I n) Integer Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Integer Source #
Nat (I n) => Reify (I n) Int Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (I n) Int Source #
(Nat (O n), Lesser (O n) (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (I Z))))))))))))))))) => Reify (O n) Int16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Int16 Source #
Nat (O n) => Reify (O n) Int32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Int32 Source #
Nat (O n) => Reify (O n) Int64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Int64 Source #
(Nat (O n), Lesser (O n) (O (O (O (O (O (O (O (I Z))))))))) => Reify (O n) Int8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Int8 Source #
(Nat (O n), Lesser (O n) (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (O (I Z)))))))))))))))))) => Reify (O n) Word16 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Word16 Source #
Nat (O n) => Reify (O n) Word32 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Word32 Source #
Nat (O n) => Reify (O n) Word64 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Word64 Source #
(Nat (O n), Lesser (O n) (O (O (O (O (O (O (O (O (I Z)))))))))) => Reify (O n) Word8 Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Word8 Source #
Nat (O n) => Reify (O n) Integer Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Integer Source #
Nat (O n) => Reify (O n) Int Source # |
Instance details Defined in TypeLevel.Number.Nat Methods witness :: Witness (O n) Int Source #