Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Commit

Permalink
Build against older versions of aeson (#65)
Browse files Browse the repository at this point in the history
Fixes #64
  • Loading branch information
Gabriella439 committed Oct 13, 2018
1 parent 0c2398a commit 6c47345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions dhall-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Test-Suite tasty
Build-Depends:
base,
aeson ,
bytestring ,
dhall ,
dhall-json ,
tasty < 1.2,
Expand Down
5 changes: 3 additions & 2 deletions tasty/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Test.Tasty (TestTree)

import qualified Control.Exception
import qualified Data.Aeson
import qualified Data.ByteString.Lazy
import qualified Data.Text.IO
import qualified Dhall.Import
import qualified Dhall.JSON
Expand Down Expand Up @@ -49,9 +50,9 @@ issue48 = Test.Tasty.HUnit.testCase "Issue #48" assertion
Left exception -> Control.Exception.throwIO exception
Right actualValue -> return actualValue

result <- Data.Aeson.eitherDecodeFileStrict "./tasty/data/issue48.json"
bytes <- Data.ByteString.Lazy.readFile "./tasty/data/issue48.json"

expectedValue <- case result of
expectedValue <- case Data.Aeson.eitherDecode bytes of
Left string -> fail string
Right expectedValue -> return expectedValue

Expand Down

0 comments on commit 6c47345

Please sign in to comment.