@@ -12,9 +12,13 @@ import qualified SrcLoc as GHC
13-- | Ormolu configuration.
13-- | Ormolu configuration.
15−newtype Config = Config
15+data Config = Config
16 { cfgDynOptions :: [DynOption]
16 { cfgDynOptions :: [DynOption]
17 -- ^ Dynamic options to pass to GHC parser
17 -- ^ 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.
18 } deriving (Eq, Show)
22 } deriving (Eq, Show)
20-- | Default 'Config'.
24-- | Default 'Config'.
@@ -22,6 +26,7 @@ newtype Config = Config
22defaultConfig :: Config
26defaultConfig :: Config
23defaultConfig = Config
27defaultConfig = Config
24 { cfgDynOptions = []
28 { cfgDynOptions = []
29+ , cfgSanityCheck = True
27-- | A wrapper for dynamic options.
32-- | A wrapper for dynamic options.