singletons-2.3: 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 PBounded (a :: Type) Source #

Associated Types

type MinBound :: a Source #

type MaxBound :: a Source #

Instances

PBounded Bool Source # 

Associated Types

type MinBound Bool :: a Source #

type MaxBound Bool :: a Source #

PBounded Ordering Source # 

Associated Types

type MinBound Ordering :: a Source #

type MaxBound Ordering :: a Source #

PBounded () Source # 

Associated Types

type MinBound () :: a Source #

type MaxBound () :: a Source #

PBounded (a, b) Source # 

Associated Types

type MinBound (a, b) :: a Source #

type MaxBound (a, b) :: a Source #

PBounded (a, b, c) Source # 

Associated Types

type MinBound (a, b, c) :: a Source #

type MaxBound (a, b, c) :: a Source #

PBounded (a, b, c, d) Source # 

Associated Types

type MinBound (a, b, c, d) :: a Source #

type MaxBound (a, b, c, d) :: a Source #

PBounded (a, b, c, d, e) Source # 

Associated Types

type MinBound (a, b, c, d, e) :: a Source #

type MaxBound (a, b, c, d, e) :: a Source #

PBounded (a, b, c, d, e, f) Source # 

Associated Types

type MinBound (a, b, c, d, e, f) :: a Source #

type MaxBound (a, b, c, d, e, f) :: a Source #

PBounded (a, b, c, d, e, f, g) Source # 

Associated Types

type MinBound (a, b, c, d, e, f, g) :: a Source #

type MaxBound (a, b, c, d, e, f, g) :: a Source #

class SBounded a where Source #

Minimal complete definition

sMinBound, sMaxBound

Instances

SBounded Bool Source # 
SBounded Ordering Source # 
SBounded () Source # 
(SBounded a, SBounded b) => SBounded (a, b) Source # 

Methods

sMinBound :: Sing (a, b) (MinBoundSym0 (a, b)) Source #

sMaxBound :: Sing (a, b) (MaxBoundSym0 (a, b)) Source #

(SBounded a, SBounded b, SBounded c) => SBounded (a, b, c) Source # 

Methods

sMinBound :: Sing (a, b, c) (MinBoundSym0 (a, b, c)) Source #

sMaxBound :: Sing (a, b, c) (MaxBoundSym0 (a, b, c)) Source #

(SBounded a, SBounded b, SBounded c, SBounded d) => SBounded (a, b, c, d) Source # 

Methods

sMinBound :: Sing (a, b, c, d) (MinBoundSym0 (a, b, c, d)) Source #

sMaxBound :: Sing (a, b, c, d) (MaxBoundSym0 (a, b, c, d)) Source #

(SBounded a, SBounded b, SBounded c, SBounded d, SBounded e) => SBounded (a, b, c, d, e) Source # 

Methods

sMinBound :: Sing (a, b, c, d, e) (MinBoundSym0 (a, b, c, d, e)) Source #

sMaxBound :: Sing (a, b, c, d, e) (MaxBoundSym0 (a, b, c, d, e)) Source #

(SBounded a, SBounded b, SBounded c, SBounded d, SBounded e, SBounded f) => SBounded (a, b, c, d, e, f) Source # 

Methods

sMinBound :: Sing (a, b, c, d, e, f) (MinBoundSym0 (a, b, c, d, e, f)) Source #

sMaxBound :: Sing (a, b, c, d, e, f) (MaxBoundSym0 (a, b, c, d, e, f)) Source #

(SBounded a, SBounded b, SBounded c, SBounded d, SBounded e, SBounded f, SBounded g) => SBounded (a, b, c, d, e, f, g) Source # 

Methods

sMinBound :: Sing (a, b, c, d, e, f, g) (MinBoundSym0 (a, b, c, d, e, f, g)) Source #

sMaxBound :: Sing (a, b, c, d, e, f, g) (MaxBoundSym0 (a, b, c, d, e, f, g)) Source #

class PEnum (a :: Type) Source #

Associated Types

type Succ (arg :: a) :: a Source #

type Pred (arg :: a) :: a Source #

type ToEnum (arg :: Nat) :: a Source #

type FromEnum (arg :: a) :: Nat Source #

type EnumFromTo (arg :: a) (arg :: a) :: [a] Source #

type EnumFromThenTo (arg :: a) (arg :: a) (arg :: a) :: [a] Source #

Instances

PEnum Bool Source # 

Associated Types

type Succ Bool (arg :: Bool) :: a Source #

type Pred Bool (arg :: Bool) :: a Source #

type ToEnum Bool (arg :: Nat) :: a Source #

type FromEnum Bool (arg :: Bool) :: Nat Source #

type EnumFromTo Bool (arg :: Bool) (arg :: Bool) :: [a] Source #

type EnumFromThenTo Bool (arg :: Bool) (arg :: Bool) (arg :: Bool) :: [a] Source #

PEnum Ordering Source # 

Associated Types

type Succ Ordering (arg :: Ordering) :: a Source #

type Pred Ordering (arg :: Ordering) :: a Source #

type ToEnum Ordering (arg :: Nat) :: a Source #

type FromEnum Ordering (arg :: Ordering) :: Nat Source #

type EnumFromTo Ordering (arg :: Ordering) (arg :: Ordering) :: [a] Source #

type EnumFromThenTo Ordering (arg :: Ordering) (arg :: Ordering) (arg :: Ordering) :: [a] Source #

PEnum Nat Source # 

Associated Types

type Succ Nat (arg :: Nat) :: a Source #

type Pred Nat (arg :: Nat) :: a Source #

type ToEnum Nat (arg :: Nat) :: a Source #

type FromEnum Nat (arg :: Nat) :: Nat Source #

type EnumFromTo Nat (arg :: Nat) (arg :: Nat) :: [a] Source #

type EnumFromThenTo Nat (arg :: Nat) (arg :: Nat) (arg :: Nat) :: [a] Source #

PEnum () Source # 

Associated Types

type Succ () (arg :: ()) :: a Source #

type Pred () (arg :: ()) :: a Source #

type ToEnum () (arg :: Nat) :: a Source #

type FromEnum () (arg :: ()) :: Nat Source #

type EnumFromTo () (arg :: ()) (arg :: ()) :: [a] Source #

type EnumFromThenTo () (arg :: ()) (arg :: ()) (arg :: ()) :: [a] Source #

class SEnum a where Source #

Minimal complete definition

sToEnum, sFromEnum

Methods

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

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

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

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

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

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

sSucc :: forall (t :: a). ((Apply SuccSym0 t :: a) ~ Apply Succ_6989586621679806448Sym0 t) => Sing t -> Sing (Apply SuccSym0 t :: a) Source #

sPred :: forall (t :: a). ((Apply PredSym0 t :: a) ~ Apply Pred_6989586621679806461Sym0 t) => Sing t -> Sing (Apply PredSym0 t :: a) Source #

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

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

Instances

SEnum Bool Source # 
SEnum Ordering Source # 
SEnum Nat Source # 
SEnum () Source # 

Methods

sSucc :: Sing () t -> Sing () (Apply () () (SuccSym0 ()) t) Source #

sPred :: Sing () t -> Sing () (Apply () () (PredSym0 ()) t) Source #

sToEnum :: Sing Nat t -> Sing () (Apply Nat () (ToEnumSym0 ()) t) Source #

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

sEnumFromTo :: Sing () t -> Sing () t -> Sing [()] (Apply () [()] (Apply () (TyFun () [()] -> Type) (EnumFromToSym0 ()) t) t) Source #

sEnumFromThenTo :: Sing () t -> Sing () t -> Sing () t -> Sing [()] (Apply () [()] (Apply () (TyFun () [()] -> Type) (Apply () (TyFun () (TyFun () [()] -> Type) -> Type) (EnumFromThenToSym0 ()) t) t) t) Source #

Defunctionalization symbols

data SuccSym0 (l :: TyFun a6989586621679805857 a6989586621679805857) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679805857 a6989586621679805857 -> *) (SuccSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (SuccSym0 a6989586621679805857) t -> () Source #

type Apply a a (SuccSym0 a) l Source # 
type Apply a a (SuccSym0 a) l = Succ a l

type SuccSym1 (t :: a6989586621679805857) = Succ t Source #

data PredSym0 (l :: TyFun a6989586621679805857 a6989586621679805857) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679805857 a6989586621679805857 -> *) (PredSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (PredSym0 a6989586621679805857) t -> () Source #

type Apply a a (PredSym0 a) l Source # 
type Apply a a (PredSym0 a) l = Pred a l

type PredSym1 (t :: a6989586621679805857) = Pred t Source #

data ToEnumSym0 (l :: TyFun Nat a6989586621679805857) Source #

Instances

SuppressUnusedWarnings (TyFun Nat a6989586621679805857 -> *) (ToEnumSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (ToEnumSym0 a6989586621679805857) t -> () Source #

type Apply Nat k2 (ToEnumSym0 k2) l Source # 
type Apply Nat k2 (ToEnumSym0 k2) l = ToEnum k2 l

type ToEnumSym1 (t :: Nat) = ToEnum t Source #

data FromEnumSym0 (l :: TyFun a6989586621679805857 Nat) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679805857 Nat -> *) (FromEnumSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (FromEnumSym0 a6989586621679805857) t -> () Source #

type Apply a Nat (FromEnumSym0 a) l Source # 
type Apply a Nat (FromEnumSym0 a) l = FromEnum a l

type FromEnumSym1 (t :: a6989586621679805857) = FromEnum t Source #

data EnumFromToSym0 (l :: TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type)) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> *) (EnumFromToSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (EnumFromToSym0 a6989586621679805857) t -> () Source #

type Apply a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) (EnumFromToSym0 a6989586621679805857) l Source # 
type Apply a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) (EnumFromToSym0 a6989586621679805857) l = EnumFromToSym1 a6989586621679805857 l

data EnumFromToSym1 (l :: a6989586621679805857) (l :: TyFun a6989586621679805857 [a6989586621679805857]) Source #

Instances

SuppressUnusedWarnings (a6989586621679805857 -> TyFun a6989586621679805857 [a6989586621679805857] -> *) (EnumFromToSym1 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (EnumFromToSym1 a6989586621679805857) t -> () Source #

type Apply a [a] (EnumFromToSym1 a l1) l2 Source # 
type Apply a [a] (EnumFromToSym1 a l1) l2 = EnumFromTo a l1 l2

type EnumFromToSym2 (t :: a6989586621679805857) (t :: a6989586621679805857) = EnumFromTo t t Source #

data EnumFromThenToSym0 (l :: TyFun a6989586621679805857 (TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> Type)) Source #

Instances

SuppressUnusedWarnings (TyFun a6989586621679805857 (TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> Type) -> *) (EnumFromThenToSym0 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (EnumFromThenToSym0 a6989586621679805857) t -> () Source #

type Apply a6989586621679805857 (TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> Type) (EnumFromThenToSym0 a6989586621679805857) l Source # 
type Apply a6989586621679805857 (TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> Type) (EnumFromThenToSym0 a6989586621679805857) l = EnumFromThenToSym1 a6989586621679805857 l

data EnumFromThenToSym1 (l :: a6989586621679805857) (l :: TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type)) Source #

Instances

SuppressUnusedWarnings (a6989586621679805857 -> TyFun a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) -> *) (EnumFromThenToSym1 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (EnumFromThenToSym1 a6989586621679805857) t -> () Source #

type Apply a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) (EnumFromThenToSym1 a6989586621679805857 l1) l2 Source # 
type Apply a6989586621679805857 (TyFun a6989586621679805857 [a6989586621679805857] -> Type) (EnumFromThenToSym1 a6989586621679805857 l1) l2 = EnumFromThenToSym2 a6989586621679805857 l1 l2

data EnumFromThenToSym2 (l :: a6989586621679805857) (l :: a6989586621679805857) (l :: TyFun a6989586621679805857 [a6989586621679805857]) Source #

Instances

SuppressUnusedWarnings (a6989586621679805857 -> a6989586621679805857 -> TyFun a6989586621679805857 [a6989586621679805857] -> *) (EnumFromThenToSym2 a6989586621679805857) Source # 

Methods

suppressUnusedWarnings :: Proxy (EnumFromThenToSym2 a6989586621679805857) t -> () Source #

type Apply a [a] (EnumFromThenToSym2 a l1 l2) l3 Source # 
type Apply a [a] (EnumFromThenToSym2 a l1 l2) l3 = EnumFromThenTo a l1 l2 l3

type EnumFromThenToSym3 (t :: a6989586621679805857) (t :: a6989586621679805857) (t :: a6989586621679805857) = EnumFromThenTo t t t Source #