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.
When
cabal install
ing a fay package it's typechecked using the GHC version of the code if applicable. So this will install fine: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.