faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

synonym type for String does not become Javascript String #382

Closed dlee closed 10 years ago

dlee commented 10 years ago
type String' = String

putString' :: String' -> Fay ()
putString' = ffi "console.log(%1)"

main :: Fay ()
main = do
  putString' "hi"

expected result:

"hi"

actual result:

["h", "i"]
bergmark commented 10 years ago

This is a long standing issue, #185. Type aliases are fine to use, but not in FFI signatures.