You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Language.Haskell.Extract, interacts with the LANG environment variable, leading to surprising failures. E.g. when compiling
{-# LANGUAGE UnicodeSyntax, TemplateHaskell #-}
moduleFoowhereimportLanguage.Haskell.Extractfoo∷α→α
foo x = x
bar =$(functionExtractor "oo$")
without any set LANG variable on Linux, you get a
Foo.hs:10:9:
Exception when trying to run compile-time code:
Foo.hs: hGetContents: invalid argument (invalid byte sequence)
Code: functionExtractor "oo$"
In the expression: $(functionExtractor "oo$")
In an equation for `bar': bar = $(functionExtractor "oo$")
This is caused by relying on System.IO.readFile to infer the text-encoding, instead of explicitly setting it to utf8.
Since GHC already enforces utf8 as source file encoding, Language.Haskell.Extract should follow GHC's behaviour (at least when compiled for GHC).
The text was updated successfully, but these errors were encountered:
Currently,
Language.Haskell.Extract
, interacts with theLANG
environment variable, leading to surprising failures. E.g. when compilingwithout any set
LANG
variable on Linux, you get aThis is caused by relying on
System.IO.readFile
to infer the text-encoding, instead of explicitly setting it toutf8
.Since GHC already enforces utf8 as source file encoding,
Language.Haskell.Extract
should follow GHC's behaviour (at least when compiled for GHC).The text was updated successfully, but these errors were encountered: