diff --git a/src/Weeder.hs b/src/Weeder.hs index f8e0055..e2def12 100644 --- a/src/Weeder.hs +++ b/src/Weeder.hs @@ -25,9 +25,11 @@ module Weeder ) where +-- algebraic-graphs import Algebra.Graph ( Graph, edge, empty, overlay, vertex, vertexList ) import Algebra.Graph.ToGraph ( dfs ) +-- base import Control.Applicative ( Alternative ) import Control.Monad ( guard, msum, when ) import Data.Foldable ( for_, traverse_ ) @@ -36,12 +38,17 @@ import Data.Monoid ( First( First ) ) import GHC.Generics ( Generic ) import Prelude hiding ( span ) +-- containers import Data.Map.Strict ( Map ) import qualified Data.Map.Strict as Map import Data.Sequence ( Seq ) import Data.Set ( Set ) import qualified Data.Set as Set +-- generic-lens +import Data.Generics.Labels () + +-- ghc import Avail ( AvailInfo( Avail, AvailTC ) ) import FieldLabel ( FieldLbl( FieldLabel, flSelector ) ) import HieTypes @@ -68,12 +75,13 @@ import OccName ) import SrcLoc ( RealSrcSpan, realSrcSpanStart, realSrcSpanEnd ) -import Data.Generics.Labels () - +-- lens import Control.Lens ( (%=) ) +-- mtl import Control.Monad.State.Class ( MonadState ) +-- transformers import Control.Monad.Trans.Maybe ( runMaybeT ) diff --git a/src/Weeder/Config.hs b/src/Weeder/Config.hs index 2fc78a5..6dea9ca 100644 --- a/src/Weeder/Config.hs +++ b/src/Weeder/Config.hs @@ -5,8 +5,14 @@ module Weeder.Config where +-- containers +import Data.Set ( Set ) +import qualified Data.Set as Set + +-- dhall import qualified Dhall -import Weeder + +-- ghc import Module ( DefUnitId( DefUnitId ) , Module( Module ) @@ -18,8 +24,9 @@ import OccName ( mkOccName , varName ) -import Data.Set ( Set ) -import qualified Data.Set as Set + +-- weeder +import Weeder -- | Configuration for Weeder analysis. diff --git a/src/Weeder/Main.hs b/src/Weeder/Main.hs index f02f74f..e8a26fb 100644 --- a/src/Weeder/Main.hs +++ b/src/Weeder/Main.hs @@ -8,16 +8,26 @@ module Weeder.Main ( main, mainWithConfig ) where +-- base import Control.Monad ( guard ) import Control.Monad.IO.Class ( liftIO ) +import Data.Bool +import Data.Foldable +-- containers import qualified Data.Map.Strict as Map import qualified Data.Set as Set +-- dhall +import qualified Dhall + +-- directory import System.Directory ( doesPathExist, withCurrentDirectory, canonicalizePath, listDirectory, doesFileExist, doesDirectoryExist ) +-- filepath import System.FilePath ( isExtensionOf ) +-- ghc import HieBin ( HieFileResult( HieFileResult, hie_file_result ) ) import HieBin ( readHieFile ) import NameCache ( initNameCache ) @@ -25,14 +35,15 @@ import OccName ( occNameString ) import SrcLoc ( srcLocLine, srcLocCol, realSrcSpanStart ) import UniqSupply ( mkSplitUniqSupply ) +-- optparse-applicative +import Options.Applicative + +-- transformers import Control.Monad.Trans.State.Strict ( execStateT ) +-- weeder import Weeder import Weeder.Config -import qualified Dhall -import Options.Applicative -import Data.Foldable -import Data.Bool main :: IO ()