test :: Foo -> String
test x = case x of
Foo @t -> show @t 0
ormolu: not implemented yet: Unexpected types in constructor pattern
CallStack (from HasCallStack):
error, called at src/Ormolu/Utils.hs:59:22 in ormolu-0.5.0.1-FGBbqTWWbSFEfa5RaRk6qU:Ormolu.Utils
Describe the bug
Type applications in patterns are new in GHC 9.2, but unsupported in Ormolu.
Expected behavior We should support this, see https://github.com/tweag/ormolu/blob/8aef990d6c5d3715834de1cbc9a708691c53c6d9/src/Ormolu/Printer/Meat/Declaration/Value.hs#L1041
Environment
Additional context Thanks to @googleson78 for bringing this to my attention!