mirror of
https://github.com/ilyakooo0/reflex.git
synced 2024-10-03 21:27:17 +03:00
Backport GHC 10 support to reflex 0.7
Drop support for < 8.4, bumping base lower bound accordingly. (I tested that in fact does not work.)
This commit is contained in:
parent
122d7361e3
commit
804a0802b9
41
.github/workflows/haskell.yml
vendored
Normal file
41
.github/workflows/haskell.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: github-action
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.2']
|
||||
os: ['ubuntu-latest', 'macos-latest']
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
- name: Cache
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: cache-cabal
|
||||
with:
|
||||
path: ~/.cabal
|
||||
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-${{ matrix.ghc }}-build-
|
||||
${{ runner.os }}-${{ matrix.ghc }}-
|
||||
${{ runner.os }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal update
|
||||
cabal build --only-dependencies --enable-tests --enable-benchmarks
|
||||
- name: Build
|
||||
run: cabal build --enable-tests --enable-benchmarks all
|
||||
- name: Run tests
|
||||
run: cabal test all
|
||||
- name: Build Docs
|
||||
run: cabal haddock
|
177
.travis.yml
177
.travis.yml
@ -1,177 +0,0 @@
|
||||
# This Travis job script has been generated by a script via
|
||||
#
|
||||
# haskell-ci '--config=cabal.haskell-ci' 'cabal.project'
|
||||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
# version: 0.3.20190814
|
||||
#
|
||||
language: c
|
||||
dist: xenial
|
||||
sudo: required
|
||||
git:
|
||||
# whether to recursively clone submodules
|
||||
submodules: false
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cabal/packages
|
||||
- $HOME/.cabal/store
|
||||
before_cache:
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
|
||||
# remove files that are regenerated by 'cabal update'
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
|
||||
- rm -rfv $CABALHOME/packages/head.hackage
|
||||
matrix:
|
||||
include:
|
||||
- compiler: ghcjs-8.4
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.8.1
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
|
||||
- compiler: ghc-8.6.5
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
|
||||
- compiler: ghc-8.4.4
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
|
||||
- compiler: ghc-8.2.2
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
|
||||
- compiler: ghc-8.0.2
|
||||
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
|
||||
before_install:
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo add-apt-repository -y ppa:hvr/ghcjs;
|
||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
|
||||
sudo apt-add-repository 'https://deb.nodesource.com/node_8.x xenial main'
|
||||
sudo apt-get update;
|
||||
sudo apt-get install $CC cabal-install-3.0 nodejs;
|
||||
fi
|
||||
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
|
||||
- WITHCOMPILER="-w $HC"
|
||||
- |
|
||||
if echo $CC | grep -q ghcjs; then
|
||||
GHCJS=true
|
||||
HC=${HC}js
|
||||
WITHCOMPILER="--ghcjs ${WITHCOMPILER}js"
|
||||
else
|
||||
GHCJS=false;
|
||||
fi
|
||||
- if $GHCJS ; then sudo apt-get install -y ghc-8.4.4 ; fi
|
||||
- if $GHCJS ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi
|
||||
- HCPKG="$HC-pkg"
|
||||
- unset CC
|
||||
- CABAL=/opt/ghc/bin/cabal
|
||||
- CABALHOME=$HOME/.cabal
|
||||
- export PATH="$CABALHOME/bin:$PATH"
|
||||
- TOP=$(pwd)
|
||||
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
|
||||
- echo $HCNUMVER
|
||||
- CABAL="$CABAL -vnormal+nowrap+markoutput"
|
||||
- set -o pipefail
|
||||
- |
|
||||
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
|
||||
echo 'BEGIN { state = "output"; }' >> .colorful.awk
|
||||
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
|
||||
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
|
||||
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
|
||||
echo ' if (state == "cabal") {' >> .colorful.awk
|
||||
echo ' print blue($0)' >> .colorful.awk
|
||||
echo ' } else {' >> .colorful.awk
|
||||
echo ' print $0' >> .colorful.awk
|
||||
echo ' }' >> .colorful.awk
|
||||
echo '}' >> .colorful.awk
|
||||
- cat .colorful.awk
|
||||
- |
|
||||
color_cabal_output () {
|
||||
awk -f $TOP/.colorful.awk
|
||||
}
|
||||
- echo text | color_cabal_output
|
||||
install:
|
||||
- ${CABAL} --version
|
||||
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||
- node --version
|
||||
- echo $GHCJS
|
||||
- TEST=--enable-tests
|
||||
- BENCH=--enable-benchmarks
|
||||
- BENCH=--disable-benchmarks
|
||||
- HEADHACKAGE=false
|
||||
- rm -f $CABALHOME/config
|
||||
- |
|
||||
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
|
||||
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
|
||||
echo "write-ghc-environment-files: always" >> $CABALHOME/config
|
||||
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
|
||||
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
|
||||
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
|
||||
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
|
||||
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
|
||||
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
|
||||
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
|
||||
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
|
||||
echo "install-dirs user" >> $CABALHOME/config
|
||||
echo " prefix: $CABALHOME" >> $CABALHOME/config
|
||||
echo "repository hackage.haskell.org" >> $CABALHOME/config
|
||||
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
|
||||
- cat $CABALHOME/config
|
||||
- rm -fv cabal.project cabal.project.local cabal.project.freeze
|
||||
- travis_retry ${CABAL} v2-update -v
|
||||
- if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 happy) ; fi
|
||||
# Generate cabal.project
|
||||
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
||||
- touch cabal.project
|
||||
- |
|
||||
echo "packages: ." >> cabal.project
|
||||
- |
|
||||
- cat cabal.project || true
|
||||
- cat cabal.project.local || true
|
||||
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
|
||||
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
|
||||
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
||||
- rm cabal.project.freeze
|
||||
script:
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
# Packaging...
|
||||
- ${CABAL} v2-sdist all | color_cabal_output
|
||||
# Unpacking...
|
||||
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
|
||||
- cd ${DISTDIR} || false
|
||||
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
|
||||
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
|
||||
- PKGDIR_reflex="$(find . -maxdepth 1 -type d -regex '.*/reflex-[0-9.]*')"
|
||||
# Generate cabal.project
|
||||
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
||||
- touch cabal.project
|
||||
- |
|
||||
echo "packages: ${PKGDIR_reflex}" >> cabal.project
|
||||
- |
|
||||
- cat cabal.project || true
|
||||
- cat cabal.project.local || true
|
||||
# Building...
|
||||
# this builds all libraries and executables (without tests/benchmarks)
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
|
||||
# Building with tests and benchmarks...
|
||||
# build & run tests, build benchmarks
|
||||
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
|
||||
# Testing...
|
||||
- if ! $GHCJS ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
|
||||
# cabal check...
|
||||
- (cd ${PKGDIR_reflex} && ${CABAL} -vnormal check)
|
||||
# haddock...
|
||||
- if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
|
||||
# Constraint sets
|
||||
- rm -rf cabal.project.local
|
||||
# Constraint set no-th
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
|
||||
# Constraint set old-these
|
||||
- if $GHCJS || ! $GHCJS && [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output ; fi
|
||||
# Constraint set old-witherable
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
|
||||
# Constraint set debug-propagation
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex +debug-propagation' all | color_cabal_output
|
||||
# Constraint set debug-cycles
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex +debug-cycles' all | color_cabal_output
|
||||
|
||||
# REGENDATA ["--config=cabal.haskell-ci","cabal.project"]
|
||||
# EOF
|
@ -1,5 +1,11 @@
|
||||
# Revision history for reflex
|
||||
|
||||
## 0.7.1.1
|
||||
|
||||
* Add support for GHC 8.10
|
||||
* Extend some dependency version bounds
|
||||
* Fix HLint 3 test
|
||||
|
||||
## 0.7.1.0
|
||||
|
||||
* ([#413](https://github.com/reflex-frp/reflex/pull/413), [#417](https://github.com/reflex-frp/reflex/pull/417)) Add `Reflex.Host.Headless` module which provides `runHeadlessApp` as an easy way to run a Reflex network in a "headless" environment.
|
||||
|
@ -1,6 +1,6 @@
|
||||
## [Reflex](https://reflex-frp.org/)
|
||||
|
||||
[![Hackage](https://img.shields.io/hackage/v/reflex.svg)](http://hackage.haskell.org/package/reflex)
|
||||
[![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/reflex.svg)](https://hackage.haskell.org/package/reflex) [![Hackage CI](https://matrix.hackage.haskell.org/api/v2/packages/reflex/badge)](https://matrix.hackage.haskell.org/#/package/reflex) [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/reflex-frp/reflex/blob/master/LICENSE)
|
||||
|
||||
### Practical Functional Reactive Programming
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
constraints: any.text < 1.2.4.0
|
||||
, hlint < 2.2.6 || > 2.2.6
|
30
reflex.cabal
30
reflex.cabal
@ -1,5 +1,5 @@
|
||||
Name: reflex
|
||||
Version: 0.7.1.0
|
||||
Version: 0.7.1.1
|
||||
Synopsis: Higher-order Functional Reactive Programming
|
||||
Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
|
||||
License: BSD3
|
||||
@ -18,8 +18,8 @@ extra-source-files:
|
||||
ChangeLog.md
|
||||
|
||||
tested-with:
|
||||
GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1,
|
||||
GHCJS ==8.4
|
||||
GHC ==8.4.4 || ==8.6.5 || ==8.8.1 || ==8.10.2,
|
||||
GHCJS ==8.6
|
||||
|
||||
flag use-reflex-optimizer
|
||||
description: Use the GHC plugin Reflex.Optimizer on some of the modules in the package. This is still experimental.
|
||||
@ -61,21 +61,22 @@ library
|
||||
hs-source-dirs: src
|
||||
build-depends:
|
||||
MemoTrie == 0.6.*,
|
||||
base >= 4.9 && < 4.14,
|
||||
base >= 4.11 && < 4.15,
|
||||
bifunctors >= 5.2 && < 5.6,
|
||||
comonad >= 5.0.4 && < 5.1,
|
||||
constraints-extras >= 0.3 && < 0.4,
|
||||
containers >= 0.6 && < 0.7,
|
||||
data-default >= 0.5 && < 0.8,
|
||||
dependent-map >= 0.3 && < 0.4,
|
||||
dependent-map >= 0.3 && < 0.5,
|
||||
exception-transformers == 0.4.*,
|
||||
lens >= 4.7 && < 5,
|
||||
mmorph >= 1.0 && < 1.2,
|
||||
monad-control >= 1.0.1 && < 1.1,
|
||||
mtl >= 2.1 && < 2.3,
|
||||
patch >= 0.0.1 && < 0.1,
|
||||
prim-uniq >= 0.1.0.1 && < 0.2,
|
||||
prim-uniq >= 0.1.0.1 && < 0.3,
|
||||
primitive >= 0.5 && < 0.8,
|
||||
profunctors >= 5.3 && < 5.6,
|
||||
profunctors >= 5.3 && < 5.7,
|
||||
random == 1.1.*,
|
||||
ref-tf == 0.4.*,
|
||||
reflection == 2.1.*,
|
||||
@ -85,10 +86,10 @@ library
|
||||
time >= 1.4 && < 1.10,
|
||||
transformers >= 0.5.6.0 && < 0.6,
|
||||
unbounded-delays >= 0.1.0.0 && < 0.2,
|
||||
witherable >= 0.3 && < 0.3.2
|
||||
witherable >= 0.3 && < 0.4
|
||||
|
||||
if flag(split-these)
|
||||
build-depends: these >= 1 && <1.1,
|
||||
build-depends: these >= 1 && <1.2,
|
||||
semialign >=1 && <1.2,
|
||||
monoidal-containers >= 0.6 && < 0.7
|
||||
else
|
||||
@ -170,10 +171,10 @@ library
|
||||
if flag(use-template-haskell)
|
||||
cpp-options: -DUSE_TEMPLATE_HASKELL
|
||||
build-depends:
|
||||
dependent-sum >= 0.6 && < 0.7,
|
||||
haskell-src-exts >= 1.16 && < 1.23,
|
||||
dependent-sum >= 0.6 && < 0.8,
|
||||
haskell-src-exts >= 1.16 && < 1.24,
|
||||
haskell-src-meta >= 0.6 && < 0.9,
|
||||
template-haskell >= 2.9 && < 2.16
|
||||
template-haskell >= 2.9 && < 2.17
|
||||
exposed-modules:
|
||||
Reflex.Dynamic.TH
|
||||
other-extensions: TemplateHaskell
|
||||
@ -244,7 +245,10 @@ test-suite hlint
|
||||
, directory
|
||||
, filepath
|
||||
, filemanip
|
||||
, hlint (< 2.1 || >= 2.2.2) && < 3
|
||||
if impl(ghc >= 8.8)
|
||||
build-depends: hlint >= 3
|
||||
else
|
||||
build-depends: hlint (< 2.1 || >= 2.2.2) && < 3
|
||||
if impl(ghcjs)
|
||||
buildable: False
|
||||
|
||||
|
@ -30,7 +30,8 @@ module Reflex.Adjustable.Class
|
||||
|
||||
import Control.Monad.Identity
|
||||
import Control.Monad.Reader
|
||||
import Data.Dependent.Map (DMap, GCompare (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import Data.GADT.Compare (GCompare(..))
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Functor.Constant
|
||||
import Data.Functor.Misc
|
||||
|
@ -196,7 +196,8 @@ import Data.Align
|
||||
import Data.Bifunctor
|
||||
import Data.Coerce
|
||||
import Data.Default
|
||||
import Data.Dependent.Map (DMap, DSum (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import Data.Dependent.Sum (DSum (..))
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Functor.Compose
|
||||
import Data.Functor.Product
|
||||
|
@ -39,8 +39,9 @@ import Control.Monad.Primitive
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.Ref
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Dependent.Map (DMap, DSum (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Dependent.Sum (DSum (..))
|
||||
import Data.Functor.Compose
|
||||
import Data.Functor.Misc
|
||||
import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..))
|
||||
|
@ -8,7 +8,6 @@
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
#ifdef USE_REFLEX_OPTIMIZER
|
||||
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
|
||||
|
@ -9,7 +9,6 @@
|
||||
{-# LANGUAGE RecursiveDo #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
#ifdef USE_REFLEX_OPTIMIZER
|
||||
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
|
||||
|
@ -6,7 +6,6 @@
|
||||
{-# LANGUAGE FunctionalDependencies #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
#ifdef USE_REFLEX_OPTIMIZER
|
||||
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
|
||||
|
@ -28,7 +28,8 @@ import Control.Monad.Ref
|
||||
import Control.Monad.State.Strict (StateT, execStateT, modify)
|
||||
import Data.Bifunctor
|
||||
import Data.Coerce
|
||||
import Data.Dependent.Map (DMap, GCompare)
|
||||
import Data.Dependent.Map (DMap)
|
||||
import Data.GADT.Compare (GCompare)
|
||||
import Data.FastMutableIntMap
|
||||
import Data.IORef
|
||||
import Data.List
|
||||
@ -146,7 +147,7 @@ instance Reflex t => Reflex (ProfiledTimeline t) where
|
||||
pushCheap f (Event_Profiled e) = coerce $ pushCheap (coerce f) $ profileEvent e
|
||||
pull = Behavior_Profiled . pull . coerce
|
||||
fanG (Event_Profiled e) = EventSelectorG $ coerce $ selectG (fanG $ profileEvent e)
|
||||
mergeG :: forall (k :: z -> *) q v. GCompare k
|
||||
mergeG :: forall z (k :: z -> *) q v. GCompare k
|
||||
=> (forall a. q a -> Event (ProfiledTimeline t) (v a))
|
||||
-> DMap k q -> Event (ProfiledTimeline t) (DMap k v)
|
||||
mergeG nt = Event_Profiled #. mergeG (coerce nt)
|
||||
|
@ -32,7 +32,8 @@ module Reflex.Pure
|
||||
) where
|
||||
|
||||
import Control.Monad
|
||||
import Data.Dependent.Map (DMap, GCompare)
|
||||
import Data.Dependent.Map (DMap)
|
||||
import Data.GADT.Compare (GCompare)
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.IntMap (IntMap)
|
||||
import qualified Data.IntMap as IntMap
|
||||
|
@ -27,11 +27,13 @@ import Control.Monad.Reader
|
||||
import Control.Monad.Ref
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Align
|
||||
import Data.Dependent.Map (DMap, DSum (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Dependent.Sum (DSum(..))
|
||||
import Data.Foldable
|
||||
import Data.Functor.Compose
|
||||
import Data.Functor.Misc
|
||||
import Data.GADT.Compare (GCompare)
|
||||
import Data.IntMap (IntMap)
|
||||
import qualified Data.IntMap as IntMap
|
||||
import Data.Map (Map)
|
||||
@ -135,7 +137,7 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
|
||||
tellQueryIncremental $ unsafeBuildIncremental (fold <$> mapM sampleBs liftedBs0) qpatch
|
||||
return (liftedResult0, liftedResult')
|
||||
|
||||
traverseDMapWithKeyWithAdjust :: forall (k :: * -> *) v v'. (DMap.GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> QueryT t q m (DMap k v', Event t (PatchDMap k v'))
|
||||
traverseDMapWithKeyWithAdjust :: forall (k :: * -> *) v v'. (GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> QueryT t q m (DMap k v', Event t (PatchDMap k v'))
|
||||
traverseDMapWithKeyWithAdjust f dm0 dm' = do
|
||||
let f' :: forall a. k a -> v a -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (Compose (QueryTLoweredResult t q) v' a)
|
||||
f' k v = fmap (Compose . QueryTLoweredResult) $ flip runStateT [] $ unQueryT $ f k v
|
||||
@ -180,7 +182,7 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
|
||||
tellQueryIncremental $ unsafeBuildIncremental (fold <$> mapM sampleBs liftedBs0) qpatch
|
||||
return (liftedResult0, liftedResult')
|
||||
|
||||
traverseDMapWithKeyWithAdjustWithMove :: forall (k :: * -> *) v v'. (DMap.GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> QueryT t q m (DMap k v', Event t (PatchDMapWithMove k v'))
|
||||
traverseDMapWithKeyWithAdjustWithMove :: forall (k :: * -> *) v v'. (GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> QueryT t q m (DMap k v', Event t (PatchDMapWithMove k v'))
|
||||
traverseDMapWithKeyWithAdjustWithMove f dm0 dm' = do
|
||||
let f' :: forall a. k a -> v a -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (Compose (QueryTLoweredResult t q) v' a)
|
||||
f' k v = fmap (Compose . QueryTLoweredResult) $ flip runStateT [] $ unQueryT $ f k v
|
||||
|
@ -55,8 +55,9 @@ import Control.Monad.Ref
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Bits
|
||||
import Data.Coerce
|
||||
import Data.Dependent.Map (DMap, DSum (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Dependent.Sum (DSum (..))
|
||||
import Data.Functor.Compose
|
||||
import Data.Functor.Misc
|
||||
import Data.IntMap.Strict (IntMap)
|
||||
|
@ -9,7 +9,6 @@
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE MultiWayIf #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# LANGUAGE RoleAnnotations #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
@ -20,6 +19,7 @@
|
||||
{-# LANGUAGE DeriveFunctor #-}
|
||||
{-# LANGUAGE StandaloneDeriving #-}
|
||||
{-# LANGUAGE InstanceSigs #-}
|
||||
{-# LANGUAGE MultiWayIf #-}
|
||||
|
||||
#ifdef USE_REFLEX_OPTIMIZER
|
||||
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
|
||||
@ -46,8 +46,9 @@ import Control.Monad.Fail (MonadFail)
|
||||
import qualified Control.Monad.Fail as MonadFail
|
||||
import Data.Align
|
||||
import Data.Coerce
|
||||
import Data.Dependent.Map (DMap, DSum (..))
|
||||
import Data.Dependent.Map (DMap)
|
||||
import qualified Data.Dependent.Map as DMap
|
||||
import Data.Dependent.Sum (DSum (..))
|
||||
import Data.FastMutableIntMap (FastMutableIntMap, PatchIntMap (..))
|
||||
import qualified Data.FastMutableIntMap as FastMutableIntMap
|
||||
import Data.Foldable hiding (concat, elem, sequence_)
|
||||
@ -2739,7 +2740,7 @@ instance HasSpiderTimeline x => R.Reflex (SpiderTimeline x) where
|
||||
fanG e = R.EventSelectorG $ SpiderEvent . selectG (fanG (unSpiderEvent e))
|
||||
{-# INLINABLE mergeG #-}
|
||||
mergeG
|
||||
:: forall (k :: k2 -> *) q (v :: k2 -> *). GCompare k
|
||||
:: forall k2 (k :: k2 -> *) q (v :: k2 -> *). GCompare k
|
||||
=> (forall a. q a -> R.Event (SpiderTimeline x) (v a))
|
||||
-> DMap k q
|
||||
-> R.Event (SpiderTimeline x) (DMap k v)
|
||||
|
@ -18,6 +18,7 @@ import Data.GADT.Compare
|
||||
import Data.IORef
|
||||
import Data.Semigroup
|
||||
import Data.These
|
||||
import Data.Type.Equality ((:~:)(Refl))
|
||||
|
||||
import Data.Functor.Misc
|
||||
import Data.Patch
|
||||
|
@ -26,7 +26,7 @@ import qualified Reflex.Profiled as Prof
|
||||
import Control.Arrow (second, (&&&))
|
||||
import Control.Monad.Identity hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
|
||||
import Control.Monad.State.Strict hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
|
||||
import Data.Dependent.Map (DSum (..))
|
||||
import Data.Dependent.Sum (DSum (..))
|
||||
import Data.Foldable
|
||||
import Data.Map.Strict (Map)
|
||||
import qualified Data.Map.Strict as Map
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Main where
|
||||
|
||||
import Control.Monad
|
||||
import Language.Haskell.HLint3 (hlint)
|
||||
import Language.Haskell.HLint (hlint)
|
||||
import System.Directory
|
||||
import System.Exit (exitFailure, exitSuccess)
|
||||
import System.FilePath
|
||||
@ -22,6 +22,7 @@ main = do
|
||||
, "--ignore=Use unless"
|
||||
, "--ignore=Reduce duplication"
|
||||
, "--cpp-define=USE_TEMPLATE_HASKELL"
|
||||
, "--cpp-define=DEBUG"
|
||||
, "--ignore=Use tuple-section"
|
||||
]
|
||||
recurseInto = and <$> sequence
|
||||
|
Loading…
Reference in New Issue
Block a user