Proposal: ValidateMonoLiterals - Initial bikeshed discussion

Merijn Verstraaten merijn at inconsistent.nl
Fri Feb 6 10:07:07 UTC 2015


And no one of my proofreaders noticed that >.>

I would propose to have the extension replace the 'fromString "foo"', 'fromIntegral 5' and 'fromList [1,2,3]' calls (for monomorphic cases) in the AST with the relevant Typed TH splice.

I considered quasi-quotation initially too, but there's no quasi quotation syntax for Typed TH. I'm guessing that's just an oversight, but I'd really be in favour of adding a typed quasiquoter too. Similarly to thinking we should have an easier way to obtain Lift  instances since, to me at least, it seems that the Lift instance for most ADTs should be fairly trivial?

I'll quickly clarify the proposal on the wiki :)

Cheers,
Merijn

> On 5 Feb 2015, at 22:48, Simon Peyton Jones <simonpj at microsoft.com> wrote:
> 
> I'm all for it.  Syntax sounds like the main difficulty.  Today you could use quasiquotatoin
> 	[even| 38 |]
> and get the same effect as $$(validate 38).  But it's still noisy.
> 
> So: what is the non-noisy scheme you want to propose?  You don't quite get to that in the wiki page!
> 
> Simon
> 
> | -----Original Message-----
> | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Merijn
> | Verstraaten
> | Sent: 05 February 2015 14:46
> | To: ghc-devs at haskell.org; GHC users
> | Subject: Proposal: ValidateMonoLiterals - Initial bikeshed discussion
> |
> | I've been repeatedly running into problems with overloaded literals and
> | partial conversion functions, so I wrote up an initial proposal
> | (https://ghc.haskell.org/trac/ghc/wiki/ValidateMonoLiterals) and I'd like
> | to commence with the bikeshedding and hearing other opinions :)
> |
> | Cheers,
> | Merijn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20150206/d22ca874/attachment.sig>


More information about the Glasgow-haskell-users mailing list