-
Notifications
You must be signed in to change notification settings - Fork 89
What is not supported?
This list is probably incomplete, if there is no test case and no open issue, please create one!
We don't feel it's necessary to support things like Int64
or unboxed tuples. Fay's number types are represented as JS numbers for simplicity. This is a pragmatic choice. Changing it would also dramatically change the scope of Fay.
JavaScript is single threaded, we keep Fay that way to stay close to the actual runtime.
Declarations of type class methods are ignored. You can still use type classes to enforce constraints such as:
data JQuery
class Selectable
instance Selectable Element
instance Selectable Text
select :: Selectable a => Automatic a -> Fay JQuery
We plan to support type classes at least partially in the short term.
Package imports are ignored. These are used internally by fay-base.
No plans to support this, but let us know if you have a use case for it!
type String' = String
f :: String' -> Fay ()
f = ffi "console.log(%1)"
The type alias isn't resolved here so this will generate the same code as f :: a -> Fay ()
would. Probably not what you expect.
There is nothing blocking this, it just needs to be implemented.
haskell-src-exts doesn't support custom fixity declarations. To do this it would have to preparse a file to get the fixities, and then re parse the rest with these applied. Fay passes base fixities to haskell-src-exts so any operator with a declared fixity in GHC base
will parse correctly.
Fixity declarations are just ignored at the moment. We should give a warning for this, it shouldn't be hard.