@@ -665,11 +665,11 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
665
665
usageParamMigrationFns :: [Text ]
666
666
usageParamMigrationFns = usageParamMigrations & fmap migrationFn
667
667
668
- tvarsNew :: [N. Name ]
669
- tvarsNew = tvarMapNew & fmap fst
668
+ tvarsNew :: [Text ]
669
+ tvarsNew = tvarMapNew & fmap ( N. toText . fst )
670
670
671
- tvarsOld :: [N. Name ]
672
- tvarsOld = tvarMapOldReplaced & fmap fst
671
+ tvarsOld :: [Text ]
672
+ tvarsOld = tvarMapOldReplaced & fmap ( N. toText . fst )
673
673
674
674
(MigrationNested migrationAliasedType imps subDefs) =
675
675
let
@@ -685,19 +685,17 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
685
685
migrationName :: Text
686
686
migrationName = migrationNameUnderscored newModule oldVersion newVersion typeNameNew
687
687
688
- paramMigrationPairs :: [(N. Name , N. Name )]
689
- paramMigrationPairs =
690
- zip tvarsOld tvarsNew
688
+ paramMigrationPairs = zip tvarsOld tvarsNew
691
689
692
690
paramMigrationFnsTypeSig :: [Text ]
693
691
paramMigrationFnsTypeSig =
694
692
paramMigrationPairs
695
- & fmap (\ (oldT, newT) -> T. concat [ " (" , N. toText oldT, " _old -> " , N. toText newT, " _new)" ] )
693
+ & fmap (\ (oldT, newT) -> T. concat [ " (" , oldT, " _old -> " , newT, " _new)" ] )
696
694
697
695
paramMigrationVars :: Text
698
696
paramMigrationVars =
699
697
paramMigrationPairs
700
- & fmap (\ (oldT, newT) -> T. concat [ " migrate_" , N. toText oldT ] )
698
+ & fmap (\ (oldT, newT) -> T. concat [ " migrate_" , oldT ] )
701
699
& T. intercalate " "
702
700
703
701
oldType = T. concat [moduleNameOld & dropCan & N. toText, " ." , typeNameOld & N. toText]
@@ -707,9 +705,9 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
707
705
migrationTypeSignature = T. concat
708
706
[ paramMigrationFnsTypeSig & T. intercalate " -> " & suffixIfNonempty " -> "
709
707
, " " , oldType , " "
710
- , tvarsOld & fmap (\ tvar -> T. concat [N. toText tvar, " _old" ]) & T. intercalate " "
708
+ , tvarsOld & fmap (\ tvar -> T. concat [tvar, " _old" ]) & T. intercalate " "
711
709
, " -> " , newType , " "
712
- , tvarsNew & fmap (\ tvar -> T. concat [N. toText tvar, " _new" ]) & T. intercalate " "
710
+ , tvarsNew & fmap (\ tvar -> T. concat [tvar, " _new" ]) & T. intercalate " "
713
711
]
714
712
715
713
applyOldValueIfNotRecord m =
0 commit comments