Yes, in Haskell 98 functions are not an instance of Show.
If you want to make it so, just add
instance Show (a->b) where
show = ...
Simon
> -----Original Message-----
> From: Conal Elliott
> Sent: Thursday, June 03, 1999 1:15 AM
> To: 'ghc-bugs'
> Cc: 'Oege de Moor'
> Subject: Show and function types in 4.03
>
>
>
> Did something change in 4.03 w.r.t. Show and functions? Mag stopped
> compiling:
>
> ghc-4.03 -c -O2 -fvia-C -O2-for-C -H20M UU_Pretty.hs
>
> UU_Pretty.hs:9:
> No instance for `Show (Int -> String -> String)'
> When deriving classes for `Format'
>
> Here's the code:
>
> data Format = Elem { height :: Int
> , last_w :: Int
> , total_w :: Int
> , txtstr :: Int -> String -> String
> }
> deriving Show
>
> - Conal
>