-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
What version of bat are you using?
$ bat --version
bat 0.15.3
$
Describe the bug you encountered:
Lines in Haskell source file highlighted incorrectly and inconsistently.
Describe what you expected to happen?
Lines 21 and 23 in the given file should be highlighted the same way.
Here's the file itself or your convenience:
data DayOfWeek = Mon | Tues | Wed | Thur | Fri | Sat | Sun deriving Show
data Date = Date DayOfWeek Int deriving Show
instance Eq DayOfWeek where
(==) Mon Mon = True
(==) Tues Tues = True
(==) Wed Wed = True
(==) Thur Thur = True
(==) Fri Fri = True
(==) Sat Sat = True
(==) Sun Sun = True
(==) _ _ = False
instance Eq Date where
(==) (Date weekday dayOfMonth) (Date weekday' dayOfMonth') =
weekday == weekday' && dayOfMonth == dayOfMonth'
main :: IO()
main = do
putStrLn "Data types test"
putStr "Wed 14 == Wed 14 ? "
print (Date Wed 14 == Date Wed 14)
putStr "Wed 14 == Tue 14 ? "
print (Date Wed 14 == Date Tues 14)How did you install bat?
$ cargo install batsystem
------
**$ uname -srm**
Darwin 19.4.0 x86_64
**$ sw_vers**
ProductName: Mac OS X
ProductVersion: 10.15.4
BuildVersion: 19E287
bat
---
**$ bat --version**
bat 0.15.3
**$ env**
bat_config
----------
bat_wrapper
-----------
No wrapper script for 'bat'.
bat_wrapper_function
--------------------
No wrapper function for 'bat'.
No wrapper function for 'cat'.
tool
----
**$ less --version**
less 487 (POSIX regular expressions)
