UweSchmidt / hxt

Haskell XML Toolbox

Home Page:http://www.fh-wedel.de/~si/HXmlToolbox/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GHC 9.0.1: hxt does not compile due to strictness being misinterpreted as a type operator?

danwdart opened this issue · comments

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

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
    '';
});
}

fixed, hxt-9.3.1.22.tar.gz is on hackage

awesome, thanks!