on develop help sign in
Fix lint failures; Remove overridden dependent-map
commit9a63788b30f799e17d31d5fb66fffd56affc6fc1 authorAli Abrar <aliabrar@gmail.com> dateMon 5 Aug 2019, 00:02 (7 years ago) parent8ea09b3
17 files changed+4−34
.travis.yml−10 cabal.project−5 src/Data/Functor/Misc.hs−1 src/Reflex/Adjustable/Class.hs−1 src/Reflex/BehaviorWriter/Class.hs−1 src/Reflex/Class.hs−1 src/Reflex/EventWriter/Class.hs−1 src/Reflex/Host/Class.hs−1 src/Reflex/NotReady/Class.hs−1 src/Reflex/PerformEvent/Class.hs−1 src/Reflex/PostBuild/Class.hs−1 src/Reflex/Query/Base.hs−1 src/Reflex/Query/Class.hs−1 src/Reflex/Requester/Class.hs−1 src/Reflex/Spider/Internal.hs+2−3 test/EventWriterT.hs+1−4 test/hlint.hs+1
.travis.yml−10
@@ -120,11 +120,6 @@ install:
120120 - |
121121 echo "packages: ." >> cabal.project
122122 - |
123− echo "source-repository-package" >> cabal.project
124− echo " type: git" >> cabal.project
125− echo " location: https://github.com/obsidiansystems/dependent-map.git" >> cabal.project
126− echo " tag: a9a438b1fd974891e4ed57cbd43e305cf7c759a9" >> cabal.project
127− echo "" >> cabal.project
128123 echo "source-repository-package" >> cabal.project
129124 echo " type: git" >> cabal.project
130125 echo " location: https://github.com/phadej/monoidal-containers.git" >> cabal.project
@@ -152,11 +147,6 @@ script:
152147 - |
153148 echo "packages: ${PKGDIR_reflex}" >> cabal.project
154149 - |
155− echo "source-repository-package" >> cabal.project
156− echo " type: git" >> cabal.project
157− echo " location: https://github.com/obsidiansystems/dependent-map.git" >> cabal.project
158− echo " tag: a9a438b1fd974891e4ed57cbd43e305cf7c759a9" >> cabal.project
159− echo "" >> cabal.project
160150 echo "source-repository-package" >> cabal.project
161151 echo " type: git" >> cabal.project
162152 echo " location: https://github.com/phadej/monoidal-containers.git" >> cabal.project
cabal.project−5
@@ -1,6 +1 @@
11packages: .
2−
3−source-repository-package
4− type: git
5− location: https://github.com/phadej/monoidal-containers.git
6− tag: f8860ba08385f77128efb45fb9193e6d287e893f
src/Data/Functor/Misc.hs−1
@@ -4,7 +4,6 @@
44{-# LANGUAGE FlexibleContexts #-}
55{-# LANGUAGE FlexibleInstances #-}
66{-# LANGUAGE GADTs #-}
7−{-# LANGUAGE KindSignatures #-}
87{-# LANGUAGE LambdaCase #-}
98{-# LANGUAGE MultiParamTypeClasses #-}
109{-# LANGUAGE PatternSynonyms #-}
src/Reflex/Adjustable/Class.hs−1
@@ -3,7 +3,6 @@
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE FunctionalDependencies #-}
55{-# LANGUAGE LambdaCase #-}
6−{-# LANGUAGE MultiParamTypeClasses #-}
76{-# LANGUAGE RankNTypes #-}
87{-# LANGUAGE ScopedTypeVariables #-}
98{-# LANGUAGE TypeFamilies #-}
src/Reflex/BehaviorWriter/Class.hs−1
@@ -5,7 +5,6 @@ Description: This module defines the 'MonadBehaviorWriter' class
55{-# LANGUAGE CPP #-}
66{-# LANGUAGE FlexibleInstances #-}
77{-# LANGUAGE FunctionalDependencies #-}
8−{-# LANGUAGE MultiParamTypeClasses #-}
98{-# LANGUAGE UndecidableInstances #-}
109#ifdef USE_REFLEX_OPTIMIZER
1110{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
src/Reflex/Class.hs−1
@@ -7,7 +7,6 @@
77{-# LANGUAGE FunctionalDependencies #-}
88{-# LANGUAGE GADTs #-}
99{-# LANGUAGE LambdaCase #-}
10−{-# LANGUAGE MultiParamTypeClasses #-}
1110{-# LANGUAGE NoMonomorphismRestriction #-}
1211{-# LANGUAGE PolyKinds #-}
1312{-# LANGUAGE RankNTypes #-}
src/Reflex/EventWriter/Class.hs−1
@@ -2,7 +2,6 @@
22{-# LANGUAGE CPP #-}
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE FunctionalDependencies #-}
5−{-# LANGUAGE MultiParamTypeClasses #-}
65{-# LANGUAGE UndecidableInstances #-}
76#ifdef USE_REFLEX_OPTIMIZER
87{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
src/Reflex/Host/Class.hs−1
@@ -4,7 +4,6 @@
44{-# LANGUAGE FlexibleInstances #-}
55{-# LANGUAGE FunctionalDependencies #-}
66{-# LANGUAGE GADTs #-}
7−{-# LANGUAGE MultiParamTypeClasses #-}
87{-# LANGUAGE RankNTypes #-}
98{-# LANGUAGE RoleAnnotations #-}
109{-# LANGUAGE ScopedTypeVariables #-}
src/Reflex/NotReady/Class.hs−1
@@ -3,7 +3,6 @@
33{-# LANGUAGE FlexibleContexts #-}
44{-# LANGUAGE FlexibleInstances #-}
55{-# LANGUAGE FunctionalDependencies #-}
6−{-# LANGUAGE MultiParamTypeClasses #-}
76{-# LANGUAGE TypeFamilies #-}
87{-# LANGUAGE UndecidableInstances #-}
98#ifdef USE_REFLEX_OPTIMIZER
src/Reflex/PerformEvent/Class.hs−1
@@ -5,7 +5,6 @@
55{-# LANGUAGE FlexibleContexts #-}
66{-# LANGUAGE FlexibleInstances #-}
77{-# LANGUAGE FunctionalDependencies #-}
8−{-# LANGUAGE MultiParamTypeClasses #-}
98{-# LANGUAGE RankNTypes #-}
109{-# LANGUAGE ScopedTypeVariables #-}
1110{-# LANGUAGE TypeFamilies #-}
src/Reflex/PostBuild/Class.hs−1
@@ -4,7 +4,6 @@
44{-# LANGUAGE DataKinds #-}
55{-# LANGUAGE FlexibleInstances #-}
66{-# LANGUAGE FunctionalDependencies #-}
7−{-# LANGUAGE MultiParamTypeClasses #-}
87{-# LANGUAGE ScopedTypeVariables #-}
98{-# LANGUAGE TypeFamilies #-}
109{-# LANGUAGE TypeOperators #-}
src/Reflex/Query/Base.hs−1
@@ -1,7 +1,6 @@
11{-# LANGUAGE FlexibleInstances #-}
22{-# LANGUAGE GeneralizedNewtypeDeriving #-}
33{-# LANGUAGE InstanceSigs #-}
4−{-# LANGUAGE KindSignatures #-}
54{-# LANGUAGE LambdaCase #-}
65{-# LANGUAGE MultiParamTypeClasses #-}
76{-# LANGUAGE RankNTypes #-}
src/Reflex/Query/Class.hs−1
@@ -3,7 +3,6 @@
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE FunctionalDependencies #-}
55{-# LANGUAGE GeneralizedNewtypeDeriving #-}
6−{-# LANGUAGE MultiParamTypeClasses #-}
76{-# LANGUAGE TypeFamilies #-}
87{-# LANGUAGE UndecidableInstances #-}
98-- |
src/Reflex/Requester/Class.hs−1
@@ -6,7 +6,6 @@
66{-# LANGUAGE CPP #-}
77{-# LANGUAGE FlexibleInstances #-}
88{-# LANGUAGE FunctionalDependencies #-}
9−{-# LANGUAGE MultiParamTypeClasses #-}
109{-# LANGUAGE RecursiveDo #-}
1110{-# LANGUAGE TypeFamilies #-}
1211{-# LANGUAGE UndecidableInstances #-}
src/Reflex/Spider/Internal.hs+2−3
@@ -9,7 +9,6 @@
99{-# LANGUAGE GADTs #-}
1010{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1111{-# LANGUAGE LambdaCase #-}
12−{-# LANGUAGE MultiParamTypeClasses #-}
1312{-# LANGUAGE MultiWayIf #-}
1413{-# LANGUAGE RankNTypes #-}
1514{-# LANGUAGE RoleAnnotations #-}
@@ -1752,7 +1751,7 @@ mergeCheap nt = mergeGCheap' getInitialSubscribers updateMe destroy
17521751 let s = subscriber $ return k
17531752 (subscription@(EventSubscription _ parentSubd), parentOcc) <- subscribeAndRead (nt e) s
17541753 height <- liftIO $ getEventSubscribedHeight parentSubd
1755− return (fmap (\x -> k :=> x) parentOcc, height, k :=> MergeSubscribedParent subscription)
1754+ return (fmap (k :=>) parentOcc, height, k :=> MergeSubscribedParent subscription)
17561755 return ( DMap.fromDistinctAscList $ mapMaybe (\(x, _, _) -> x) subscribers
17571756 , fmap (\(_, h, _) -> h) subscribers --TODO: Assert that there's no invalidHeight in here
17581757 , DMap.fromDistinctAscList $ map (\(_, _, x) -> x) subscribers
@@ -1800,7 +1799,7 @@ mergeCheapWithMove nt = mergeGCheap' getInitialSubscribers updateMe destroy
18001799 let s = subscriber $ liftIO $ readIORef keyRef
18011800 (subscription@(EventSubscription _ parentSubd), parentOcc) <- subscribeAndRead (nt e) s
18021801 height <- liftIO $ getEventSubscribedHeight parentSubd
1803− return (fmap (\x -> k :=> x) parentOcc, height, k :=> MergeSubscribedParentWithMove subscription keyRef)
1802+ return (fmap (k :=>) parentOcc, height, k :=> MergeSubscribedParentWithMove subscription keyRef)
18041803 return ( DMap.fromDistinctAscList $ mapMaybe (\(x, _, _) -> x) subscribers
18051804 , fmap (\(_, h, _) -> h) subscribers --TODO: Assert that there's no invalidHeight in here
18061805 , DMap.fromDistinctAscList $ map (\(_, _, x) -> x) subscribers
test/EventWriterT.hs+1−4
@@ -53,16 +53,13 @@ unwrapApp x appIn = do
5353 return e
5454
5555testOrdering :: (Reflex t, Monad m) => Event t () -> EventWriterT t [Int] m ()
56−testOrdering pulse = do
57− forM_ [10,9..1] $ \i -> tellEvent ([i] <$ pulse)
58− return ()
56+testOrdering pulse = forM_ [10,9..1] $ \i -> tellEvent ([i] <$ pulse)
5957
6058testSimultaneous :: (Reflex t, Adjustable t m, MonadHold t m) => Event t (These () ()) -> EventWriterT t [Int] m ()
6159testSimultaneous pulse = do
6260 let e0 = fmapMaybe (^? here) pulse
6361 e1 = fmapMaybe (^? there) pulse
6462 forM_ [1,3..9] $ \i -> runWithReplace (tellEvent ([i] <$ e0)) $ ffor e1 $ \_ -> tellEvent ([i+1] <$ e0)
65− return ()
6663
6764-- | Test that a widget telling and event which fires at the same time it has been replaced
6865-- doesn't count along with the new widget.
test/hlint.hs+1
@@ -22,6 +22,7 @@ main = do
2222 , "--ignore=Use unless"
2323 , "--ignore=Reduce duplication"
2424 , "--cpp-define=USE_TEMPLATE_HASKELL"
25+ , "--ignore=Use tuple-section"
2526 ]
2627 recurseInto = and <$> sequence
2728 [ fileType ==? Directory