@@ -206,7 +206,7 @@ type alias ModuleContext =
206
206
, constructorsToIgnore : List ( Set ( ModuleNameAsString , ConstructorName ))
207
207
, wasUsedInLocationThatNeedsItself : Set ( ModuleNameAsString , ConstructorName )
208
208
, wasUsedInComparisons : Set ( ModuleNameAsString , ConstructorName )
209
- , fixesForRemovingConstructor : Dict ConstructorName ( Dict ModuleNameAsString ( List Fix ))
209
+ , fixesForRemovingConstructor : Dict ( ModuleNameAsString , ConstructorName ) ( Dict ModuleNameAsString ( List Fix ))
210
210
, ignoredComparisonRanges : List Range
211
211
}
212
212
@@ -322,12 +322,7 @@ fromModuleToProject =
322
322
untouched
323
323
)
324
324
moduleContext. wasUsedInComparisons
325
- , fixesForRemovingConstructor =
326
- mapDictKeys
327
- ( \ constructorName ->
328
- ( moduleNameAsString, constructorName )
329
- )
330
- moduleContext. fixesForRemovingConstructor
325
+ , fixesForRemovingConstructor = moduleContext. fixesForRemovingConstructor
331
326
}
332
327
)
333
328
|> Rule . withModuleKey
@@ -669,12 +664,12 @@ expressionVisitor node moduleContext =
669
664
else
670
665
" True"
671
666
672
- fixes : Dict ConstructorName ( Dict ModuleNameAsString ( List Fix ))
667
+ fixes : Dict ( ModuleNameAsString , ConstructorName ) ( Dict ModuleNameAsString ( List Fix ))
673
668
fixes =
674
669
Set . foldl
675
- ( \ ( moduleName, constructor ) dict ->
670
+ ( \ (( moduleName, _ ) as key ) dict ->
676
671
Dict . update
677
- constructor
672
+ key
678
673
( \ existingValues ->
679
674
updateToAdd
680
675
moduleName
@@ -718,15 +713,15 @@ expressionVisitor node moduleContext =
718
713
else
719
714
" always " ++ replacementBoolean
720
715
721
- fixes : Dict ConstructorName ( Dict ModuleNameAsString ( List Fix ))
716
+ fixes : Dict ( ModuleNameAsString , ConstructorName ) ( Dict ModuleNameAsString ( List Fix ))
722
717
fixes =
723
718
Set . foldl
724
- ( \ ( _ , constructor ) dict ->
719
+ ( \ (( moduleName , _ ) as key ) dict ->
725
720
Dict . update
726
- constructor
721
+ key
727
722
( \ existingValues ->
728
723
updateToAdd
729
- moduleContext . currentModuleName
724
+ moduleName
730
725
( Fix . replaceRangeBy ( Node . range node) replacement)
731
726
( Maybe . withDefault Dict . empty existingValues)
732
727
|> Just
@@ -774,10 +769,10 @@ caseBranchEnterVisitor caseExpression ( casePattern, body ) moduleContext =
774
769
constructors =
775
770
constructorsInPattern moduleContext. lookupTable [ casePattern ] Set . empty
776
771
777
- fixes : Dict ConstructorName ( Dict ModuleNameAsString ( List Fix ))
772
+ fixes : Dict ( ModuleNameAsString , ConstructorName ) ( Dict ModuleNameAsString ( List Fix ))
778
773
fixes =
779
774
Set . foldl
780
- ( \ ( moduleName, constructorName ) acc ->
775
+ ( \ (( moduleName, _ ) as key ) acc ->
781
776
let
782
777
fix : Fix
783
778
fix =
@@ -787,10 +782,10 @@ caseBranchEnterVisitor caseExpression ( casePattern, body ) moduleContext =
787
782
}
788
783
in
789
784
Dict . update
790
- constructorName
785
+ key
791
786
( \ existingValues ->
792
787
updateToAdd
793
- moduleContext . currentModuleName
788
+ moduleName
794
789
fix
795
790
( Maybe . withDefault Dict . empty existingValues)
796
791
|> Just
0 commit comments