What’s frustrating about TemplateHaskell being a bit of an odd duck (e.g. compilation headaches, declaration groups and splices, etc.) is that #haskell is great for writing compilers: it is good for taking code as input and outputting different code. A very natural thing, then, is to want to write a Haskell program that writes Haskell code. But working extensively at the type level is not an entirely great experience, and you end up reaching for TH because that’s what you have.

@acowley it needs to <explicative> die. It’s a horrible contraption, I’ll defined semantics (where does that thing actually execute?), way too powerful. (Oh, you just want some AST expansion? How about we give you full system access as the compilation user). Just god aweful in so many ways.

@angerman Is there any glimmer of another option? I feel like it salted the earth.

@acowley I'm not sure we have one yet. But I won't stop complaining about the miserable state we have today. I do not want to this to look like we are all content with the status quo. I think we need to go back to the drawing board. And what we really want is either some form of plugin solution (e.g. load something in the compiler that can extend the accepted language, effectively adding a new desugerer or similar; or build out ghci to be a able to evaluate an architecture independent bytecode).

Follow

@angerman @acowley STG (or whatever) interpreters can't come soon enough. I wonder why they weren't made available from start.

@dpwiz @acowley because it’s work, and someone needs to do it. See how long Csaba has been working on this. Sure he’s shooting for much more. But a lot is… just as good as it needed to be. I still think we should go back with TH to the drawing board. Accept what we have to day, and then try to gradually provide something better…

@dpwiz @angerman @acowley __Typed__ Template Haskell is limited to expressions but is less "ill defined".
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.