Browse Source

Test on mutliple versions of GHC (#1)

Remove DerivingVia

Remove unneeded template haskell bound

Hide fail from Prelude imports

Widen the constraint on base

Pull configure into its own step

Ugh warnings

Add a compatibility module for old versions of GHC

use libgmp for 844

Run post-clone tasks in parallel

Update the YAML signature

Make tests fancier

Co-authored-by: Alex Feldman-Crough <alex@fldcr.com>
Reviewed-on: #1
master
alex 1 year ago
parent
commit
d2927c82dd
  1. 38
      .drone.yml
  2. 5
      README.pro
  3. 18
      prosidy.cabal
  4. 8
      src/Prosidy/Compat.hs
  5. 3
      src/Prosidy/Parse.hs
  6. 4
      src/Prosidy/Source.hs
  7. 3
      src/Prosidy/Types.hs
  8. 2
      src/Prosidy/Types/Key.hs
  9. 1
      src/Prosidy/Types/Set.hs

38
.drone.yml

@ -4,7 +4,7 @@ type: docker
name: default
steps:
- name: ghc 8.8
- name: configure
image: utdemir/ghc-musl:v4-integer-simple-ghc881
environment:
CABAL_DIR: /cabal
@ -13,9 +13,39 @@ steps:
path: /cabal
commands:
- cabal v2-update
- cabal v2-configure --jobs \$ncpus --enable-tests
- cabal v2-configure --jobs \$ncpus --enable-tests --flags +fatal-warnings
- &default-steps
name: ghc 8.8.1
image: utdemir/ghc-musl:v4-integer-simple-ghc881
depends_on: [configure]
environment:
CABAL_DIR: /cabal
volumes:
- name: cabal-cache
path: /cabal
commands:
- cabal v2-build
- cabal v2-test
- <<: *default-steps
name: ghc 8.6.5
image: utdemir/ghc-musl:v4-integer-simple-ghc865
- <<: *default-steps
name: ghc 8.4.4
image: utdemir/ghc-musl:v4-libgmp-ghc844
- name: docs
image: utdemir/ghc-musl:v4-integer-simple-ghc881
depends_on:
- ghc 8.8.1
environment:
CABAL_DIR: /cabal
volumes:
- name: cabal-cache
path: /cabal
commands:
- ./scripts/documentation-coverage
volumes:
@ -24,4 +54,6 @@ volumes:
path: /var/cache/cabal
---
kind: signature
hmac: 9a0240bd67cd55e50f70e815511b142f28047d3f10d3e16c88defad130202b22
hmac: 1e74f88acdb8fc6c09cee53f2b1016b5820ed05ae783e751c31d7f5aac3e2279
...

5
README.pro

@ -33,6 +33,11 @@ We'd recommend you have both installed before building,
although it may work without both.
#-h{Changelog}
#-h+{2020-02-23}
#-list:
#-item{Added compatibility all the way back to GHC 8.4.}
#:
#-h+{2020-02-22}
#-list:
#-item{Large refactor to allow unopinionated use of this library. Optics are no longer "basically required".}

18
prosidy.cabal

@ -8,11 +8,15 @@ author: James Alexander Feldman-Crough
maintainer: alex@fldcr.com
copyright: ©2020 to James Alexander Feldman-Crough
category: Language
tested-with: GHC == 8.8.1
data-dir: data
data-files: golden/**/*.pro, golden/**/*.json
description:
tested-with:
GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.1
description:
Prosidy is a small language for writing documents.
More details are on its site at https://prosidy.org.
@ -31,14 +35,14 @@ library
hs-source-dirs: src
ghc-options:
-Wall
-Wall
-Wno-name-shadowing
if flag(fatal-warnings)
ghc-options:
-Werror
exposed-modules:
exposed-modules:
Prosidy
, Prosidy.Optics
, Prosidy.Optics.Source
@ -53,9 +57,10 @@ library
other-modules:
Prosidy.Optics.Internal
, Prosidy.Compat
build-depends:
base >= 4.12 && < 5
base >= 4.11 && < 5
, aeson >= 1.4 && < 1.5
, bytestring >= 0.10 && < 0.11
, binary >= 0.8 && < 0.9
@ -66,7 +71,6 @@ library
, megaparsec >= 7.0 && < 8.1
, profunctors >= 5.3 && < 5.6
, tagged >= 0.8 && < 0.9
, template-haskell >= 2.14 && < 2.16
, text >= 1.2 && < 1.3
, transformers >= 0.5 && < 0.6
, vector >= 0.12 && < 0.13
@ -79,7 +83,7 @@ test-suite prosidy-test
hs-source-dirs: test
ghc-options:
-Wall
-Wall
-Wno-name-shadowing
main-is:

8
src/Prosidy/Compat.hs

@ -0,0 +1,8 @@
{-# LANGUAGE CPP #-}
module Prosidy.Compat
( MonadFail(..)
) where
#if __GLASGOW_HASKELL__ < 808
import Control.Monad.Fail (MonadFail(..))
#endif

3
src/Prosidy/Parse.hs

@ -24,6 +24,9 @@ module Prosidy.Parse
)
where
import Prosidy.Compat
import Prelude hiding (fail)
import Prosidy.Types
import Prosidy.Source
import Prosidy.Types.Key (isValidKeyHead, isValidKeyTail, unsafeMakeKey)

4
src/Prosidy/Source.hs

@ -1,4 +1,3 @@
{-# LANGUAGE MultiParamTypeClasses #-}
{-|
Module : Prosidy.Source
Description : Utilities for tracking source locaitons.
@ -8,9 +7,10 @@ Maintainer : alex@fldcr.com
-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}

3
src/Prosidy/Types.hs

@ -1,4 +1,3 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-|
Module : Prosidy.Types
Description : A convenience module which reëxports type definitions & helpers.
@ -12,9 +11,9 @@ Maintainer : alex@fldcr.com
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeApplications #-}

2
src/Prosidy/Types/Key.hs

@ -9,8 +9,8 @@ Maintainer : alex@fldcr.com
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE GADTSyntax #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}

1
src/Prosidy/Types/Set.hs

@ -6,7 +6,6 @@ License : MPL-2.0
Maintainer : alex@fldcr.com
-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}

Loading…
Cancel
Save