tek / splain

better implicit errors for scala
MIT License
370 stars 29 forks source link

Add `word-wrapping` for long infix types #6

Closed danslapman closed 7 years ago

danslapman commented 7 years ago

Long type signatures (like shapeless's records) looks clumsy even with infix printing. How about supporting optional word-wrapping by type name?

E.g.

Int :: String :: HNil

will become

Int ::
String ::
HNil
tek commented 7 years ago

I've had that idea as well, I'll get on it on the weekend

tek commented 7 years ago

took a shot at it. please give it a spin!

danslapman commented 7 years ago

Unfortunately, it seems that types in found/required error messages does not break.

tek commented 7 years ago

yeah, that's a little more complicated, but I'll see what I can do

tek commented 7 years ago

alright, seems to just work, although the indentation is off. I'll take a look when I find the time