<div dir="ltr"><div>Hi,</div><div><br></div>I have the following code that builds successfully with "stack build" under GHC 8.10.7 but fails to build under GHC 9.0.1:<div><br></div><div><a href="https://github.com/jchia/ip-bug">https://github.com/jchia/ip-bug</a><br></div><div><br></div><div>The compiler is switched by commenting/uncommenting the compiler line in stack.yaml.</div><div><br></div><div>GHC 9.0.1 gives me the error I paste at the end. Is this expected (maybe as part of "simplified subsumtion" in <a href="https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#compiler-changes">https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#compiler-changes</a>)? If so, how can the code be fixed? If not, is it a compiler bug?</div><div><br></div><div>(This problem came up while using gi-gtk-3.0.38, where implicit params are used a lot).</div><div><br></div><div>Josh</div><div><br></div><div>/home/jchia/gh/ip-bug/src/Lib.hs:10:28: error:<br>    • Couldn't match type ‘(?self::Int) => Char’ with ‘Char’<br>      Expected: Int -> Char -> Char<br>        Actual: Int -> ((?self::Int) => Char) -> Char<br>    • In the expression: foo<br>      In the expression: (let ?self = x in foo) :: Int -> Char -> Char<br>      In the expression:<br>        ((let ?self = x in foo) :: Int -> Char -> Char) x<br>   |<br>10 | bar x = ((let ?self = x in foo) :: Int -> Char -> Char) x<br>   |                            ^^^<br><br>/home/jchia/gh/ip-bug/src/Lib.hs:13:26: error:<br>    • Couldn't match type ‘(?self::Int) => Char’ with ‘Char’<br>      Expected: Char -> Char<br>        Actual: ((?self::Int) => Char) -> Char<br>    • In the expression: foo x<br>      In the expression: let ?self = x in foo x<br>      In an equation for ‘baz’: baz x = let ?self = x in foo x<br>   |<br>13 | baz x = let ?self = x in foo x<br>   |                          ^^^^^<br></div></div>