Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,863
    • Issues 4,863
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18158
Closed
Open
Created May 07, 2020 by Oleg Grenrus@phadejDeveloper

Lexer is confused by suzhou numeral

main :: IO ()
main =
  let 〥 = 5 in print 〥

fails to compile with


suzhou.hs:3:7: error: lexical error at character ' '
  |
3 |   let 〥 = 5 in print 〥
  |       ^

suzhou.hs

#4373 (closed) might be related.

The below doesn't work either:

main :: IO ()
main =
  let ₂ = 2 in print ₂ 
main :: IO ()
main =
  let x = ₂ in print x

Haskell2010 defines

digit → ascDigit | uniDigit

decimal → digit{digit} (Numeric literals)

This says that last example let x = ₂ in print x should be acccepted, yet the text says

Integer literals may be given in decimal (the default), ...

It feels that the grammar should be decimal → ascDigit{ascDigit} as uniDigit doesn't make sense in literals, yet non ascDigit digits could be IMO treated as "small letters".

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking