Hi,
I want to put a function in an ADT and make the ADT an instance of Show.
Like the following small example:
data Fn = Fn (Float -> Float) Int
deriving Show
But, I get the error from GHC as follows:
Stimulus.hs:12:
No instance for `Show (Float -> Float)'
When deriving classes for `Fn'
Compilation had errors
make: *** [Stimulus.o] Error 1
Is there any way to do this? Note that it would be ok to generate blank
text.
Thanks,
Mike
- Re: Show class on ADT with function Mike Jones
- Re: Show class on ADT with function Sven Panne
- Re: Show class on ADT with function Marcin 'Qrczak' Kowalczyk
- Re: Show class on ADT with function George Russell
- Re: Show class on ADT with function Ian . Stark
- Re: Show class on ADT with function John Launchbury
