{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Array.Accelerate.Classes.Real (
Real,
) where
import Data.Array.Accelerate.Smart
import Data.Array.Accelerate.Classes.Num
import Data.Array.Accelerate.Classes.Ord
import Prelude hiding ( Real, Num, Ord )
import qualified Prelude as P
type Real a = (Num a, Ord a, P.Real (Exp a))
instance (Num a, Ord a) => P.Real (Exp a) where
toRational
= error
$ unlines [ "Prelude.toRational is not supported for Accelerate types"
, ""
, "These Prelude.Real instances are present only to fulfil superclass"
, "constraints for subsequent classes in the standard Haskell numeric hierarchy."
]