GHC 9.0.1: hxt does not compile due to strictness being misinterpreted as a type operator?
danwdart opened this issue · comments
Dan Dart commented
src/Text/XML/HXT/DOM/QualifiedName.hs:113:49: error:
Operator applied to too few arguments: !
|
113 | data XName = XN { _idXN :: ! Int -- for optimization of equality test, see Eq instance
src/Text/XML/HXT/Parser/XmlCharParser.hs:52:31: error:
Operator applied to too few arguments: !
|
52 | { xps_normalizeNewline :: ! Bool
Dan Dart commented
As a workaround, the following nix derivation override appears to allow compilation:
{
hxt = (self.callHackage "hxt" "9.3.1.21" {}).overrideDerivation(self: {
prePatch = ''
sed -i 's/:: ! /:: !/g' src/Text/XML/HXT/DOM/QualifiedName.hs
sed -zi 's/initialXNames@\n \[/initialXNames@[/' src/Text/XML/HXT/DOM/QualifiedName.hs
sed -zi 's/initialQNames@\n \[/initialQNames@[/' src/Text/XML/HXT/DOM/QualifiedName.hs
sed -i 's/:: ! /:: !/g' src/Text/XML/HXT/Parser/XmlCharParser.hs
sed -i 's/:: ! /:: !/g' src/Text/XML/HXT/Arrow/XmlState/TypeDefs.hs
'';
});
}
Uwe Schmidt commented
fixed, hxt-9.3.1.22.tar.gz is on hackage
Dan Dart commented
awesome, thanks!