Skip to content

Commit

Permalink
Merge pull request #67 from mightybyte/ghc96
Browse files Browse the repository at this point in the history
Update to build with GHC 9.6.1
  • Loading branch information
ali-abrar authored May 24, 2023
2 parents 6609337 + 0aef21d commit d8c402a
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.4.4']
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.4.5', '9.6.1']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

Expand All @@ -16,6 +16,7 @@ jobs:
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.1.0'
- name: Cache
uses: actions/cache@v3
env:
Expand All @@ -35,5 +36,7 @@ jobs:
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all
- name: Build Docs
- if: matrix.ghc != '8.4.4'
# disable doc builds on older ghcs because some dependency docs aren't compatible
name: Build Docs
run: cabal haddock
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for reflex-vty

## 0.4.1.1

* Support ghc-9.6

## 0.4.1.0

* Loosen version bounds and support GHC 9.4.4
Expand Down
4 changes: 2 additions & 2 deletions nixpkgs/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"repo": "nixpkgs",
"branch": "nixpkgs-unstable",
"private": false,
"rev": "e37ef84b478fa8da0ced96522adfd956fde9047a",
"sha256": "03qak39mn2142gp6zglrzrkdbig6h4r3da1psmvf3q2dwcw3zsfv"
"rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054",
"sha256": "1glf6j13hbwi459qrc8kkkhfw27a08vdg17sr3zwhadg4bkxz5ia"
}
12 changes: 6 additions & 6 deletions reflex-vty.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: reflex-vty
version: 0.4.1.0
version: 0.4.1.1
synopsis: Reflex FRP host and widgets for VTY applications
description:
Build terminal applications using functional reactive programming (FRP) with Reflex FRP (<https://reflex-frp.org>).
Expand All @@ -18,7 +18,7 @@ extra-source-files:
ChangeLog.md
extra-doc-files: doc/tasks.png
tested-with:
GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.4.4
GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.4.5 || ==9.6.1

source-repository head
type: git
Expand All @@ -39,11 +39,11 @@ library
, Reflex.Spider.Orphans
, Control.Monad.NodeId
build-depends:
base >= 4.10.0 && < 4.18,
base >= 4.10.0 && < 4.19,
bimap >= 0.3.3 && < 0.6,
containers >= 0.5.0 && < 0.7,
mtl >= 2.2.2 && < 2.3,
transformers >= 0.5.5 && < 0.6,
mtl >= 2.2.2 && < 2.4,
transformers >= 0.5.5 && < 0.7,
stm >= 2.4 && < 2.6,
data-default >= 0.7.1 && < 0.8,
dependent-map >= 0.4 && < 0.5,
Expand All @@ -56,7 +56,7 @@ library
ref-tf >= 0.4.0 && < 0.6,
reflex >= 0.8 && < 1,
time >= 1.8.0 && < 1.13,
vty >= 5.28 && < 5.38
vty >= 5.28 && < 5.39
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
Expand Down
85 changes: 73 additions & 12 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,103 @@ let
pkgs = (reflex-platform {}).nixpkgs;
supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
inherit (pkgs) lib;
haskellLib = pkgs.haskell.lib;
commonOverrides = self: super: {
vty = self.callHackageDirect {
pkg = "vty";
ver = "5.37";
sha256 = "01ppspii5x02iik9rxkf2idi6r9ngax6w3mqi6d8qj765w3cksiq";
ver = "5.38";
sha256 = "0kcd3ln9xmc62ka0i7habzvjjar8z63mlvl15rdhf8hqmda0b7r7";
} {};
};
in
lib.genAttrs supportedSystems (system: let
ghcs = lib.genAttrs supportedSystems (system: let
rp = reflex-platform { inherit system; __useNewerCompiler = true; };
rpGhc = rp.ghc.override {
overrides = commonOverrides;
};
nixGhc = (import ./nixpkgs { inherit system; }).haskell.packages.ghc943.override {
nixGhc945 = (import ./nixpkgs { inherit system; }).haskell.packages.ghc945.override {
overrides = self: super: commonOverrides self super // {
hlint = self.callHackageDirect {
pkg = "hlint";
ver = "3.5";
sha256 = "1np43k54918v54saqqgnd82ccd6225njwxpg2031asi70jam80x9";
} {};

# Jailbroken until https://github.com/audreyt/string-qq/pull/3
string-qq = pkgs.haskell.lib.dontCheck super.string-qq;
patch = self.callHackageDirect {
pkg = "patch";
ver = "0.0.8.2";
sha256 = "160zqqhjg48fr3a33gffd82qm3728c8hwf8sn37pbpv82fw71rzg";
} {};

reflex = self.callHackageDirect {
pkg = "reflex";
ver = "0.9.0.1";
sha256 = "1yrcashxxclvlvv3cs5gv75rvlsg1gb0m36kssnk2zvhbh94240y";
} {};
};
};
nixGhc961 = (import ./nixpkgs { inherit system; }).haskell.packages.ghc961.override {
overrides = self: super: {
patch = self.callHackageDirect {
pkg = "patch";
ver = "0.0.8.1";
sha256 = "0q5rxnyilhbnfph48fnxbclggsbbhs0pkn0kfiadm0hmfr440cgk";
ver = "0.0.8.2";
sha256 = "160zqqhjg48fr3a33gffd82qm3728c8hwf8sn37pbpv82fw71rzg";
} {};

reflex = self.callHackageDirect {
pkg = "reflex";
ver = "0.9.0.0";
sha256 = "0ibashkz3ifwxa61zg3fwamvjwv125l7jhjd74kgjbq13zpx23ib";
ver = "0.9.0.1";
sha256 = "1yrcashxxclvlvv3cs5gv75rvlsg1gb0m36kssnk2zvhbh94240y";
} {};
these-lens = self.callHackageDirect {
pkg = "these-lens";
ver = "1.0.1.3";
sha256 = "0n1vkr57jz5yvy4jm15v5cs42rp342ni0gisib7aqyhibpicqs5c";
} {};
these = self.callHackageDirect {
pkg = "these";
ver = "1.2";
sha256 = "1iaaq1fsvg8c3l0czcicshkmbbr00hnwkdamjbkljsa1qvlilaf0";
} {};
lens = self.callHackageDirect {
pkg = "lens";
ver = "5.2.2";
sha256 = "0c4a421sxfjm1cj3nvgwkr4glll23mqnsvs2iv5qh85931h2f3cy";
} {};

assoc = self.callHackageDirect {
pkg = "assoc";
ver = "1.1";
sha256 = "1krvcafrbj98z5hv55gq4zb1in5yd71nmz9zdiqgnywjzbrvpf75";
} {};

strict = self.callHackageDirect {
pkg = "strict";
ver = "0.5";
sha256 = "02iyvrr7nd7fnivz78lzdchy8zw1cghqj1qx2yzbbb9869h1mny7";
} {};
vty = self.callHackageDirect {
pkg = "vty";
ver = "5.38";
sha256 = "0kcd3ln9xmc62ka0i7habzvjjar8z63mlvl15rdhf8hqmda0b7r7";
} {};


# Jailbroken until https://github.com/audreyt/string-qq/pull/3
string-qq = pkgs.haskell.lib.dontCheck super.string-qq;
string-qq = haskellLib.dontCheck super.string-qq;
# Tests aren't compatible with transformers-0.6
bimap = haskellLib.dontCheck super.bimap;
exception-transformers = haskellLib.doJailbreak (haskellLib.dontCheck super.exception-transformers);

};
};
in
{
recurseForDerivations = true;
ghc810 = rpGhc.callCabal2nix "reflex-vty" (import ./src.nix) {};
ghc943 = nixGhc.callCabal2nix "reflex-vty" (import ./src.nix) {};
})
ghc945 = nixGhc945.callCabal2nix "reflex-vty" (import ./src.nix) {};
ghc961 = nixGhc961.callCabal2nix "reflex-vty" (import ./src.nix) {};
});
in
ghcs
1 change: 1 addition & 0 deletions src/Control/Monad/NodeId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Control.Monad.NodeId
) where

import Control.Monad.Morph
import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.Ref
import Data.IORef
Expand Down
5 changes: 4 additions & 1 deletion src/Data/Text/Zipper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ module Data.Text.Zipper where
import Prelude

import Control.Exception (assert)
import Control.Monad.State (evalState, forM, get, put)
import Data.Char (isSpace)
import Data.Map (Map)
import Data.Maybe (fromMaybe)
import Data.String
import Control.Monad
import Control.Monad.Fix
import Control.Monad.State (evalState, get, put)

import Data.Text (Text)
import Data.Text.Internal (Text(..), text)
import Data.Text.Internal.Fusion (stream)
Expand Down
2 changes: 2 additions & 0 deletions src/Reflex/Vty/Widget/Layout.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module Reflex.Vty.Widget.Layout where
import Control.Applicative (liftA2)
import Control.Monad.Morph
import Control.Monad.NodeId (MonadNodeId(..), NodeId)
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Reader
import Data.List (mapAccumL)
import Data.Map.Ordered (OMap)
Expand Down

0 comments on commit d8c402a

Please sign in to comment.