Skip to content

Commit 62ae179

Browse files
committed
Fixed import generation for type parameters
1 parent 173a083 commit 62ae179

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Language/PureScript/Bridge/Printer.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ typesToImportLines :: ImportLines -> [PSType] -> ImportLines
124124
typesToImportLines = foldr typeToImportLines
125125

126126
typeToImportLines :: PSType -> ImportLines -> ImportLines
127-
typeToImportLines t = if not (T.null (_typeModule t))
128-
then Map.alter (Just . updateLine) (_typeModule t)
129-
else id
127+
typeToImportLines t ls = typesToImportLines (update ls) (_typeParameters t)
130128
where
129+
update = if not (T.null (_typeModule t))
130+
then Map.alter (Just . updateLine) (_typeModule t)
131+
else id
132+
131133
updateLine Nothing = ImportLine (_typeModule t) (Set.singleton (_typeName t))
132134
updateLine (Just (ImportLine m types)) = ImportLine m $ Set.insert (_typeName t) types
133135

0 commit comments

Comments
 (0)