How to see if type is instance of a class in Haskell?
- by Raekye
I'm probably doing this completely wrong (the unhaskell way); I'm just learning so please let me know if there's a better way to approach this.
Context: I'm writing a bunch of tree structures. I want to reuse my prettyprint function for binary trees. Not all trees can use the generic Node/Branch data type though; different trees need different…