git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix #297
commit66cc54f0470fc869c1f9606748477c86fe3d276c authorPhil Freeman <paf31@cantab.net> dateSun 16 Mar 2014, 13:10 (13 years ago) parentb8fc0f0
1 file changed+1−1
src/Language/PureScript/CodeGen/Externs.hs+1−1
src/Language/PureScript/CodeGen/Externs.hs+1−1
@@ -57,7 +57,7 @@ moduleToPs (Module moduleName ds (Just exts)) env = intercalate "\n" . execWrite
5757 printDctor dctor = case dctor `lookup` tys of
5858 Nothing -> Nothing
5959 Just tyArgs -> Just $ show dctor ++ " " ++ unwords (map prettyPrintTypeAtom tyArgs)
60− tell ["data " ++ show pn ++ " " ++ unwords args ++ " = " ++ intercalate " | " (mapMaybe printDctor dctors')]
60+ tell ["data " ++ show pn ++ " " ++ unwords args ++ (if null dctors' then "" else " = " ++ intercalate " | " (mapMaybe printDctor dctors'))]
6161 Just (_, TypeSynonym) ->
6262 case Qualified (Just moduleName) pn `M.lookup` typeSynonyms env of
6363 Nothing -> error $ show pn ++ " has no type synonym info in exportToPs"