Skip to content

Commit

Permalink
Fix lint failures; Remove overridden dependent-map
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-abrar committed Aug 5, 2019
1 parent 8ea09b3 commit 9a63788
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 34 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ install:
- |
echo "packages: ." >> cabal.project
- |
echo "source-repository-package" >> cabal.project
echo " type: git" >> cabal.project
echo " location: https://github.com/obsidiansystems/dependent-map.git" >> cabal.project
echo " tag: a9a438b1fd974891e4ed57cbd43e305cf7c759a9" >> cabal.project
echo "" >> cabal.project
echo "source-repository-package" >> cabal.project
echo " type: git" >> cabal.project
echo " location: https://github.com/phadej/monoidal-containers.git" >> cabal.project
Expand Down Expand Up @@ -152,11 +147,6 @@ script:
- |
echo "packages: ${PKGDIR_reflex}" >> cabal.project
- |
echo "source-repository-package" >> cabal.project
echo " type: git" >> cabal.project
echo " location: https://github.com/obsidiansystems/dependent-map.git" >> cabal.project
echo " tag: a9a438b1fd974891e4ed57cbd43e305cf7c759a9" >> cabal.project
echo "" >> cabal.project
echo "source-repository-package" >> cabal.project
echo " type: git" >> cabal.project
echo " location: https://github.com/phadej/monoidal-containers.git" >> cabal.project
Expand Down
5 changes: 0 additions & 5 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
packages: .

source-repository-package
type: git
location: https://github.com/phadej/monoidal-containers.git
tag: f8860ba08385f77128efb45fb9193e6d287e893f
1 change: 0 additions & 1 deletion src/Data/Functor/Misc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Adjustable/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/BehaviorWriter/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Description: This module defines the 'MonadBehaviorWriter' class
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
#ifdef USE_REFLEX_OPTIMIZER
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/EventWriter/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
#ifdef USE_REFLEX_OPTIMIZER
{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Host/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/NotReady/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
#ifdef USE_REFLEX_OPTIMIZER
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/PerformEvent/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/PostBuild/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Query/Base.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Query/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-- |
Expand Down
1 change: 0 additions & 1 deletion src/Reflex/Requester/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
Expand Down
5 changes: 2 additions & 3 deletions src/Reflex/Spider/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RoleAnnotations #-}
Expand Down Expand Up @@ -1752,7 +1751,7 @@ mergeCheap nt = mergeGCheap' getInitialSubscribers updateMe destroy
let s = subscriber $ return k
(subscription@(EventSubscription _ parentSubd), parentOcc) <- subscribeAndRead (nt e) s
height <- liftIO $ getEventSubscribedHeight parentSubd
return (fmap (\x -> k :=> x) parentOcc, height, k :=> MergeSubscribedParent subscription)
return (fmap (k :=>) parentOcc, height, k :=> MergeSubscribedParent subscription)
return ( DMap.fromDistinctAscList $ mapMaybe (\(x, _, _) -> x) subscribers
, fmap (\(_, h, _) -> h) subscribers --TODO: Assert that there's no invalidHeight in here
, DMap.fromDistinctAscList $ map (\(_, _, x) -> x) subscribers
Expand Down Expand Up @@ -1800,7 +1799,7 @@ mergeCheapWithMove nt = mergeGCheap' getInitialSubscribers updateMe destroy
let s = subscriber $ liftIO $ readIORef keyRef
(subscription@(EventSubscription _ parentSubd), parentOcc) <- subscribeAndRead (nt e) s
height <- liftIO $ getEventSubscribedHeight parentSubd
return (fmap (\x -> k :=> x) parentOcc, height, k :=> MergeSubscribedParentWithMove subscription keyRef)
return (fmap (k :=>) parentOcc, height, k :=> MergeSubscribedParentWithMove subscription keyRef)
return ( DMap.fromDistinctAscList $ mapMaybe (\(x, _, _) -> x) subscribers
, fmap (\(_, h, _) -> h) subscribers --TODO: Assert that there's no invalidHeight in here
, DMap.fromDistinctAscList $ map (\(_, _, x) -> x) subscribers
Expand Down
5 changes: 1 addition & 4 deletions test/EventWriterT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,13 @@ unwrapApp x appIn = do
return e

testOrdering :: (Reflex t, Monad m) => Event t () -> EventWriterT t [Int] m ()
testOrdering pulse = do
forM_ [10,9..1] $ \i -> tellEvent ([i] <$ pulse)
return ()
testOrdering pulse = forM_ [10,9..1] $ \i -> tellEvent ([i] <$ pulse)

testSimultaneous :: (Reflex t, Adjustable t m, MonadHold t m) => Event t (These () ()) -> EventWriterT t [Int] m ()
testSimultaneous pulse = do
let e0 = fmapMaybe (^? here) pulse
e1 = fmapMaybe (^? there) pulse
forM_ [1,3..9] $ \i -> runWithReplace (tellEvent ([i] <$ e0)) $ ffor e1 $ \_ -> tellEvent ([i+1] <$ e0)
return ()

-- | Test that a widget telling and event which fires at the same time it has been replaced
-- doesn't count along with the new widget.
Expand Down
1 change: 1 addition & 0 deletions test/hlint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ main = do
, "--ignore=Use unless"
, "--ignore=Reduce duplication"
, "--cpp-define=USE_TEMPLATE_HASKELL"
, "--ignore=Use tuple-section"
]
recurseInto = and <$> sequence
[ fileType ==? Directory
Expand Down

0 comments on commit 9a63788

Please sign in to comment.