[Haskell-cafe] Statically checked overloaded strings
merijn at inconsistent.nl
Thu Nov 14 09:37:47 UTC 2019
I proposed a static validation for partial conversions from all sorts of polymorphic literals. At the time it was rejected (I don't really recall why), so I ended up implementing something along these lines as a library: https://hackage.haskell.org/package/validated-literals
Which has the benefit that users don't have to deal with writing TH themselves, you can just write a regular pure conversion function.
> On 13 Nov 2019, at 23:53, Christopher Done <chrisdone at gmail.com> wrote:
> Hi all,
> I just came up with this neat trick for adding static checks to overloaded strings: https://gist.github.com/chrisdone/809296b769ee36d352ae4f8dbe89a364
> Hope it's helpful.
> I wonder whether the GHC devs would be open to a small patch to permit: $$"..."
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the Haskell-Cafe