on develop help sign in
Support -f-use-template-haskell better, and bump upper bound of 'base'
commitb38fae6cfd7e886778053c66a04d6febe8a533ce authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 22 Jan 2017, 22:24 (10 years ago) parent7c3efd4
5 files changed+17−3
default.nix+8−2 reflex.cabal+1−1 src/Reflex/Class.hs+2 src/Reflex/Dynamic.hs+2 src/Reflex/Spider/Internal.hs+4
default.nix+8−2
@@ -5,6 +5,7 @@
55, semigroups, split, stdenv, stm, syb, template-haskell
66, these, transformers, transformers-compat, prim-uniq
77, data-default
8+, useTemplateHaskell ? true
89}:
910mkDerivation {
1011 pname = "reflex";
@@ -12,16 +13,21 @@ mkDerivation {
1213 src = builtins.filterSource (path: type: baseNameOf path != ".git") ./.;
1314 libraryHaskellDepends = [
1415 base bifunctors containers dependent-map dependent-sum
15− exception-transformers haskell-src-exts haskell-src-meta lens
16+ exception-transformers lens
1617 MemoTrie monad-control mtl primitive ref-tf semigroupoids
1718 semigroups stm syb template-haskell these transformers
1819 transformers-compat prim-uniq
1920 base bifunctors containers deepseq dependent-map dependent-sum
2021 mtl ref-tf split transformers data-default
21− ];
22+ ] ++ (if !useTemplateHaskell then [] else [
23+ haskell-src-exts haskell-src-meta
24+ ]);
2225 testHaskellDepends = if ghc.isGhcjs or false then [] else [
2326 hlint
2427 ];
28+ configureFlags = if useTemplateHaskell then [] else [
29+ "-f-use-template-haskell"
30+ ];
2531 homepage = "https://github.com/reflex-frp/reflex";
2632 description = "Higher-order Functional Reactive Programming";
2733 license = stdenv.lib.licenses.bsd3;
reflex.cabal+1−1
@@ -32,7 +32,7 @@ library
3232 hs-source-dirs: src
3333 build-depends:
3434 MemoTrie == 0.6.*,
35− base >= 4.7 && < 4.10,
35+ base >= 4.7 && < 4.11,
3636 bifunctors >= 5.2 && < 5.5,
3737 containers == 0.5.*,
3838 data-default >= 0.5 && < 0.8,
src/Reflex/Class.hs+2
@@ -913,7 +913,9 @@ onceE = headE
913913
914914-- | Run both sides of a 'These' monadically, combining the results.
915915{-# DEPRECATED sequenceThese "Use bisequenceA or bisequence from the bifunctors package instead" #-}
916+#ifdef USE_TEMPLATE_HASKELL
916917{-# ANN sequenceThese "HLint: ignore Use fmap" #-}
918+#endif
917919sequenceThese :: Monad m => These (m a) (m b) -> m (These a b)
918920sequenceThese t = case t of
919921 This ma -> liftM This ma
src/Reflex/Dynamic.hs+2
@@ -515,7 +515,9 @@ combineDyn f a b = return $ zipDynWith f a b
515515-- > `apDyn` dynAge
516516-- > `apDyn` dynAddress
517517{-# 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
518519{-# ANN apDyn "HLint: ignore Use fmap" #-}
520+#endif
519521apDyn :: forall t m a b. (Reflex t, Monad m)
520522 => m (Dynamic t (a -> b))
521523 -> Dynamic t a
src/Reflex/Spider/Internal.hs+4
@@ -1019,7 +1019,9 @@ data Switch x a
10191019 , switchSubscribed :: !(IORef (Maybe (SwitchSubscribed x a)))
10201020 }
10211021
1022+#ifdef USE_TEMPLATE_HASKELL
10221023{-# ANN CoincidenceSubscribed "HLint: ignore Redundant bracket" #-}
1024+#endif
10231025data CoincidenceSubscribed x a
10241026 = CoincidenceSubscribed { coincidenceSubscribedCachedSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a)))
10251027 , coincidenceSubscribedOccurrence :: !(IORef (Maybe a))
@@ -1338,7 +1340,9 @@ getRootSubscribed k r sub = do
13381340 occ <- getOcc
13391341 return (sln, subscribed, occ)
13401342
1343+#ifdef USE_TEMPLATE_HASKELL
13411344{-# ANN cleanupRootSubscribed "HLint: ignore Redundant bracket" #-}
1345+#endif
13421346cleanupRootSubscribed :: RootSubscribed x a -> IO ()
13431347cleanupRootSubscribed self@(RootSubscribed { rootSubscribedKey = k, rootSubscribedCachedSubscribed = cached }) = do
13441348 rootSubscribedUninit self