Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHC 9.0 support #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
packages: . fay-base/

allow-newer: language-ecmascript:base

source-repository-package
type: git
location: https://github.com/swamp-agr/traverse-with-class

source-repository-package
type: git
location: https://github.com/sorki/data-lens-light
tag: db75ed52810293013da577d72fbfb502273ef02e
54 changes: 26 additions & 28 deletions fay.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ library
Language.Haskell.Names.Types
Paths_fay
build-depends:
base >= 4.9 && < 4.15
base >= 4.9 && < 4.16
, base-compat >= 0.10 && < 0.12
, aeson > 0.6 && < 1.6
, bytestring >= 0.9 && < 0.11
Expand Down Expand Up @@ -191,34 +191,32 @@ executable fay
other-modules:
Paths_fay

executable fay-tests
test-suite fay-tests
default-language: Haskell2010
ghc-options: -O2 -Wall -threaded -with-rtsopts=-N
hs-source-dirs: src/tests
type: exitcode-stdio-1.0
main-is: Tests.hs
if flag(test)
other-modules:
Test.CommandLine
Test.Compile
Test.Convert
Test.Desugar
Test.Util
Paths_fay
build-depends:
base
, aeson
, attoparsec
, bytestring
, containers
, directory
, fay
, filepath
, haskell-src-exts
, random >= 1.0 && < 1.3
, tasty >= 0.9 && < 1.5
, tasty-hunit >= 0.8 && < 0.11
, tasty-th == 0.1.*
, text
, utf8-string
else
buildable: False
other-modules:
Test.CommandLine
Test.Compile
Test.Convert
Test.Desugar
Test.Util
Paths_fay
build-depends:
base
, aeson
, attoparsec
, bytestring
, containers
, directory
, fay
, filepath
, haskell-src-exts
, random >= 1.0 && < 1.3
, tasty >= 0.9 && < 1.5
, tasty-hunit >= 0.8 && < 0.11
, tasty-th == 0.1.*
, text
, utf8-string
4 changes: 2 additions & 2 deletions src/Fay/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import qualified Data.Vector as Vector
-- | Convert a Haskell value to a Fay json value. This can fail when primitive
-- values aren't handled by explicit cases. 'encodeFay' can be used to
-- resolve this issue.
showToFay :: Data a => a -> Maybe Value
showToFay = spoon . encodeFay id
showToFay :: forall a. Data a => a -> Maybe Value
showToFay v = spoon $ encodeFay (\f -> f) v

-- | Convert a Haskell value to a Fay json value. This can fail when primitive
-- values aren't handled by explicit cases. When this happens, you can add
Expand Down
4 changes: 3 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
resolver: lts-12.7
resolver: lts-16.28
packages:
- .
- fay-base
allow-newer: true
extra-deps:
- language-ecmascript-0.19.1.0
flags:
fay:
test: true
Expand Down