Closed i-am-the-slime closed 6 years ago
Depends on how you're using the show instance, but you could newtype derive that too :stuck_out_tongue:
But I think the thing is that the instance names are used in the actual generated code, so there's no short newtype deriving form like in Haskell. You might very well set up some kind of codegen pipeline too, but maybe best is to get comfy with vim or spacemacs and copy-paste + region sub/match group edit/iedit and such (i.e. difference between selecting an area with visual mode and using :s/What/Thing/
, doing /What
and then using cgnThing
on a match and hitting .
to repeat, or putting your cursor on a symbol and doing spc s e
and using shift-J to select the lines to apply iedit to)
Alright, I'll do it with some editor magic :stuck_out_tongue_closed_eyes:
Hey there,
I am fairly new to Purescript, and I don't know if this is possible:
I find myself writing newtype declarations like this:
Now I could make that into a snippet in my editor but it would start to feel an awful lot like: Generate Getters/Setters in Java.
Is there any way to achieve this with less boilerplate? Maybe...
TemplatePurescript
😮 ?