I have not dug into the details, but the general direction of this proposal looks fine to me.

 

Simion

 

From: ghc-steering-committee [mailto:ghc-steering-committee-bounces@haskell.org] On Behalf Of Iavor Diatchki
Sent: 01 November 2017 22:52
To: Christopher Allen <cma@bitemyapp.com>
Cc: ghc-steering-committee@haskell.org; Joachim Breitner <mail@joachim-breitner.de>
Subject: Re: [ghc-steering-committee] Underscores in numbers proposal

 

I am fine with this.  Related to our recent discussion: we should probably require that this be protected by a language extension, like all other literal notations.  Perhaps `UnderscoreLiterals`?

 

-Iavor

 

PS:  technically, this is not backward compatible :-)  Here is an example:

 

    instance Num b => Num (a -> b) where

      fromInteger = const . fromInteger

 

    test :: Integer

    test = 1_1

      where _1 = 2

 

Currently this evaluates to 1, but with the extension it will evaluate to 11.  I don't think that any real code would be affected by this, I just had a bit of fun writing it.

 

 

 

 

 

On Wed, Nov 1, 2017 at 2:33 PM Christopher Allen <cma@bitemyapp.com> wrote:

https://github.com/ghc-proposals/ghc-proposals/pull/76#issuecomment-339952996

This appears to have near universal approval. It's certainly a feature
I've been grateful for when writing Rust code. I wasn't able to find a
thread about this proposal in my email archives, so I apologize if
this was redundant.

Could this be moved to a decision soon?

Thank you,
Chris Allen
_______________________________________________
ghc-steering-committee mailing list
ghc-steering-committee@haskell.org
https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee