eliminators-0.6: Dependently typed elimination functions using singletons
Copyright(C) 2017 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityExperimental
PortabilityGHC
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Eliminator.TypeNats

Description

A crude imitation of an eliminator function for Nat.

Synopsis

Documentation

elimNat :: forall (p :: Nat ~> Type) (n :: Nat). Sing n -> Apply p 0 -> (forall (k :: Nat). Sing k -> Apply p k -> Apply p (k + 1)) -> Apply p n Source #

Although Nat is not actually an inductive data type in GHC, we can (crudely) pretend that it is using this eliminator.