brittany-0.9.0.1: Haskell source code formatter

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Brittany.Internal.Config

Synopsis

Documentation

data CConfig f Source #

Instances

CZipWith CConfig Source # 

Methods

cZipWith :: (forall a. g a -> h a -> i a) -> CConfig g -> CConfig h -> CConfig i #

Data (CConfig Identity) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CConfig Identity -> c (CConfig Identity) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CConfig Identity) #

toConstr :: CConfig Identity -> Constr #

dataTypeOf :: CConfig Identity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (CConfig Identity)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CConfig Identity)) #

gmapT :: (forall b. Data b => b -> b) -> CConfig Identity -> CConfig Identity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CConfig Identity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CConfig Identity -> r #

gmapQ :: (forall d. Data d => d -> u) -> CConfig Identity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CConfig Identity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CConfig Identity -> m (CConfig Identity) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CConfig Identity -> m (CConfig Identity) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CConfig Identity -> m (CConfig Identity) #

Show (CConfig Option) Source # 
Show (CConfig Identity) Source # 
Generic (CConfig f) Source # 

Associated Types

type Rep (CConfig f) :: * -> * #

Methods

from :: CConfig f -> Rep (CConfig f) x #

to :: Rep (CConfig f) x -> CConfig f #

Semigroup (CConfig Option) Source # 
Semigroup (CConfig Identity) Source # 
Monoid (CConfig Option) Source # 
type Rep (CConfig f) Source # 

data CDebugConfig f Source #

Instances

CZipWith CDebugConfig Source # 

Methods

cZipWith :: (forall a. g a -> h a -> i a) -> CDebugConfig g -> CDebugConfig h -> CDebugConfig i #

Data (CDebugConfig Identity) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDebugConfig Identity -> c (CDebugConfig Identity) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CDebugConfig Identity) #

toConstr :: CDebugConfig Identity -> Constr #

dataTypeOf :: CDebugConfig Identity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (CDebugConfig Identity)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CDebugConfig Identity)) #

gmapT :: (forall b. Data b => b -> b) -> CDebugConfig Identity -> CDebugConfig Identity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDebugConfig Identity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDebugConfig Identity -> r #

gmapQ :: (forall d. Data d => d -> u) -> CDebugConfig Identity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDebugConfig Identity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDebugConfig Identity -> m (CDebugConfig Identity) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDebugConfig Identity -> m (CDebugConfig Identity) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDebugConfig Identity -> m (CDebugConfig Identity) #

Show (CDebugConfig Option) Source # 
Show (CDebugConfig Identity) Source # 
Generic (CDebugConfig f) Source # 

Associated Types

type Rep (CDebugConfig f) :: * -> * #

Methods

from :: CDebugConfig f -> Rep (CDebugConfig f) x #

to :: Rep (CDebugConfig f) x -> CDebugConfig f #

Semigroup (CDebugConfig Option) Source # 
Semigroup (CDebugConfig Identity) Source # 
Monoid (CDebugConfig Option) Source # 
type Rep (CDebugConfig f) Source # 
type Rep (CDebugConfig f) = D1 * (MetaData "CDebugConfig" "Language.Haskell.Brittany.Internal.Config.Types" "brittany-0.9.0.1-LQfkzb1o8NR2qnt27g7r0g" False) (C1 * (MetaCons "DebugConfig" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_config") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_annotations") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_dconf_dump_ast_unknown") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_ast_full") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_raw") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_simpl_alt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool))))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_simpl_floating") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_simpl_par") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_simpl_columns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_simpl_indent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dconf_dump_bridoc_final") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_dconf_roundtrip_exactprint_only") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))))))))

data CLayoutConfig f Source #

Instances

CZipWith CLayoutConfig Source # 

Methods

cZipWith :: (forall a. g a -> h a -> i a) -> CLayoutConfig g -> CLayoutConfig h -> CLayoutConfig i #

Data (CLayoutConfig Identity) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CLayoutConfig Identity -> c (CLayoutConfig Identity) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CLayoutConfig Identity) #

toConstr :: CLayoutConfig Identity -> Constr #

dataTypeOf :: CLayoutConfig Identity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (CLayoutConfig Identity)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CLayoutConfig Identity)) #

gmapT :: (forall b. Data b => b -> b) -> CLayoutConfig Identity -> CLayoutConfig Identity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CLayoutConfig Identity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CLayoutConfig Identity -> r #

gmapQ :: (forall d. Data d => d -> u) -> CLayoutConfig Identity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CLayoutConfig Identity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CLayoutConfig Identity -> m (CLayoutConfig Identity) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CLayoutConfig Identity -> m (CLayoutConfig Identity) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CLayoutConfig Identity -> m (CLayoutConfig Identity) #

Show (CLayoutConfig Option) Source # 
Show (CLayoutConfig Identity) Source # 
Generic (CLayoutConfig f) Source # 

Associated Types

type Rep (CLayoutConfig f) :: * -> * #

Semigroup (CLayoutConfig Option) Source # 
Semigroup (CLayoutConfig Identity) Source # 
Monoid (CLayoutConfig Option) Source # 
type Rep (CLayoutConfig f) Source # 
type Rep (CLayoutConfig f) = D1 * (MetaData "CLayoutConfig" "Language.Haskell.Brittany.Internal.Config.Types" "brittany-0.9.0.1-LQfkzb1o8NR2qnt27g7r0g" False) (C1 * (MetaCons "LayoutConfig" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_cols") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Int)))) (S1 * (MetaSel (Just Symbol "_lconfig_indentPolicy") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last IndentPolicy))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_indentAmount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Int)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_indentWhereSpecial") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_lconfig_indentListSpecial") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool))))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_importColumn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Int)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_altChooser") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last AltChooser)))) (S1 * (MetaSel (Just Symbol "_lconfig_columnAlignMode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last ColumnAlignMode)))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_alignmentLimit") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Int)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_lconfig_alignmentBreakOnMultiline") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))) (S1 * (MetaSel (Just Symbol "_lconfig_hangingTypeSignature") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (f (Last Bool)))))))))

readConfig :: MonadIO m => FilePath -> MaybeT m (Maybe (CConfig Option)) Source #

Reads a config from a file. If the file does not exist, returns Nothing. If the file exists and parsing fails, prints to stderr and aborts the MaybeT. Otherwise succeed via Just. If the second parameter is True and the file does not exist, writes the staticDefaultConfig to the file.