on develop help sign in
Re-enable hlint test
commitba77fac1842c81746335288a9205754d9d876a5b authorRyan Trinkle <ryan.trinkle@gmail.com> dateSun 13 Nov 2016, 13:20 (10 years ago) parentc6171b4
4 files changed+11−17
reflex.cabal+8−7 src/Reflex/Class.hs+1−3 src/Reflex/DynamicWriter.hs+2−2 src/Reflex/Spider/Internal.hs−5
reflex.cabal+8−7
@@ -43,6 +43,7 @@ library
4343 prim-uniq >= 0.1.0.1 && < 0.2,
4444 primitive >= 0.5 && < 0.7,
4545 ref-tf == 0.4.*,
46+ reflection == 2.1.*,
4647 semigroupoids >= 4.0 && < 6,
4748 semigroups >= 0.16 && < 0.19,
4849 stm == 2.4.*,
@@ -100,13 +101,13 @@ test-suite semantics
100101 if flag(specialize-to-spidertimeline-global)
101102 buildable: False
102103
103−--test-suite hlint
104−-- type: exitcode-stdio-1.0
105−-- main-is: hlint.hs
106−-- hs-source-dirs: test
107−-- build-depends: base, hlint == 1.9.*
108−-- if impl(ghcjs)
109−-- buildable: False
104+test-suite hlint
105+ type: exitcode-stdio-1.0
106+ main-is: hlint.hs
107+ hs-source-dirs: test
108+ build-depends: base, hlint == 1.9.*
109+ if impl(ghcjs)
110+ buildable: False
110111
111112benchmark spider-bench
112113 type: exitcode-stdio-1.0
src/Reflex/Class.hs+1−3
@@ -1,6 +1,4 @@
11{-# LANGUAGE CPP #-}
2−{-# LANGUAGE DeriveFunctor #-}
3−{-# LANGUAGE EmptyDataDecls #-}
42{-# LANGUAGE FlexibleContexts #-}
53{-# LANGUAGE FlexibleInstances #-}
64{-# LANGUAGE FunctionalDependencies #-}
@@ -12,7 +10,6 @@
1210{-# LANGUAGE RecursiveDo #-}
1311{-# LANGUAGE RoleAnnotations #-}
1412{-# LANGUAGE ScopedTypeVariables #-}
15−{-# LANGUAGE StandaloneDeriving #-}
1613{-# LANGUAGE TypeFamilies #-}
1714{-# LANGUAGE TypeOperators #-}
1815{-# LANGUAGE UndecidableInstances #-}
@@ -20,6 +17,7 @@
2017{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
2118#endif
2219#ifdef SPECIALIZE_TO_SPIDERTIMELINE_GLOBAL
20+{-# LANGUAGE EmptyDataDecls #-}
2321{-# OPTIONS_GHC -Wno-redundant-constraints #-}
2422#endif
2523
src/Reflex/DynamicWriter.hs+2−2
@@ -174,9 +174,9 @@ instance (MonadAdjust t m, MonadFix m, Monoid w, MonadHold t m, Reflex t) => Mon
174174 liftedResult' = ffor result' $ \(PatchDMap p) -> PatchDMap $
175175 mapKeyValuePairsMonotonic (\(WrapArg k :=> ComposeMaybe mr) -> k :=> ComposeMaybe (fmap (Identity . getValue . runIdentity) mr)) p
176176 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
178178 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
180180 --TODO: We should be able to improve the performance here by incrementally updating the mconcat of the merged Dynamics
181181 i <- holdIncremental liftedWritten0 liftedWritten'
182182 tellDyn $ fmap (mconcat . Map.elems) $ incrementalToDynamic $ mergeDynIncremental i
src/Reflex/Spider/Internal.hs−5
@@ -203,14 +203,10 @@ subscribeAndRead = unEvent
203203"cacheEvent/pushCheap" forall f e. pushCheap f (cacheEvent e) = cacheEvent (pushCheap f e)
204204"hold/cacheEvent" forall f e. hold f (cacheEvent e) = hold f e
205205 #-}
206−{- RULES
207− "subscribeAndRead/cacheEvent" forall e. subscribeAndRead (cacheEvent e) = subscribeAndRead e
208− #-}
209206
210207-- | Construct an 'Event' equivalent to that constructed by 'push', but with no
211208-- caching; if the computation function is very cheap, this is (much) more
212209-- efficient than 'push'
213−{- INLINE [1] pushCheap #-}
214210{-# NOINLINE pushCheap #-}
215211pushCheap :: HasSpiderTimeline x => (a -> ComputeM x (Maybe b)) -> Event x a -> Event x b
216212pushCheap f e = Event $ \sub -> do
@@ -803,7 +799,6 @@ instance HasSpiderTimeline x => Defer (SomeResetCoincidence x) (EventM x) where
803799 getDeferralQueue = asksEventEnv eventEnvResetCoincidences
804800
805801-- 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) #-}
807802{-# INLINE [1] hold #-}
808803hold :: (Patch p, Defer (SomeHoldInit x) m) => PatchTarget p -> Event x p -> m (Hold x p)
809804hold v0 e = do