Skip to content

Commit

Permalink
Merge pull request #438 from reflex-frp/aa/patch007
Browse files Browse the repository at this point in the history
Update to reflex 0.8.2.1
  • Loading branch information
ali-abrar authored Jul 4, 2022
2 parents a0459de + 5c6212a commit 6b8f6e8
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 20 deletions.
6 changes: 3 additions & 3 deletions dep/reflex-platform/github.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex-platform",
"branch": "aa-bump-some",
"branch": "develop",
"private": false,
"rev": "fd5acecb50474f795734db9fb924cc3b2fd2b508",
"sha256": "0wsdd67g42klsf9n3pxb3pndjdz36nzf8gp7pfm8j6nyyy2qribk"
"rev": "ac66356c8839d1dc16cc60887c2db5988a60e6c4",
"sha256": "0zk8pf72lid6cqq4mlr1mcwh6zd5lz9i83kw519aci6mfba1afvq"
}
4 changes: 4 additions & 0 deletions reflex-dom-core/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for reflex-dom-core

## 0.7.0.2

* Require reflex >= 0.8.2.1 and switch to `commutative-semigroups`

## 0.7.0.1

* Add a variant of `postForms` that allows the `XhrRequestConfig` to be specified.
Expand Down
15 changes: 8 additions & 7 deletions reflex-dom-core/reflex-dom-core.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.24
Name: reflex-dom-core
Version: 0.7.0.1
Version: 0.7.0.2
Synopsis: Functional Reactive Web Apps with Reflex
Description:
Web applications without callbacks or side-effects.
Expand Down Expand Up @@ -67,13 +67,14 @@ flag gc-tests
library
hs-source-dirs: src
build-depends:
aeson >= 0.8 && < 1.6,
aeson >= 0.8 && < 2.1,
base >= 4.7 && < 4.15,
bifunctors >= 4.2 && < 6,
bimap >= 0.3 && < 0.5,
blaze-builder >= 0.4.1 && < 0.5,
bytestring == 0.10.*,
case-insensitive < 1.3,
commutative-semigroups >=0.1 && <0.2,
containers >= 0.6 && < 0.7,
constraints >= 0.9 && < 0.13,
contravariant >= 1.4 && < 1.6,
Expand All @@ -87,13 +88,13 @@ library
jsaddle >= 0.9.0.0 && < 0.10,
-- keycode-0.2 has a bug on firefox
keycode >= 0.2.1 && < 0.3,
lens >= 4.7 && < 5,
lens >= 4.7 && < 5.1,
monad-control >= 1.0.1 && < 1.1,
mtl >= 2.1 && < 2.3,
primitive >= 0.5 && < 0.8,
random >= 1.1 && < 1.2,
random >= 1.1 && < 1.3,
ref-tf == 0.4.*,
reflex >= 0.8 && < 0.9,
reflex >= 0.8.2.1 && < 0.9,
semigroups >= 0.16 && < 0.20,
stm >= 2.4 && < 2.6,
text == 1.2.*,
Expand All @@ -113,8 +114,8 @@ library

if flag(split-these)
build-depends:
semialign >= 1 && < 1.2,
these >= 1 && < 1.2
semialign >= 1 && < 1.3,
these >= 1 && < 1.3
else
build-depends:
these >= 0.4 && < 0.9
Expand Down
3 changes: 2 additions & 1 deletion reflex-dom-core/src/Reflex/Dom/Builder/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import qualified Data.Map as Map
import Data.Maybe
import Data.Proxy
import Data.Semigroup
import Data.Semigroup.Commutative
import Data.String
import Data.Text (Text)
import Data.Type.Coercion
Expand Down Expand Up @@ -618,7 +619,7 @@ instance (DomBuilder t m, MonadHold t m, MonadFix m, Semigroup w) => DomBuilder
placeRawElement = lift . placeRawElement
wrapRawElement e = lift . wrapRawElement e

instance (DomBuilder t m, MonadFix m, MonadHold t m, Group q, Query q, Additive q, Eq q) => DomBuilder t (QueryT t q m) where
instance (DomBuilder t m, MonadFix m, MonadHold t m, Group q, Query q, Commutative q, Eq q) => DomBuilder t (QueryT t q m) where
type DomBuilderSpace (QueryT t q m) = DomBuilderSpace m
textNode = liftTextNode
commentNode = liftCommentNode
Expand Down
3 changes: 2 additions & 1 deletion reflex-dom-core/src/Reflex/Dom/Prerender.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Control.Monad.Reader
import Control.Monad.Ref (MonadRef(..), MonadAtomicRef(..))
import Data.IORef (IORef, newIORef)
import Data.Semigroup (Semigroup)
import Data.Semigroup.Commutative
import Data.Text (Text)
import Data.Void
import Foreign.JavaScript.TH
Expand Down Expand Up @@ -246,7 +247,7 @@ instance (Prerender t m, MonadFix m, Reflex t) => Prerender t (RequesterT t requ
responses <- fmap (fmapCheap unMultiEntry) $ requesting' $ fmapCheap multiEntry $ switchPromptlyDyn requestsDyn
return result

instance (Prerender t m, Monad m, Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q) => Prerender t (QueryT t q m) where
instance (Prerender t m, Monad m, Reflex t, MonadFix m, Group q, Commutative q, Query q, Eq q) => Prerender t (QueryT t q m) where
type Client (QueryT t q m) = QueryT t q (Client m)
prerender server client = mdo
result <- queryDyn query
Expand Down
5 changes: 3 additions & 2 deletions reflex-dom-core/src/Reflex/Dom/WebSocket/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ module Reflex.Dom.WebSocket.Query (cropQueryT, runWebSocketQuery) where

import Data.Default
import Control.Monad.Fix
import Data.Semigroup.Commutative
import Data.Text (Text)
import Data.Aeson
import Reflex
import Reflex.Dom.WebSocket
import Data.Maybe
import Language.Javascript.JSaddle.Types (MonadJSM)

runWebSocketQuery :: (MonadJSM m, MonadJSM (Performable m), PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, Reflex t, ToJSON q, MonadFix m, Query q, FromJSON (QueryResult q), Additive q, Group q, Eq q)
runWebSocketQuery :: (MonadJSM m, MonadJSM (Performable m), PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, Reflex t, ToJSON q, MonadFix m, Query q, FromJSON (QueryResult q), Commutative q, Group q, Eq q)
=> QueryT t q m a
-> Text -- ^ WebSocket url
-> m a
Expand All @@ -22,7 +23,7 @@ runWebSocketQuery app url = do
let updatedRequest = leftmost [updated request, tag (current request) postBuild]
return a

cropQueryT :: (Reflex t, MonadHold t m, MonadFix m, Query q, Additive q, Group q, Eq q)
cropQueryT :: (Reflex t, MonadHold t m, MonadFix m, Query q, Commutative q, Group q, Eq q)
=> QueryT t q m a
-> Event t (QueryResult q)
-> m (a, Dynamic t q)
Expand Down
1 change: 1 addition & 0 deletions reflex-dom-core/test/hlint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ main = do
, "--ignore=Use <$>"
, "--ignore=Reduce duplication" --TODO: Re-enable this test
, "--ignore=Use list comprehension"
, "--ignore=Evaluate"
, "--cpp-define=USE_TEMPLATE_HASKELL"
]
if null ideas then exitSuccess else exitFailure
17 changes: 17 additions & 0 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ let
reflex-platform = reflex-platform-fun {
inherit system;
haskellOverlays = [
(self: super: {
commutative-semigroups = self.callHackageDirect {
pkg = "commutative-semigroups";
ver = "0.1.0.0";
sha256 = "0xmv20n3iqjc64xi3c91bwqrg8x79sgipmflmk21zz4rj9jdkv8i";
} {};
reflex = self.callHackageDirect {
pkg = "reflex";
ver = "0.8.2.1";
sha256 = "10d1qkqwaqp9zaswmziaqgz60ifg5383d2i2ml2cqccn8943h26b";
} {};
patch = self.callHackageDirect {
pkg = "patch";
ver = "0.0.7.0";
sha256 = "0yr2hk3fpwjxi1z0n384k3aq9b3z00c02bbwqybcj3n20l4k17l6";
} {};
})
# Use this package's source for reflex
(self: super: {
_dep = super._dep // {
Expand Down
13 changes: 7 additions & 6 deletions test/reflex-dom-reexports.hs
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
-- This tests that reflex-dom re-exports all of reflex-dom-core's modules.
-- Without this test they easily drift.
{-# Language CPP #-}
module Main where

import Control.Monad (when)
import Data.List (intercalate)
import Data.Maybe (fromMaybe, isNothing, mapMaybe)
import qualified Data.Set as Set
import Distribution.Types.PackageName (mkPackageName)
import Distribution.Compiler (CompilerFlavor (GHC))
import Distribution.Compiler (CompilerFlavor(GHC))
import Distribution.ModuleName (ModuleName, components)
import Distribution.PackageDescription.Parsec (parseGenericPackageDescription)
import qualified Distribution.Parsec.Common as Dist
import Distribution.Parsec.ParseResult (runParseResult)
import Distribution.PackageDescription.Parsec (runParseResult)
import qualified Distribution.System as Dist
import Distribution.Types.BuildInfo (buildable, defaultExtensions, defaultLanguage, hsSourceDirs, options)
import Distribution.Types.CondTree (simplifyCondTree)
import Distribution.Types.GenericPackageDescription (ConfVar (Arch, Impl, OS), condLibrary)
import Distribution.Types.GenericPackageDescription (ConfVar(Arch, Impl, OS), condLibrary)
import Distribution.Types.Library (exposedModules, libBuildInfo, reexportedModules)
import Distribution.Types.ModuleReexport (ModuleReexport, moduleReexportOriginalName, moduleReexportOriginalPackage)
import Distribution.Utils.Generic (toUTF8BS, readUTF8File)
import Distribution.Types.PackageName (mkPackageName)
import Distribution.Utils.Generic (readUTF8File, toUTF8BS)
import System.Environment (getArgs)
import qualified System.Info


main :: IO ()
main = do
[reflexDomFile, reflexDomCoreFile] <- getArgs
Expand Down

0 comments on commit 6b8f6e8

Please sign in to comment.