@@ -12,9 +12,13 @@ import qualified SrcLoc as GHC
1212
1313-- | Ormolu configuration.
1414
15−newtype Config = Config
15+data Config = Config
1616 { cfgDynOptions :: [DynOption]
1717 -- ^ Dynamic options to pass to GHC parser
18+ , cfgSanityCheck :: Bool
19+ -- ^ Whether to parse output of formatter and compare the obtained AST
20+ -- with original AST. Doing this makes the program much slower, but
21+ -- it'll catch and report all possible issues.
1822 } deriving (Eq, Show)
1923
2024-- | Default 'Config'.
@@ -22,6 +26,7 @@ newtype Config = Config
2226defaultConfig :: Config
2327defaultConfig = Config
2428 { cfgDynOptions = []
29+ , cfgSanityCheck = True
2530 }
2631
2732-- | A wrapper for dynamic options.