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

Using fay packages does not typecheck packaged code #385

Closed bergmark closed 9 years ago

bergmark commented 10 years ago

When cabal installing a fay package it's typechecked using the GHC version of the code if applicable. So this will install fine:

#ifdef FAY
bad
#endif

When you then compile this code with fay --package bad the package isn't typechecked at all since it's already installed, but fay compilation will fail.

This is an unintended consequence of using packages. Right now you cannot use fay-text with --include since the module uses deriving clauses on an EmptyDataDecl, which aren't allowed (this will be allowed in the future).

Hopefully haskell-packages can solve this by letting us run the typechecker with the correct CPP flags.

Note that the files using these packages will still be typechecked, so it's not a major issue.

bergmark commented 10 years ago

Refs faylang/fay-text#1

bergmark commented 9 years ago

Spring cleaning. Lack of activity, it's unlikely that this will happen since haskell-packages is dead.