{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Precursor.Numeric.Num
  ( Num(..)
  , Double
  , Float
  , Int
  , Integer
  ) where

import           Data.Int  (Int, Int16, Int32, Int64, Int8)
import           GHC.Float (Double, Float)
import           Prelude   (Integer)
import qualified Prelude

-- | A class which represents things that can be converted from integer
-- literals
class Num a where
  fromInteger :: Integer -> a
  default fromInteger :: Prelude.Num a => Integer -> a
  fromInteger = Prelude.fromInteger

instance Num Prelude.Integer
instance Num Int
instance Num Int8
instance Num Int16
instance Num Int32
instance Num Int64
instance Num Double
instance Num Float