on develop help sign in
Re-enable hlint test
ba77facRyan Trinkle
reflex.cabal+8−7
@@ -43,6 +43,7 @@ library
43 prim-uniq >= 0.1.0.1 && < 0.2,
43 prim-uniq >= 0.1.0.1 && < 0.2,
44 primitive >= 0.5 && < 0.7,
44 primitive >= 0.5 && < 0.7,
45 ref-tf == 0.4.*,
45 ref-tf == 0.4.*,
46+ reflection == 2.1.*,
46 semigroupoids >= 4.0 && < 6,
47 semigroupoids >= 4.0 && < 6,
47 semigroups >= 0.16 && < 0.19,
48 semigroups >= 0.16 && < 0.19,
48 stm == 2.4.*,
49 stm == 2.4.*,
@@ -100,13 +101,13 @@ test-suite semantics
100 if flag(specialize-to-spidertimeline-global)
101 if flag(specialize-to-spidertimeline-global)
101 buildable: False
102 buildable: False
102
103
103−--test-suite hlint
104+test-suite hlint
104−-- type: exitcode-stdio-1.0
105+ type: exitcode-stdio-1.0
105−-- main-is: hlint.hs
106+ main-is: hlint.hs
106−-- hs-source-dirs: test
107+ hs-source-dirs: test
107−-- build-depends: base, hlint == 1.9.*
108+ build-depends: base, hlint == 1.9.*
108−-- if impl(ghcjs)
109+ if impl(ghcjs)
109−-- buildable: False
110+ buildable: False
110
111
111benchmark spider-bench
112benchmark spider-bench
112 type: exitcode-stdio-1.0
113 type: exitcode-stdio-1.0
src/Reflex/Class.hs+1−3
@@ -1,6 +1,4 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE CPP #-}
2−{-# LANGUAGE DeriveFunctor #-}
3−{-# LANGUAGE EmptyDataDecls #-}
4{-# LANGUAGE FlexibleContexts #-}
2{-# LANGUAGE FlexibleContexts #-}
5{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
6{-# LANGUAGE FunctionalDependencies #-}
4{-# LANGUAGE FunctionalDependencies #-}
@@ -12,7 +10,6 @@
12{-# LANGUAGE RecursiveDo #-}
10{-# LANGUAGE RecursiveDo #-}
13{-# LANGUAGE RoleAnnotations #-}
11{-# LANGUAGE RoleAnnotations #-}
14{-# LANGUAGE ScopedTypeVariables #-}
12{-# LANGUAGE ScopedTypeVariables #-}
15−{-# LANGUAGE StandaloneDeriving #-}
16{-# LANGUAGE TypeFamilies #-}
13{-# LANGUAGE TypeFamilies #-}
17{-# LANGUAGE TypeOperators #-}
14{-# LANGUAGE TypeOperators #-}
18{-# LANGUAGE UndecidableInstances #-}
15{-# LANGUAGE UndecidableInstances #-}
@@ -20,6 +17,7 @@
20{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
17{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
21#endif
18#endif
22#ifdef SPECIALIZE_TO_SPIDERTIMELINE_GLOBAL
19#ifdef SPECIALIZE_TO_SPIDERTIMELINE_GLOBAL
20+{-# LANGUAGE EmptyDataDecls #-}
23{-# OPTIONS_GHC -Wno-redundant-constraints #-}
21{-# OPTIONS_GHC -Wno-redundant-constraints #-}
24#endif
22#endif
25
23
src/Reflex/DynamicWriter.hs+2−2
@@ -174,9 +174,9 @@ instance (MonadAdjust t m, MonadFix m, Monoid w, MonadHold t m, Reflex t) => Mon
174 liftedResult' = ffor result' $ \(PatchDMap p) -> PatchDMap $
174 liftedResult' = ffor result' $ \(PatchDMap p) -> PatchDMap $
175 mapKeyValuePairsMonotonic (\(WrapArg k :=> ComposeMaybe mr) -> k :=> ComposeMaybe (fmap (Identity . getValue . runIdentity) mr)) p
175 mapKeyValuePairsMonotonic (\(WrapArg k :=> ComposeMaybe mr) -> k :=> ComposeMaybe (fmap (Identity . getValue . runIdentity) mr)) p
176 liftedWritten0 :: Map (Some k) (Dynamic t w)
176 liftedWritten0 :: Map (Some k) (Dynamic t w)
177− liftedWritten0 = Map.fromDistinctAscList $ fmap (\(WrapArg k :=> Identity r) -> (Some.This k, getWritten r)) $ DMap.toList result0
177+ liftedWritten0 = Map.fromDistinctAscList $ (\(WrapArg k :=> Identity r) -> (Some.This k, getWritten r)) <$> DMap.toList result0
178 liftedWritten' = ffor result' $ \(PatchDMap p) -> PatchMap $
178 liftedWritten' = ffor result' $ \(PatchDMap p) -> PatchMap $
179− Map.fromDistinctAscList $ fmap (\(WrapArg k :=> ComposeMaybe mr) -> (Some.This k, fmap (getWritten . runIdentity) mr)) $ DMap.toList p
179+ Map.fromDistinctAscList $ (\(WrapArg k :=> ComposeMaybe mr) -> (Some.This k, fmap (getWritten . runIdentity) mr)) <$> DMap.toList p
180 --TODO: We should be able to improve the performance here by incrementally updating the mconcat of the merged Dynamics
180 --TODO: We should be able to improve the performance here by incrementally updating the mconcat of the merged Dynamics
181 i <- holdIncremental liftedWritten0 liftedWritten'
181 i <- holdIncremental liftedWritten0 liftedWritten'
182 tellDyn $ fmap (mconcat . Map.elems) $ incrementalToDynamic $ mergeDynIncremental i
182 tellDyn $ fmap (mconcat . Map.elems) $ incrementalToDynamic $ mergeDynIncremental i
src/Reflex/Spider/Internal.hs−5
@@ -203,14 +203,10 @@ subscribeAndRead = unEvent
203"cacheEvent/pushCheap" forall f e. pushCheap f (cacheEvent e) = cacheEvent (pushCheap f e)
203"cacheEvent/pushCheap" forall f e. pushCheap f (cacheEvent e) = cacheEvent (pushCheap f e)
204"hold/cacheEvent" forall f e. hold f (cacheEvent e) = hold f e
204"hold/cacheEvent" forall f e. hold f (cacheEvent e) = hold f e
205 #-}
205 #-}
206−{- RULES
207− "subscribeAndRead/cacheEvent" forall e. subscribeAndRead (cacheEvent e) = subscribeAndRead e
208− #-}
209
206
210-- | Construct an 'Event' equivalent to that constructed by 'push', but with no
207-- | Construct an 'Event' equivalent to that constructed by 'push', but with no
211-- caching; if the computation function is very cheap, this is (much) more
208-- caching; if the computation function is very cheap, this is (much) more
212-- efficient than 'push'
209-- efficient than 'push'
213−{- INLINE [1] pushCheap #-}
214{-# NOINLINE pushCheap #-}
210{-# NOINLINE pushCheap #-}
215pushCheap :: HasSpiderTimeline x => (a -> ComputeM x (Maybe b)) -> Event x a -> Event x b
211pushCheap :: HasSpiderTimeline x => (a -> ComputeM x (Maybe b)) -> Event x a -> Event x b
216pushCheap f e = Event $ \sub -> do
212pushCheap f e = Event $ \sub -> do
@@ -803,7 +799,6 @@ instance HasSpiderTimeline x => Defer (SomeResetCoincidence x) (EventM x) where
803 getDeferralQueue = asksEventEnv eventEnvResetCoincidences
799 getDeferralQueue = asksEventEnv eventEnvResetCoincidences
804
800
805-- Note: hold cannot examine its event until after the phase is over
801-- Note: hold cannot examine its event until after the phase is over
806−{- SPECIALIZE hold :: (HasSpiderTimeline x, Patch p) => PatchTarget p -> Event x p -> EventM x (Hold x p) #-}
807{-# INLINE [1] hold #-}
802{-# INLINE [1] hold #-}
808hold :: (Patch p, Defer (SomeHoldInit x) m) => PatchTarget p -> Event x p -> m (Hold x p)
803hold :: (Patch p, Defer (SomeHoldInit x) m) => PatchTarget p -> Event x p -> m (Hold x p)
809hold v0 e = do
804hold v0 e = do