{-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds, ScopedTypeVariables,
TypeFamilies, TypeOperators, GADTs, UndecidableInstances,
FlexibleContexts, DefaultSignatures, BangPatterns,
InstanceSigs, TypeApplications, StandaloneKindSignatures #-}
module Data.Singletons.Base.Enum (
PBounded(..), SBounded(..),
PEnum(..), SEnum(..),
MinBoundSym0,
MaxBoundSym0,
SuccSym0, SuccSym1,
PredSym0, PredSym1,
ToEnumSym0, ToEnumSym1,
FromEnumSym0, FromEnumSym1,
EnumFromToSym0, EnumFromToSym1, EnumFromToSym2,
EnumFromThenToSym0, EnumFromThenToSym1, EnumFromThenToSym2,
EnumFromThenToSym3
) where
import Data.Eq.Singletons
import Data.Ord.Singletons
import Data.Singletons.Base.Instances
import Data.Singletons.Base.Util
import Data.Singletons.TH
import GHC.Base.Singletons
import GHC.Num.Singletons
import GHC.TypeLits.Singletons
$(singletonsOnly [d|
class Bounded a where
minBound, maxBound :: a
instance Bounded Char where
minBound = '\0'
maxBound = '\x10FFFF'
|])
$(singBoundedInstances boundedBasicTypes)
$