faylang/fay — pull request #299 by chrisdone (2013-06-07 00:35:13+00:00)
Title: Fix type variables in serialization

Unfortunately this one cannot be merged as-is because the serialization code has changed since. But the concept is pretty simple. Presently,

data Either a b = Left a | Right b
printRight :: Either Int String -> Fay ()
printRight = ffi "console.log(%1)"

will not work because the `b' is ignored, the type variable `a' will be indexed in both cases. See commits for how this should be done. I will try to update the new serialization code later if someone else doesn't.