Skip to content
GitLab
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 5,253
    • Issues 5,253
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 562
    • Merge requests 562
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1744
Closed
Open
Issue created Sep 27, 2007 by Ian Lynagh <igloo@earth.li>@trac-igloo

treat byte order mark as zero-width whitespace

The U+FEFF ZERO WIDTH NO-BREAK SPACE Unicode character, better known as BYTE ORDER MARK (BOM), currently gives a lexical error:

$ printf '\xEF\xBB\xBF\nz = "str"\n' > z.hs
$ ghci z.hs
GHCi, version 6.8.0.20070927: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.

z.hs:1:0: lexical error at character '\65279'
Failed, modules loaded: none.
Prelude> Leaving GHCi.

The character is only in categories Other and Format, not Space, but I think we should lex it as whitespace anyway (with zero width for the purposes of the layout rule). Ideally Haskell' would do likewise.

Trac metadata
Trac field Value
Version 6.8
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking