Add json-to-dhall to appveyor artifacts (#894)

* Add json-to-dhall to dhall-json artifact

* Make json-to-dhall buildable with ghc-7.10

* Remove commented buildable field

* Remove unused import Semigroup
This commit is contained in:
Javier Neira 2019-04-16 12:52:55 +02:00 committed by antislava
parent af2c02cf28
commit 91f3cae1bf
3 changed files with 2 additions and 4 deletions

View File

@ -43,6 +43,7 @@ build_script:
- 7z a "bin\dhall-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall.exe"
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-json.exe"
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-yaml.exe"
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\json-to-dhall.exe"
- 7z a "bin\dhall-text-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-text.exe"
- 7z a "bin\dhall-bash-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-bash.exe"
# dhall-lsp-server can't be built with lts-6

View File

@ -93,8 +93,6 @@ Executable json-to-dhall
Other-Modules:
Paths_dhall_json
GHC-Options: -Wall
if impl(ghc < 8.0)
Buildable: False
Test-Suite tasty
Type: exitcode-stdio-1.0

View File

@ -154,7 +154,6 @@ import qualified Data.HashMap.Strict as HM
import Data.List ((\\))
import Data.Monoid ((<>))
import Data.Scientific (floatingOrInteger, toRealFloat)
import Data.Semigroup (Semigroup)
import qualified Data.Sequence as Seq
import qualified Data.String
import qualified Data.Text as Text
@ -495,7 +494,7 @@ dhallFromJSON (Conversion {..}) = loop
-- ----------
red, purple, green
:: (Semigroup a, Data.String.IsString a) => a -> a
:: (Monoid a, Data.String.IsString a) => a -> a
red s = "\ESC[1;31m" <> s <> "\ESC[0m" -- bold
purple s = "\ESC[1;35m" <> s <> "\ESC[0m" -- bold
green s = "\ESC[0;32m" <> s <> "\ESC[0m" -- plain