Dear devs,
> Thank you very much for the response and kind explanation.
> After studying, I will submit to ghc-proposals :)
I submitted a ghc-proposal #76 [1].
Please feedback:)
[1]: https://github.com/ghc-proposals/ghc-proposals/pull/76
Regards,
Takenobu
2017-09-26 23:05 GMT+09:00 Takenobu
Dear all,
Thank you very much for the response and kind explanation.
After studying, I will submit to ghc-proposals :)
Regards,
Takenobu
2017-09-26 22:56 GMT+09:00 Merijn Verstraaten :
> I, too, have wished for the ability to have a separator in large number
>
I, too, have wished for the ability to have a separator in large number
literals.
So a strong +1 from me.
Cheers,
Merijn
> On 26 Sep 2017, at 15:43, Ben Gamari wrote:
>
> Takenobu Tani writes:
>
>> Hi Rahul,
>>
>> Thanks for the explanation.
Takenobu Tani writes:
> Hi Rahul,
>
> Thanks for the explanation.
> Hmm, Is not there much need...
>
> Thank you code example.
> I will also look at lexer for my study [1].
>
If you do want to try pursuing a language change do feel free to submit
a proposal [1]. I would
I'd find that quite useful for hex and binary.
It's useful for distinguishing e.g. 0x and 0xfff which when
confused accidentally and lead to big bugs.
Rust has exactly this feature for all numeric literals:
https://rustbyexample.com/primitives/literals.html
On 26/09/17 14:40,
Hi,
I for one, would like to have this in more than just BinaryLiterals (which I
find rather useful as well!)
I’d like to see `_` in any numeric literal being simply ignored, as I find it
makes writing and reading
numbers in source code much easier.
let i = 1_000_000 :: Int
f =
Hi Rahul,
Thanks for the explanation.
Hmm, Is not there much need...
Thank you code example.
I will also look at lexer for my study [1].
[1]: https://phabricator.haskell.org/D22
Thank you :) ,
Takenobu
2017-09-26 21:58 GMT+09:00 Rahul Muttineni :
> Implementation-wise,
Implementation-wise, it's no so difficult to include - the lexer needs to
be tweaked. But it seems like a specialised use-case that will only affect
a minority of users is probably not worthwhile as an extension to the
language/compiler.
Maybe you can try using OverloadedStrings and implement
Dear devs,
GHC's BinaryLiterals extension is useful.
(For example, x = 0b110111000101)
Is it difficult to include underscore(_) in the format like Verilog-HDL[1] ?
(For example, x = 0b1101_1100_0101)
[1]:
https://inst.eecs.berkeley.edu/~cs150/fa06/Labs/verilog-ieee.pdf#page=20
Regards,