I'm pretty sure I don't want to make RealFunction a newtype, although
I haven't tested the performance impact. But I definitely don't want
to see these warnings. Use a pragma thingy to ignore them.
+{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
module RealFunction (
fexp )
where
-
+-- Presumably this is faster without a newtype wrapper, and that's why
+-- we're about to define a bunch of orphan instances below. Note the
+-- GHC pragma thingy at the top of this file to ignore those warnings.
type RealFunction a = (a -> Double)