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

MultiWayIf receives context-sensitive alignment despite configuration #339

Open
pbrisbin opened this issue Feb 5, 2021 · 0 comments
Open

Comments

@pbrisbin
Copy link

pbrisbin commented Feb 5, 2021

We make use of configuration to ensure things don't get aligned in context-aware ways, to avoid diff noise:

Configuration
---
conf_debug:
  dconf_roundtrip_exactprint_only: false
  dconf_dump_bridoc_simpl_par: false
  dconf_dump_ast_unknown: false
  dconf_dump_bridoc_simpl_floating: false
  dconf_dump_config: false
  dconf_dump_bridoc_raw: false
  dconf_dump_bridoc_final: 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
conf_forward:
  options_ghc:
    - -XBangPatterns
    - -XDataKinds
    - -XDeriveAnyClass
    - -XDeriveFoldable
    - -XDeriveFunctor
    - -XDeriveGeneric
    - -XDeriveLift
    - -XDeriveTraversable
    - -XDerivingStrategies
    - -XFlexibleContexts
    - -XFlexibleInstances
    - -XGADTs
    - -XGeneralizedNewtypeDeriving
    - -XLambdaCase
    - -XMultiParamTypeClasses
    - -XNoImplicitPrelude
    - -XNoMonomorphismRestriction
    - -XOverloadedStrings
    - -XRankNTypes
    - -XRecordWildCards
    - -XScopedTypeVariables
    - -XStandaloneDeriving
    - -XTypeApplications
    - -XTypeFamilies
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_obfuscate: false
conf_roundtrip_exactprint_only: false
conf_version: 1
conf_layout:
  lconfig_reformatModulePreamble: true
  lconfig_altChooser:
    tag: AltChooserBoundedSearch
    contents: 3
  lconfig_allowSingleLineExportList: false
  lconfig_importColumn: 60
  lconfig_hangingTypeSignature: false
  lconfig_importAsColumn: 50
  lconfig_alignmentLimit: 1
  lconfig_indentListSpecial: true
  lconfig_indentAmount: 2
  lconfig_alignmentBreakOnMultiline: true
  lconfig_cols: 80
  lconfig_indentPolicy: IndentPolicyLeft
  lconfig_indentWhereSpecial: true
  lconfig_columnAlignMode:
    tag: ColumnAlignModeDisabled
    contents: 0.7

But that doesn't seem to be respected with MultiWayIf:

Given:

example :: A -> B
example = if
  | this > that -> True
  | othrewise -> False

Expected: no changes

Actual:

example :: A -> B
example = if
  | this > that -> True
  | othrewise   -> False
% stack exec brittany -- --version
brittany version 0.13.1.0
Copyright (C) 2016-2019 Lennart Spitzner
Copyright (C) 2019 PRODA LTD
There is NO WARRANTY, to the extent permitted by law.
@pbrisbin pbrisbin changed the title MutliWayIf receives context-sensitive alignment MultiWayIf receives context-sensitive alignment despite configuration Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants