Skip to content

Commit

Permalink
Fix #725
Browse files Browse the repository at this point in the history
  • Loading branch information
paf31 committed Nov 24, 2014
1 parent 2a95e77 commit b70e56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Language/PureScript/CodeGen/Externs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ moduleToPs (Module moduleName ds (Just exts)) env = intercalate "\n" . execWrite

exportToPs (TypeInstanceRef ident) = do
let TypeClassDictionaryInScope { tcdClassName = className, tcdInstanceTypes = tys, tcdDependencies = deps} =
fromMaybe (error $ "Type class instance has no dictionary in exportToPs") . find ((== Qualified (Just moduleName) ident) . tcdName) $ M.elems $ typeClassDictionaries env
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
let constraintsText = case fromMaybe [] deps of
[] -> ""
cs -> "(" ++ intercalate ", " (map (\(pn, tys') -> show pn ++ " " ++ unwords (map prettyPrintTypeAtom tys')) cs) ++ ") => "
Expand Down

0 comments on commit b70e56c

Please sign in to comment.