eliminators-0.3: 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 -> (p @@ 0) -> (forall (k :: Nat). Sing k -> (p @@ k) -> p @@ (k + 1)) -> p @@ n Source #

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