packages feed

singleton-nats 0.1.1.0 → 0.2.0.0

raw patch · 2 files changed

+19/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Nat: (*) :: Nat -> Nat -> Nat
- Data.Nat: (+) :: Nat -> Nat -> Nat
+ Data.Nat: natMul :: Nat -> Nat -> Nat
+ Data.Nat: natPlus :: Nat -> Nat -> Nat

Files

Data/Nat.hs view
@@ -5,8 +5,8 @@  module Data.Nat (     Nat(..)-  , (Data.Nat.+)-  , (Data.Nat.*)+  , natPlus+  , natMul   , SNat   , Data.Singletons.Prelude.Sing(..)   , (:*)@@ -38,12 +38,25 @@   Z * b = Z   S a * b = b + (a * b) |]) +{-| This is the plain value-level version of addition on Nats. There's rarely a reason to use this;+it's included for completeness. -}+natPlus :: Nat -> Nat -> Nat+natPlus = (Data.Nat.+)++{-| Similarly to 'natPlus', this one is included for completeness. -}+natMul :: Nat -> Nat -> Nat+natMul = (Data.Nat.*)++{-| Provides a shorthand for 'Nat'-s using "GHC.TypeLits", for example:++>>> :kind! Lit 3+Lit 3 :: Nat+= 'S ('S ('S 'Z))+-}+ type family Lit n where   Lit 0 = Z   Lit n = S (Lit (n Lit.- 1))  type SLit n = Sing (Lit n)--- 
singleton-nats.cabal view
@@ -1,6 +1,6 @@  name:                singleton-nats-version:             0.1.1.0+version:             0.2.0.0 synopsis:            Unary natural numbers relying on the singletons infrastructure.          license:             BSD3 license-file:        LICENSE