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 this as a library?```newtype Binary = Binary Integerderiving Numinstance IsString Binary wherefromString binaryLiteral = error "Code here to parse binary literal with underscores"binaryVal :: BinarybinaryVal = "1101_1110_0101"```Hope that helps,RahulOn Tue, Sep 26, 2017 at 8:40 AM, Takenobu Tani <takenobu.hs@gmail.com> wrote:______________________________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,
Takenobu_________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
--Rahul Muttineni