From 9f330c4537e105a563ca9dc8b50b0f146a17dde8 Mon Sep 17 00:00:00 2001 From: "Malcolm.Wallace@cs.york.ac.uk" Date: Thu, 24 May 2007 16:06:15 +0000 Subject: [PATCH] nhc98 version of instance Show (a->b) copied from Prelude --- Text/Show/Functions.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Text/Show/Functions.hs b/Text/Show/Functions.hs index d0e2207..315d4d3 100644 --- a/Text/Show/Functions.hs +++ b/Text/Show/Functions.hs @@ -22,4 +22,12 @@ import Prelude #ifndef __NHC__ instance Show (a -> b) where showsPrec _ _ = showString "" +#else +instance (Show a,Show b) => Show (a->b) where + showsPrec d a = showString "<>" + + showsType a = showChar '(' . showsType value . showString " -> " . + showsType result . showChar ')' + where (value,result) = getTypes undefined + getTypes x = (x,a x) #endif -- 1.7.10.4