X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FRealFunction.hs;h=cf98029a5f4948d71375ca0e8c188e19a2d39527;hb=c832bb3ac428a0d96759d9c82e9547d3acf4353d;hp=6a557a9f0f4d4bdb33df42485d84ae02e57cabe5;hpb=58cf11569acb270995d2de924dda03ef526647e2;p=spline3.git diff --git a/src/RealFunction.hs b/src/RealFunction.hs index 6a557a9..cf98029 100644 --- a/src/RealFunction.hs +++ b/src/RealFunction.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE FlexibleInstances #-} module RealFunction where @@ -11,13 +11,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