git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #726 from purescript/725
34a00a0Phil Freeman
src/Language/PureScript/CodeGen/Externs.hs+1−1
@@ -97,7 +97,7 @@ moduleToPs (Module moduleName ds (Just exts)) env = intercalate "\n" . execWrite
97
97
98 exportToPs (TypeInstanceRef ident) = do
98 exportToPs (TypeInstanceRef ident) = do
99 let TypeClassDictionaryInScope { tcdClassName = className, tcdInstanceTypes = tys, tcdDependencies = deps} =
99 let TypeClassDictionaryInScope { tcdClassName = className, tcdInstanceTypes = tys, tcdDependencies = deps} =
100− fromMaybe (error $ "Type class instance has no dictionary in exportToPs") . find ((== Qualified (Just moduleName) ident) . tcdName) $ M.elems $ typeClassDictionaries env
100+ fromMaybe (error $ "Type class instance has no dictionary in exportToPs") . find (\tcd -> tcdName tcd == Qualified (Just moduleName) ident && tcdType tcd == TCDRegular) $ M.elems $ typeClassDictionaries env
101 let constraintsText = case fromMaybe [] deps of
101 let constraintsText = case fromMaybe [] deps of
102 [] -> ""
102 [] -> ""
103 cs -> "(" ++ intercalate ", " (map (\(pn, tys') -> show pn ++ " " ++ unwords (map prettyPrintTypeAtom tys')) cs) ++ ") => "
103 cs -> "(" ++ intercalate ", " (map (\(pn, tys') -> show pn ++ " " ++ unwords (map prettyPrintTypeAtom tys')) cs) ++ ") => "