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
{-# LANGUAGE EmptyDataDecls, TypeFamilies #-}
instanceFooBarwheredataBazBar
This source file can be parsed just fine, but attempting to exactPrint the resulting module throws an exception:
"{-# LANGUAGE EmptyDataDecls, TypeFamilies #-}\n\ninstance Foo Bar where\n data Baz Bar*** Exception: ExactP: InstDecl: InsGData is given too few srcInfoPoints
CallStack (from HasCallStack):
error, called at src/Language/Haskell/Exts/ExactPrint.hs:63:10 in haskell-src-exts-1.23.1-FvLIaTIGxmRVhU8jEdAAL:Language.Haskell.Exts.ExactPrint
It’s a bit suspicious that the parser produced an InsGData (instance GADT declaration) instead of an InsData, even without GADTs enabled. It appears from a cursory inspection of the source that the exact printing implementation for InsGData assumes that a where always needs to be printed, which is violated by the parser in this case but would make sense if an ambiguous empty data declaration is supposed to produce an InsData.
The text was updated successfully, but these errors were encountered:
This source file can be parsed just fine, but attempting to
exactPrint
the resulting module throws an exception:It’s a bit suspicious that the parser produced an
InsGData
(instance GADT declaration) instead of anInsData
, even withoutGADTs
enabled. It appears from a cursory inspection of the source that the exact printing implementation forInsGData
assumes that awhere
always needs to be printed, which is violated by the parser in this case but would make sense if an ambiguous empty data declaration is supposed to produce anInsData
.The text was updated successfully, but these errors were encountered: