Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns synonyms removal from export list after formatting #367

Open
anpryl opened this issue Mar 13, 2022 · 0 comments
Open

Patterns synonyms removal from export list after formatting #367

anpryl opened this issue Mar 13, 2022 · 0 comments
Labels

Comments

@anpryl
Copy link

anpryl commented Mar 13, 2022

According to docs we can add pattern synonyms to export list, but brittany removes it.

Test file:

{-# LANGUAGE PatternSynonyms #-}

module Import.Audit.Category.SubjectScheme
  ( X (.., XA, XB, XC)
  )
where

data X
  = A String
  | B Int
  | C

pattern XA, XB, XC :: X
pattern XA = A "some_string"
pattern XB = B 3
pattern XC = C

Output:

{-# LANGUAGE PatternSynonyms #-}

module Import.Audit.Category.SubjectScheme
  ( X(..)
  ) where

data X
  = A String
  | B Int
  | C

pattern XA, XB, XC :: X
pattern XA = A "some_string"
pattern XB = B 3
pattern XC = C

brittany.yaml

conf_disable_formatting: false
conf_forward:
  options_ghc:
  - -XPatternSynonyms
  - -XLambdaCase
  - -XMultiWayIf
  - -XGADTs
  - -XPatternGuards
  - -XViewPatterns
  - -XRecursiveDo
  - -XTupleSections
  - -XExplicitForAll
  - -XImplicitParams
  - -XQuasiQuotes
  - -XTemplateHaskell
  - -XBangPatterns
  - -XTypeApplications
conf_obfuscate: false
conf_layout:
  lconfig_reformatModulePreamble: true
  lconfig_altChooser:
    contents: 3
    tag: AltChooserBoundedSearch
  lconfig_allowSingleLineExportList: false
  lconfig_hangingTypeSignature: false
  lconfig_allowHangingQuasiQuotes: true
  lconfig_indentListSpecial: true
  lconfig_alignmentBreakOnMultiline: true
  lconfig_experimentalSemicolonNewlines: false
  lconfig_cols: 80
  lconfig_columnAlignMode:
    contents: 0.7
    tag: ColumnAlignModeMajority
  lconfig_importColumn: 50
  lconfig_importAsColumn: 50
  lconfig_alignmentLimit: 30
  lconfig_indentAmount: 2
  lconfig_indentPolicy: IndentPolicyFree
  lconfig_indentWhereSpecial: true
conf_debug:
  dconf_dump_bridoc_simpl_par: false
  dconf_dump_config: false
  dconf_dump_bridoc_raw: false
  dconf_dump_bridoc_simpl_floating: false
  dconf_dump_bridoc_simpl_alt: false
  dconf_dump_bridoc_simpl_indent: false
  dconf_dump_annotations: false
  dconf_dump_bridoc_simpl_columns: false
  dconf_dump_ast_full: false
  dconf_roundtrip_exactprint_only: false
  dconf_dump_ast_unknown: false
  dconf_dump_bridoc_final: false
conf_errorHandling:
  econf_ExactPrintFallback: ExactPrintFallbackModeInline
  econf_Werror: false
  econf_omit_output_valid_check: false
  econf_produceOutputOnErrors: false
conf_preprocessor:
  ppconf_CPPMode: CPPModeAbort
  ppconf_hackAroundIncludes: false
conf_roundtrip_exactprint_only: false
conf_version: 1
@tfausak tfausak added the bug label Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants