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
The following code parseWithComments and prettyPrints successfully, but fails to exactPrint:
exactPrintFails.hs (code to be parsed and printed):
{-# LANGUAGE TypeFamilies #-}
class HasFoo a where
type Foo a
getFoo :: a -> Foo a
what I tried:
$ ghci-9.0.2 -package haskell-src-exts-1.23.1
(snip)
ghci> :m Language.Haskell.Exts
ghci> contents <- readFile "exactPrintFails.hs"
ghci> let ParseOk (mod,comments) = parseWithComments defaultParseMode{extensions = [EnableExtension TypeFamilies]} contents :: ParseResult (Module SrcSpanInfo,[Comment])
ghci> prettyPrint mod
"{-# LANGUAGE TypeFamilies #-}\n\nclass HasFoo a where\n type Foo a\n \n getFoo :: a -> Foo a"
ghci> exactPrint mod comments
"{-# LANGUAGE TypeFamilies #-}\n\nclass HasFoo a where\n *** Exception: ExactP: ClassDecl: ClsTyFam 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-2620066d24fc7890d6763a729bbef1e1536104df804f5005d54558c967f02e70:Language.Haskell.Exts.ExactPrint
ghci>
Thank you.
The text was updated successfully, but these errors were encountered:
The following code parseWithComments and prettyPrints successfully, but fails to exactPrint:
exactPrintFails.hs (code to be parsed and printed):
what I tried:
Thank you.
The text was updated successfully, but these errors were encountered: