Skip to content

Commit

Permalink
fix build for GHC 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
glaebhoerl committed Sep 23, 2012
1 parent 03d0aa4 commit 52442f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Data/Nat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ instance Enum Nat where
(\x -> either ((if x == 0 then Right else Left) . div x) (Right . div x))
-- maybe this could be done simpler?

-- | maxBound = 'infinity'. Not sure if this is polite.
instance Bounded Nat where
minBound = 0
maxBound = infinity -- is this polite?
maxBound = infinity

instance Num Nat where
(+) n = foldNat n succ
Expand Down
8 changes: 5 additions & 3 deletions data-nat.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: data-nat
category: Data, Math
version: 0.1
version: 0.1.1
author: Gábor Lehel
maintainer: Gábor Lehel <illissius@gmail.com>
homepage: http://github.com/glehel/data-nat
Expand Down Expand Up @@ -40,9 +40,11 @@ library
other-extensions: DeriveDataTypeable

if impl(ghc >= 7.2)
build-depends: ghc-prim == 0.2.*
cpp-options: -DHAVE_GENERIC
other-extensions: DeriveGeneric
-- other-extensions: DeriveGeneric

if impl(ghc == 7.4)
build-depends: ghc-prim == 0.2.*

ghc-options:
-Wall

0 comments on commit 52442f1

Please sign in to comment.