Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project.release
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import: cabal.project
executable-static: True
executable-stripping: True
index-state: hackage.haskell.org 2026-06-15T00:00:00Z
index-state: hackage.haskell.org 2026-08-20T00:00:00Z

package *
ghc-options:
Expand Down
18 changes: 11 additions & 7 deletions jbeam-edit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ flag dump-ast
default: False
manual: True

flag modern-containers
description: Require containers 0.8
manual: True

flag transformation
description: Enable transformation (experimental)
default: False
Expand Down Expand Up @@ -107,7 +111,7 @@ library
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -154,7 +158,7 @@ library jbeam-edit-transformation
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -202,7 +206,7 @@ executable jbeam-edit
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -240,7 +244,7 @@ executable jbeam-edit-dump-ast
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -296,7 +300,7 @@ test-suite jbeam-edit-test
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -341,7 +345,7 @@ test-suite jbeam-edit-transformation-test
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down Expand Up @@ -385,7 +389,7 @@ benchmark jbeam-edit-bench
text >=2.1.2,
vector >=0.13

if (!flag(transformation) && !flag(dump-ast))
if flag(modern-containers)
build-depends: containers >=0.8

if os(windows)
Expand Down
6 changes: 5 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ghc-options:
- -Wredundant-constraints

when:
- condition: '! flag(transformation) && ! flag(dump-ast)'
- condition: flag(modern-containers)
dependencies: [containers >= 0.8]
- condition: os(windows)
ghc-options: -optc-Os -optl-static
Expand All @@ -74,6 +74,10 @@ flags:
description: Use executable-relative example paths (for Windows release builds)
default: false
manual: true
modern-containers:
description: Require containers 0.8
manual: true
default: true

internal-libraries:
jbeam-edit-transformation:
Expand Down
2 changes: 1 addition & 1 deletion src/JbeamEdit/Formatting/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ sameBy matchMode f = go
in res && go ps bs
go ps bs = Seq.null ps && (Seq.null bs || PrefixMatch == matchMode)

-- TODO: when possible upgrade to containers 0.8 and migrate to M.filterKeys
-- TODO: migrate to M.filterKeys once the stack snapshot ships containers 0.8
findPropertiesForCursor :: MatchMode -> NC.NodeCursor -> RuleSet -> Rule
findPropertiesForCursor matchMode cursor (RuleSet rs) =
fold (M.filterWithKey (const . compareCursorAndPattern matchMode cursor) rs)
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ flags:
transformation: false
dump-ast: false
windows-example-paths: false
modern-containers: false

ghc-options:
jbeam-edit: "-Werror -Wwarn=unused-imports"
Loading