thyme
thyme copied to clipboard
Parse error when building module on FreeBSD
When building thyme on FreeBSD using stack, I get the following error:
Configuring thyme-0.3.5.5...
Building thyme-0.3.5.5...
Preprocessing library thyme-0.3.5.5...
[ 1 of 20] Compiling Data.Thyme.Format.Internal ( src/Data/Thyme/Format/Internal.hs, .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Data/Thyme/Format/Internal.o )
[ 2 of 20] Compiling Data.Thyme.Internal.Micro ( src/Data/Thyme/Internal/Micro.hs, .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Data/Thyme/Internal/Micro.o )
[ 3 of 20] Compiling Control.Lens ( lens/Control/Lens.hs, .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Control/Lens.o )
[ 4 of 20] Compiling Data.Thyme.Calendar.Internal ( src/Data/Thyme/Calendar/Internal.hs, .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Data/Thyme/Calendar/Internal.o )
src/Data/Thyme/Calendar/Internal.hs:21:1: warning: [-Wunused-imports]
The import of `Control.Applicative' is redundant
except perhaps to import instances from `Control.Applicative'
To import instances alone, use: import Control.Applicative()
[ 5 of 20] Compiling Data.Thyme.Calendar.MonthDay ( src/Data/Thyme/Calendar/MonthDay.hs, .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Data/Thyme/Calendar/MonthDay.o )
src/Data/Thyme/Calendar/MonthDay.hs:17:12: error:
parse error on input `_'
Platform details:
FreeBSD 11.1-RELEASE amd64 GENERIC
I can confirm the same error on FreeBSD 12.1-RELEASE r354233 GENERIC amd64
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
The CPP macros are not being applied correctly and you end up with that underscore error. Could you try on FreeBSD with https://github.com/fumieval/thyme/pull/2 I don't have access to a FreeBSD machine right now but I believe it should fix the issue.