karczma wrote:
Actually, I would like to know what was the purpose of all
that...
I was writing some new code and wanted to break it into two parts,
they should have very little knowledge of each other other than what
methods are available in each (hence the classes). The actual types
of the
Sam Mason writes:
Jon Cast wrote:
The intermediate type /is/ needed---it's a (hidden) parameter to your
`encode' and `decode' functions. Why do you think it shouldn't be?
Because I couldn't see the woods for the trees. I think I had
almost figured out what I was asking (the impossible) before
karczma wrote:
Don't forget that this is the toplevel business, not a universal
disease. GHCi says
Prelude :t (show . read)
(show . read) :: String - String
and doesn't complain. But if you define
bz = show . read
the attempt to load this definition (file: ctest.hs) results in: