From: John Munroe <munddr@gmail.com>
Hi,
I'm trying to overload two functions:
class C =
fixes foo :: "'a => int"
and bar :: "'a => int"
instantiation int :: C
begin
definition "foo (x::int) = bar (x::int) + 1"
Basically I'm trying to define foo(x) in terms of bar(x). Can it be
done in a type class?
Thanks
John
From: Brian Huffman <huffman@in.tum.de>
Yes, it can, but you need to provide a definition for bar first.
Last updated: Nov 21 2024 at 12:39 UTC