{-# LANGUAGE TypeSynonymInstances #-}
module Algebra.Z 
  ( Z
  , module Algebra.Structures.IntegralDomain
  ) where

import Test.QuickCheck

import Algebra.Structures.IntegralDomain


-- | Type synonym for integers.
type Z = Integer

instance Ring Z where
  (<*>) = (*)
  (<+>) = (+)
  neg   = negate
  one   = 1
  zero  = 0

instance CommutativeRing Z

instance IntegralDomain Z

propIntegralDomainZ :: Z -> Z -> Z -> Property
propIntegralDomainZ = propIntegralDomain