X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FRealFunction.hs;h=d461ae2f7d95fd1babe673d576c185bcee1e8de4;hb=922f93eb2aa9d8ef1747289f5973de25bd346edc;hp=6a557a9f0f4d4bdb33df42485d84ae02e57cabe5;hpb=58cf11569acb270995d2de924dda03ef526647e2;p=spline3.git diff --git a/src/RealFunction.hs b/src/RealFunction.hs index 6a557a9..d461ae2 100644 --- a/src/RealFunction.hs +++ b/src/RealFunction.hs @@ -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 _ = "" -- | 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