won't suffice, as we must provide the type information of Int and Char to a0 `eq` a1 and b0 `eq` b1 respectively. We would need to write something like
Admittedly, I see this as a temporary fix since the builtins really should provide the types they may be instantiated with e.g. we shouldn't just have eq as a builtin -- we should have eq instantiated with typesInt, Char, blah blah blah, are all builtins
This PR changes
to
s.t. the generated
qvn
may be influenced by the types it is instantiated with.This is important because in languages without type classes, we need to explicitly say which instance should be used. For example if we have type
when we generate the Eq instance, writing something like
won't suffice, as we must provide the type information of
Int
andChar
toa0 `eq` a1
andb0 `eq` b1
respectively. We would need to write something likeAdmittedly, I see this as a temporary fix since the builtins really should provide the types they may be instantiated with e.g. we shouldn't just have
eq
as a builtin -- we should haveeq
instantiated with typesInt
,Char
, blah blah blah, are all builtins