Splices without parens - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.


From 8.11, splices apparently don't need parens in presence of literals anymore, so one will be able to write:

$$"Hello world!"
$$[1, 2, 3]

And because all of those are overloadable, it means that we'll be able to write instances that check properties of literals at compile-time, with minimum syntactic overhead.
Anyone plans to make use of this?


Alternatively, for

$"Hello world!"

One could create desugaring into calls of:

class FromX (n :: DataKind) a where
  fromX :: a

lifting IsX classes to type level