]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/RealFunction.hs
Remove the hscolour_srcs script, praying that Cabal/Haddock get it right soon.
[spline3.git] / src / RealFunction.hs
index 6a557a9f0f4d4bdb33df42485d84ae02e57cabe5..d461ae2f7d95fd1babe673d576c185bcee1e8de4 100644 (file)
@@ -1,6 +1,10 @@
-{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE FlexibleInstances #-}
 
-module RealFunction
+module RealFunction (
+  RealFunction,
+  cmult,
+  fexp
+  )
 where
 
 
@@ -11,13 +15,13 @@ type RealFunction a = (a -> Double)
 instance Show (RealFunction a) where
     -- | There is nothing of value that we can display about a
     --   function, so simply print its type.
-    show _ = "RealFunction"
+    show _ = "<RealFunction>"
 
 
 -- | An 'Eq' instance is required to be a 'Num' instance.
 instance Eq (RealFunction a) where
     -- | Nothing else makes sense here; always return 'False'.
-    _ == _ = False
+    _ == _ = error "You can't compare functions for equality."
 
 
 -- | The 'Num' instance for RealFunction allows us to perform