Closed TimWhiting closed 1 month ago
@woojamon
Explicitly adding ,?show=show
works, but the above example without the explicit show
should ideally work as well.
Ahh, I think I figured it out. The main function isn't in the same recursive definition group as show because it doesn't use show explicitly. This means that it could be type checked prior to show
is defined. You can move the datatype / helper function to its own file, or even do something as simple as calling show("")
and it type checks fine.
Ok, I'll move some things to their own files. Thanks!
Wait, why doesn't eq
suffer the same problem then?
It just happens to be typed checked prior to main, or is uniquely named.
Discussed in https://github.com/koka-lang/koka/discussions/467
This seems like a bug