-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Haskell] Haskell highlighting: explicitly importing recursive datatype + constructor #3658
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingsyntax-highlightingupstream-errorA bug in an upstream componentA bug in an upstream component
Description
What steps will reproduce the bug?
Try to highlight the following Haskell code:
import Data.List.NonEmpty (NonEmpty ((:|)), last)What happens?
What did you expect to happen instead?
The :| constructor brings the parser to the wrong state, so last is not coloured as an imported identifier, like NonEmpty is. Rather, the keyword as is detected as a substring of it.
How did you install bat?
Alpine package
bat version and environment
Details
Software version
bat 0.26.1
Operating system
- OS: Linux (Alpine Linux 3.24.0_alpha20260127)
- Kernel: 6.18.20-0-lts
Command-line
bat --diagnostic test.hs Environment variables
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_PAGER=<not set>
BAT_PAGING=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
COLORTERM=truecolor
LANG=<not set>
LC_ALL=<not set>
LESS=<not set>
MANPAGER=<not set>
NO_COLOR=<not set>
PAGER=<not set>
SHELL=/usr/bin/fish
TERM=xterm-256color
XDG_CACHE_HOME=<not set>
XDG_CONFIG_HOME=/home/foxy/.configSystem Config file
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '/home/foxy/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '/home/foxy/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'/home/foxy/.cache/bat' not found
Compile time information
- Profile: release
- Target triple: x86_64-alpine-linux-musl
- Family: unix
- OS: linux
- Architecture: x86_64
- Pointer width: 64
- Endian: little
- CPU features: fxsr,sse,sse2
- Host: x86_64-alpine-linux-musl
Less version
> less --version
less 692 (POSIX regular expressions)
Copyright (C) 1984-2026 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsyntax-highlightingupstream-errorA bug in an upstream componentA bug in an upstream component