on develop help sign in
Support -f-use-template-haskell better, and bump upper bound of 'base'
b38fae6Ryan Trinkle
default.nix+8−2
@@ -5,6 +5,7 @@
5, semigroups, split, stdenv, stm, syb, template-haskell
5, semigroups, split, stdenv, stm, syb, template-haskell
6, these, transformers, transformers-compat, prim-uniq
6, these, transformers, transformers-compat, prim-uniq
7, data-default
7, data-default
8+, useTemplateHaskell ? true
8}:
9}:
9mkDerivation {
10mkDerivation {
10 pname = "reflex";
11 pname = "reflex";
@@ -12,16 +13,21 @@ mkDerivation {
12 src = builtins.filterSource (path: type: baseNameOf path != ".git") ./.;
13 src = builtins.filterSource (path: type: baseNameOf path != ".git") ./.;
13 libraryHaskellDepends = [
14 libraryHaskellDepends = [
14 base bifunctors containers dependent-map dependent-sum
15 base bifunctors containers dependent-map dependent-sum
15− exception-transformers haskell-src-exts haskell-src-meta lens
16+ exception-transformers lens
16 MemoTrie monad-control mtl primitive ref-tf semigroupoids
17 MemoTrie monad-control mtl primitive ref-tf semigroupoids
17 semigroups stm syb template-haskell these transformers
18 semigroups stm syb template-haskell these transformers
18 transformers-compat prim-uniq
19 transformers-compat prim-uniq
19 base bifunctors containers deepseq dependent-map dependent-sum
20 base bifunctors containers deepseq dependent-map dependent-sum
20 mtl ref-tf split transformers data-default
21 mtl ref-tf split transformers data-default
22+ ] ++ (if !useTemplateHaskell then [] else [
23+ haskell-src-exts haskell-src-meta
21− ];
24+ ]);
22 testHaskellDepends = if ghc.isGhcjs or false then [] else [
25 testHaskellDepends = if ghc.isGhcjs or false then [] else [
23 hlint
26 hlint
24 ];
27 ];
28+ configureFlags = if useTemplateHaskell then [] else [
29+ "-f-use-template-haskell"
30+ ];
25 homepage = "https://github.com/reflex-frp/reflex";
31 homepage = "https://github.com/reflex-frp/reflex";
26 description = "Higher-order Functional Reactive Programming";
32 description = "Higher-order Functional Reactive Programming";
27 license = stdenv.lib.licenses.bsd3;
33 license = stdenv.lib.licenses.bsd3;
reflex.cabal+1−1
@@ -32,7 +32,7 @@ library
32 hs-source-dirs: src
32 hs-source-dirs: src
33 build-depends:
33 build-depends:
34 MemoTrie == 0.6.*,
34 MemoTrie == 0.6.*,
35− base >= 4.7 && < 4.10,
35+ base >= 4.7 && < 4.11,
36 bifunctors >= 5.2 && < 5.5,
36 bifunctors >= 5.2 && < 5.5,
37 containers == 0.5.*,
37 containers == 0.5.*,
38 data-default >= 0.5 && < 0.8,
38 data-default >= 0.5 && < 0.8,
src/Reflex/Class.hs+2
@@ -913,7 +913,9 @@ onceE = headE
913
913
914-- | Run both sides of a 'These' monadically, combining the results.
914-- | Run both sides of a 'These' monadically, combining the results.
915{-# DEPRECATED sequenceThese "Use bisequenceA or bisequence from the bifunctors package instead" #-}
915{-# DEPRECATED sequenceThese "Use bisequenceA or bisequence from the bifunctors package instead" #-}
916+#ifdef USE_TEMPLATE_HASKELL
916{-# ANN sequenceThese "HLint: ignore Use fmap" #-}
917{-# ANN sequenceThese "HLint: ignore Use fmap" #-}
918+#endif
917sequenceThese :: Monad m => These (m a) (m b) -> m (These a b)
919sequenceThese :: Monad m => These (m a) (m b) -> m (These a b)
918sequenceThese t = case t of
920sequenceThese t = case t of
919 This ma -> liftM This ma
921 This ma -> liftM This ma
src/Reflex/Dynamic.hs+2
@@ -515,7 +515,9 @@ combineDyn f a b = return $ zipDynWith f a b
515-- > `apDyn` dynAge
515-- > `apDyn` dynAge
516-- > `apDyn` dynAddress
516-- > `apDyn` dynAddress
517{-# DEPRECATED apDyn "Use 'ffor m (<*> a)' instead of 'apDyn m a'; consider eliminating monadic style, since Dynamics are now Applicative and can be used with applicative style directly" #-}
517{-# DEPRECATED apDyn "Use 'ffor m (<*> a)' instead of 'apDyn m a'; consider eliminating monadic style, since Dynamics are now Applicative and can be used with applicative style directly" #-}
518+#ifdef USE_TEMPLATE_HASKELL
518{-# ANN apDyn "HLint: ignore Use fmap" #-}
519{-# ANN apDyn "HLint: ignore Use fmap" #-}
520+#endif
519apDyn :: forall t m a b. (Reflex t, Monad m)
521apDyn :: forall t m a b. (Reflex t, Monad m)
520 => m (Dynamic t (a -> b))
522 => m (Dynamic t (a -> b))
521 -> Dynamic t a
523 -> Dynamic t a
src/Reflex/Spider/Internal.hs+4
@@ -1019,7 +1019,9 @@ data Switch x a
1019 , switchSubscribed :: !(IORef (Maybe (SwitchSubscribed x a)))
1019 , switchSubscribed :: !(IORef (Maybe (SwitchSubscribed x a)))
1020 }
1020 }
1021
1021
1022+#ifdef USE_TEMPLATE_HASKELL
1022{-# ANN CoincidenceSubscribed "HLint: ignore Redundant bracket" #-}
1023{-# ANN CoincidenceSubscribed "HLint: ignore Redundant bracket" #-}
1024+#endif
1023data CoincidenceSubscribed x a
1025data CoincidenceSubscribed x a
1024 = CoincidenceSubscribed { coincidenceSubscribedCachedSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a)))
1026 = CoincidenceSubscribed { coincidenceSubscribedCachedSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a)))
1025 , coincidenceSubscribedOccurrence :: !(IORef (Maybe a))
1027 , coincidenceSubscribedOccurrence :: !(IORef (Maybe a))
@@ -1338,7 +1340,9 @@ getRootSubscribed k r sub = do
1338 occ <- getOcc
1340 occ <- getOcc
1339 return (sln, subscribed, occ)
1341 return (sln, subscribed, occ)
1340
1342
1343+#ifdef USE_TEMPLATE_HASKELL
1341{-# ANN cleanupRootSubscribed "HLint: ignore Redundant bracket" #-}
1344{-# ANN cleanupRootSubscribed "HLint: ignore Redundant bracket" #-}
1345+#endif
1342cleanupRootSubscribed :: RootSubscribed x a -> IO ()
1346cleanupRootSubscribed :: RootSubscribed x a -> IO ()
1343cleanupRootSubscribed self@(RootSubscribed { rootSubscribedKey = k, rootSubscribedCachedSubscribed = cached }) = do
1347cleanupRootSubscribed self@(RootSubscribed { rootSubscribedKey = k, rootSubscribedCachedSubscribed = cached }) = do
1344 rootSubscribedUninit self
1348 rootSubscribedUninit self