packages feed

type-level-natural-number 1.1.1 → 2.0

raw patch · 2 files changed

+15/−14 lines, 2 files

Files

TypeLevel/NaturalNumber.hs view
@@ -1,14 +1,15 @@ {- Copyright (c) 2008, Scott E. Dillard. All rights reserved. -} {- Copyright (c) 2010, Gregory M. Crosswhite. All rights reserved. -} +{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-}  module TypeLevel.NaturalNumber where  import Data.Typeable -data Zero-data SuccessorTo n+data Zero deriving Typeable+data SuccessorTo n deriving Typeable  type N0  = Zero type N1  = SuccessorTo N0@@ -98,8 +99,3 @@     compare _ _ = EQ instance NaturalNumber n => Ord (SuccessorTo n) where     compare _ _ = EQ--instance Typeable Zero where-    typeOf n = mkTyConApp (mkTyCon $ "N#0") []-instance NaturalNumber n => Typeable (SuccessorTo n) where-    typeOf n = mkTyConApp (mkTyCon $ "N#" ++ show (naturalNumberAsInt n + 1)) []
type-level-natural-number.cabal view
@@ -1,15 +1,15 @@ Name:                type-level-natural-number-Version:             1.1.1+Version:             2.0 License:             BSD3 License-file:        LICENSE Author:              Gregory Crosswhite-Maintainer:          Gregory Crosswhite <gcross@phys.washington.edu>+Maintainer:          Gregory Crosswhite <gcrosswhite@gmail.com> Stability:           Provisional-Synopsis:            Simple, Haskell 2010-compatible type level natural numbers-Description:         This is a simple, Haskell 2010 compatible implementation-                     of type-level natural numbers.  Operations requiring-                     non-Haskell 2010 language extensions have been split-                     into a separate package.+Synopsis:            Simple type level natural numbers+Description:         This is a simple implementation of type-level natural+                     numbers that only requires DeriveDataTypeable.  Operations+                     requiring more language extensions have been split into a+                     separate package. 		     .                      The difference between this package and the many                      others on Hackage implementing type-level@@ -31,6 +31,11 @@ 		     .                      Difference from 1.1:  Performance enhancements for                      naturalNumberAsInt.  Simplified Show implementation.+             .+                     Difference from 1.1.1:  Gave up on Haskell 2010+                     compatibility since as of GHC 7.8 manually deriving from+                     Typeable is no longer allowed; now I use+                     DeriveDataTypeable to construct the instances. Cabal-version:       >=1.6 Build-type:          Simple Category:	     Type System,Data