Closed ocharles closed 2 years ago
OverloadedDot
is not a valid extension (see this list); Ormolu prints this exception:
The GHC parser (in Haddock mode) failed:
Unsupported extension: OverloadedDot
You probably mean OverloadedRecordDot
, so the snippet
{-# language OverloadedRecordDot #-}
test = hello.world
is formatted to
{-# LANGUAGE OverloadedRecordDot #-}
test = hello.world
as expected.
Does that resolve your question?
Sorry, I meant OverloadedRecordDot
. I must be on an old version... let me do a bit more testing. Thank for the polite fast response, and sorry I haven't really done enough diligence in reporting this!
Ok, I found the problem - on our master
branch we use record-dot-preprocessor
, and I have a branch that ports all this to OverloadedRecordDot
. I accidentally did this testing on master
(and obviously Ormolu struggles because it has no idea that there's a preprocessor) - on the actual OverloadedRecordDot
branch all is good. Thanks again for the prompt reply, and sorry for wasting your time!
No worries, there actually was some support for record-dot-preprocessor
in Ormolu in the past, but we removed it when OverloadedRecordDot
got into GHC.
Describe the bug Ormolu doesn't understand the significant of
OverloadedDot
and changesfoo.bar
intofoo . bar
, which changes the AST.To Reproduce
Try and format
Expected behavior The semantics of
OverloadedDot
are respected, sohello.world
remains unchanged.Environment
Additional context No extra info.