Skip to content

Commit 88479e4

Browse files
Reduce noise from diff
1 parent f2d4d43 commit 88479e4

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

extra/Lamdera/Evergreen/MigrationGenerator.hs

+9-11
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,11 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
665665
usageParamMigrationFns :: [Text]
666666
usageParamMigrationFns = usageParamMigrations & fmap migrationFn
667667

668-
tvarsNew :: [N.Name]
669-
tvarsNew = tvarMapNew & fmap fst
668+
tvarsNew :: [Text]
669+
tvarsNew = tvarMapNew & fmap (N.toText . fst)
670670

671-
tvarsOld :: [N.Name]
672-
tvarsOld = tvarMapOldReplaced & fmap fst
671+
tvarsOld :: [Text]
672+
tvarsOld = tvarMapOldReplaced & fmap (N.toText . fst)
673673

674674
(MigrationNested migrationAliasedType imps subDefs) =
675675
let
@@ -685,19 +685,17 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
685685
migrationName :: Text
686686
migrationName = migrationNameUnderscored newModule oldVersion newVersion typeNameNew
687687

688-
paramMigrationPairs :: [(N.Name, N.Name)]
689-
paramMigrationPairs =
690-
zip tvarsOld tvarsNew
688+
paramMigrationPairs = zip tvarsOld tvarsNew
691689

692690
paramMigrationFnsTypeSig :: [Text]
693691
paramMigrationFnsTypeSig =
694692
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)" ] )
696694

697695
paramMigrationVars :: Text
698696
paramMigrationVars =
699697
paramMigrationPairs
700-
& fmap (\(oldT, newT) -> T.concat [ "migrate_", N.toText oldT ] )
698+
& fmap (\(oldT, newT) -> T.concat [ "migrate_", oldT ] )
701699
& T.intercalate " "
702700

703701
oldType = T.concat [moduleNameOld & dropCan & N.toText, ".", typeNameOld & N.toText]
@@ -707,9 +705,9 @@ canAliasToMigration oldVersion newVersion scope interfaces recursionSet (typeNew
707705
migrationTypeSignature = T.concat
708706
[ paramMigrationFnsTypeSig & T.intercalate " -> " & suffixIfNonempty " -> "
709707
, " " , oldType , " "
710-
, tvarsOld & fmap (\tvar -> T.concat [N.toText tvar, "_old"]) & T.intercalate " "
708+
, tvarsOld & fmap (\tvar -> T.concat [tvar, "_old"]) & T.intercalate " "
711709
, " -> " , newType , " "
712-
, tvarsNew & fmap (\tvar -> T.concat [N.toText tvar, "_new"]) & T.intercalate " "
710+
, tvarsNew & fmap (\tvar -> T.concat [tvar, "_new"]) & T.intercalate " "
713711
]
714712

715713
applyOldValueIfNotRecord m =

0 commit comments

Comments
 (0)