singletons-2.0.1: A framework for generating singleton types

Copyright(C) 2014 Jan Stolarek, Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerJan Stolarek (jan.stolarek@p.lodz.pl)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Singletons.Prelude.Enum

Contents

Description

Defines the promoted and singleton version of Bounded, PBounded and SBounded

Synopsis

Documentation

class (kproxy ~ KProxy) => PBounded kproxy Source

Associated Types

type MinBound :: a Source

type MaxBound :: a Source

Instances

PBounded Bool (KProxy Bool) Source 
PBounded Ordering (KProxy Ordering) Source 
PBounded () (KProxy ()) Source 
PBounded ((,) a b) (KProxy ((,) a b)) Source 
PBounded ((,,) a b c) (KProxy ((,,) a b c)) Source 
PBounded ((,,,) a b c d) (KProxy ((,,,) a b c d)) Source 
PBounded ((,,,,) a b c d e) (KProxy ((,,,,) a b c d e)) Source 
PBounded ((,,,,,) a b c d e f) (KProxy ((,,,,,) a b c d e f)) Source 
PBounded ((,,,,,,) a b c d e f g) (KProxy ((,,,,,,) a b c d e f g)) Source 

class (kproxy ~ KProxy) => SBounded kproxy where Source

Instances

SBounded Bool (KProxy Bool) Source 
SBounded Ordering (KProxy Ordering) Source 
SBounded () (KProxy ()) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0)) => SBounded ((,) a b) (KProxy ((,) a b)) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0), SBounded c0 (KProxy c0)) => SBounded ((,,) a b c) (KProxy ((,,) a b c)) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0), SBounded c0 (KProxy c0), SBounded d0 (KProxy d0)) => SBounded ((,,,) a b c d) (KProxy ((,,,) a b c d)) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0), SBounded c0 (KProxy c0), SBounded d0 (KProxy d0), SBounded e0 (KProxy e0)) => SBounded ((,,,,) a b c d e) (KProxy ((,,,,) a b c d e)) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0), SBounded c0 (KProxy c0), SBounded d0 (KProxy d0), SBounded e0 (KProxy e0), SBounded f0 (KProxy f0)) => SBounded ((,,,,,) a b c d e f) (KProxy ((,,,,,) a b c d e f)) Source 
(SBounded a0 (KProxy a0), SBounded b0 (KProxy b0), SBounded c0 (KProxy c0), SBounded d0 (KProxy d0), SBounded e0 (KProxy e0), SBounded f0 (KProxy f0), SBounded g0 (KProxy g0)) => SBounded ((,,,,,,) a b c d e f g) (KProxy ((,,,,,,) a b c d e f g)) Source 

class (kproxy ~ KProxy) => PEnum kproxy Source

Associated Types

type Succ arg :: a Source

type Pred arg :: a Source

type ToEnum arg :: a Source

type FromEnum arg :: Nat Source

type EnumFromTo arg arg :: [a] Source

type EnumFromThenTo arg arg arg :: [a] Source

class (kproxy ~ KProxy) => SEnum kproxy where Source

Minimal complete definition

sToEnum, sFromEnum

Methods

sSucc :: forall t. Sing t -> Sing (Apply SuccSym0 t :: a) Source

sPred :: forall t. Sing t -> Sing (Apply PredSym0 t :: a) Source

sToEnum :: forall t. Sing t -> Sing (Apply ToEnumSym0 t :: a) Source

sFromEnum :: forall t. Sing t -> Sing (Apply FromEnumSym0 t :: Nat) Source

sEnumFromTo :: forall t t. Sing t -> Sing t -> Sing (Apply (Apply EnumFromToSym0 t) t :: [a]) Source

sEnumFromThenTo :: forall t t t. Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply EnumFromThenToSym0 t) t) t :: [a]) Source

Defunctionalization symbols

data SuccSym0 l Source

Instances

SuppressUnusedWarnings (TyFun k k -> *) (SuccSym0 k) Source 
type Apply k k (SuccSym0 k) l0 = SuccSym1 k l0 Source 

type SuccSym1 t = Succ t Source

data PredSym0 l Source

Instances

SuppressUnusedWarnings (TyFun k k -> *) (PredSym0 k) Source 
type Apply k k (PredSym0 k) l0 = PredSym1 k l0 Source 

type PredSym1 t = Pred t Source

data EnumFromToSym0 l Source

Instances

SuppressUnusedWarnings (TyFun k (TyFun k [k] -> *) -> *) (EnumFromToSym0 k) Source 
type Apply (TyFun k [k] -> *) k (EnumFromToSym0 k) l0 = EnumFromToSym1 k l0 Source 

data EnumFromToSym1 l l Source

Instances

SuppressUnusedWarnings (k -> TyFun k [k] -> *) (EnumFromToSym1 k) Source 
type Apply [k] k (EnumFromToSym1 k l1) l0 = EnumFromToSym2 k l1 l0 Source 

data EnumFromThenToSym0 l Source

Instances

SuppressUnusedWarnings (TyFun k (TyFun k (TyFun k [k] -> *) -> *) -> *) (EnumFromThenToSym0 k) Source 
type Apply (TyFun k (TyFun k [k] -> *) -> *) k (EnumFromThenToSym0 k) l0 = EnumFromThenToSym1 k l0 Source 

data EnumFromThenToSym1 l l Source

Instances

SuppressUnusedWarnings (k -> TyFun k (TyFun k [k] -> *) -> *) (EnumFromThenToSym1 k) Source 
type Apply (TyFun k [k] -> *) k (EnumFromThenToSym1 k l1) l0 = EnumFromThenToSym2 k l1 l0 Source 

data EnumFromThenToSym2 l l l Source

Instances

SuppressUnusedWarnings (k -> k -> TyFun k [k] -> *) (EnumFromThenToSym2 k) Source 
type Apply [k] k (EnumFromThenToSym2 k l1 l2) l0 = EnumFromThenToSym3 k l1 l2 l0 Source