git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #726 from purescript/725

Fix #725

commit34a00a0e7b4cda526f28f1316efef7e804159cd1 authorPhil Freeman <paf31@cantab.net> dateMon 24 Nov 2014, 08:21 (12 years ago) parent2a95e77b70e56c
1 file changed+1−1
src/Language/PureScript/CodeGen/Externs.hs+1−1
src/Language/PureScript/CodeGen/Externs.hs+1−1
@@ -97,7 +97,7 @@ moduleToPs (Module moduleName ds (Just exts)) env = intercalate "\n" . execWrite
9797
9898 exportToPs (TypeInstanceRef ident) = do
9999 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
101101 let constraintsText = case fromMaybe [] deps of
102102 [] -> ""
103103 cs -> "(" ++ intercalate ", " (map (\(pn, tys') -> show pn ++ " " ++ unwords (map prettyPrintTypeAtom tys')) cs) ++ ") => "