Splices without parens - Haskell

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

TheMatten

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

$$42
$$"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?

TheMatten

Alternatively, for

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

One could create desugaring into calls of:

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

lifting IsX classes to type level