
Hello, I tried building Yhc recently (I'd like to use the javascript backend in a project) but I ran into the following error: src/compiler/Core/Convert.hs:133:50: Couldn't match expected type `String -> Warning' against inferred type `Map.Map Id Info' In the first argument of `toForeign', namely `syms' In the expression: toForeign syms memo cc Imported cname arity i In the definition of `forn': forn = toForeign syms memo cc Imported cname arity i scons: *** [src/compiler/Core/Convert.o] Error 1 I got things working by applying the following small patch: { hunk ./Core/Convert.hs 133 - forn = toForeign syms memo cc Imported cname arity i + forn = toForeign FFIWarn syms memo cc Imported cname arity i } although I don't know whether that matches the intent of adding the (String -> Warning) argument. I had to make an even smaller patch to get the javascript translator to build: { hunk ./src/translator/js/Makefile 200 - $(GHC) --make -package base -package network -package hxt -package filepath $< -o $@ + $(GHC) --make -package base -package network -package hxt-7.5 -package filepath $< -o $@ } The user's guide on the wiki also needs some minor tweaks to be up to date with the current version of Yhc. I'll probably make them tonight or tomorrow. Now that I have haskell running in the browser, it's very cool! Regards, Reid Barton

Reid Barton
src/compiler/Core/Convert.hs:133:50: Couldn't match expected type `String -> Warning' against inferred type `Map.Map Id Info' In the first argument of `toForeign', namely `syms' In the expression: toForeign syms memo cc Imported cname arity i In the definition of `forn': forn = toForeign syms memo cc Imported cname arity i
Thanks for the patch. Now applied. (It was my fault - after introducing optionality to warning-generation for FFI code in nhc98, I neglected to check whether there was anywhere in yhc that would be affected.) Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Reid Barton