
12 Jun
2018
12 Jun
'18
11:58 p.m.
Hi all, Given definitions of Line and Lines is it possible to define a type class (or maybe multiple type classes) that would allow for the following: (++) :: Line -> Line -> Lines (++) :: Line -> Lines -> Lines (++) :: Lines -> Line -> Lines (++) :: Lines -> Lines -> Lines I.e. is there a way to overload (++) such that it supports each of these 4 combinations? (Let's ignore that (++) already exists for the moment.) Cheers, Hilco