Skip to content

Commit

Permalink
Cut down on what hls-graph exports
Browse files Browse the repository at this point in the history
Delete unnecesssary hiding
  • Loading branch information
ndmitchell committed Apr 18, 2021
1 parent 3413cdf commit 208962d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 77 deletions.
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Core/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Development.IDE.GHC.Compat hiding (TargetFile,
writeHieFile)
import qualified Development.IDE.Spans.AtPoint as AtPoint
import Development.IDE.Types.Location
import Development.IDE.Graph hiding (Diagnostic)
import Development.IDE.Graph
import qualified HieDb
import Language.LSP.Types (DocumentHighlight (..),
SymbolInformation (..))
Expand Down
3 changes: 1 addition & 2 deletions ghcide/src/Development/IDE/Core/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ import Development.IDE.Types.HscEnvEq
import Development.IDE.Types.Location
import qualified Development.IDE.Types.Logger as L
import Development.IDE.Types.Options
import Development.IDE.Graph hiding
(Diagnostic)
import Development.IDE.Graph
import Development.IDE.Graph.Classes hiding (get, put)
import Fingerprint
import GHC.Generics (Generic)
Expand Down
3 changes: 1 addition & 2 deletions ghcide/src/Development/IDE/Core/Shake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ import Development.IDE.Types.Logger hiding (Priority)
import qualified Development.IDE.Types.Logger as Logger
import Development.IDE.Types.Options
import Development.IDE.Types.Shake
import Development.IDE.Graph hiding (Info, ShakeValue,
doesFileExist)
import Development.IDE.Graph hiding (ShakeValue)
import qualified Development.IDE.Graph as Shake
import Development.IDE.Graph.Classes
import Development.IDE.Graph.Database
Expand Down
60 changes: 6 additions & 54 deletions hls-graph/src/Development/IDE/Graph.hs
Original file line number Diff line number Diff line change
@@ -1,70 +1,22 @@
{-# LANGUAGE PatternSynonyms #-}

module Development.IDE.Graph(
shake,
shakeOptions,
Rules, action, withoutActions, alternatives, priority, versioned,
Action, traced,
liftIO, actionOnException, actionFinally, actionBracket, actionCatch, actionRetry, runAfter,
Rules,
Action, action,
actionFinally, actionBracket, actionCatch,
ShakeException(..),
-- * Configuration
ShakeOptions(..), Rebuild(..), Lint(..), Change(..),
getShakeOptions, getShakeOptionsRules, getHashedShakeVersion,
ShakeOptions(shakeThreads, shakeFiles, shakeExtra),
getShakeExtra, getShakeExtraRules, addShakeExtra,
-- ** Command line
shakeArgs, shakeArgsWith, shakeArgsOptionsWith, shakeOptDescrs, addHelpSuffix,
-- ** Targets
getTargets, addTarget, withTargetDocs, withoutTargets,
-- ** Progress reporting
Progress(..), progressSimple, progressDisplay, progressTitlebar, progressProgram, getProgress,
-- ** Verbosity
Verbosity(..), getVerbosity, putVerbose, putInfo, putWarn, putError, withVerbosity, quietly,
-- * Running commands
command, command_, cmd, cmd_, unit,
Stdout(..), StdoutTrim(..), Stderr(..), Stdouterr(..), Exit(..), Process(..), CmdTime(..), CmdLine(..), FSATrace(..),
CmdResult, CmdString, CmdOption(..),
addPath, addEnv,
-- * Explicit parallelism
parallel, forP, par,
-- * Utility functions
copyFile', copyFileChanged,
readFile', readFileLines,
writeFile', writeFileLines, writeFileChanged,
removeFiles, removeFilesAfter,
withTempFile, withTempDir,
withTempFileWithin, withTempDirWithin,
-- * File rules
need, want, (%>), (|%>), (?>), phony, (~>), phonys,
(&%>), (&?>),
orderOnly, orderOnlyAction,
FilePattern, (?==), (<//>), filePattern,
needed, trackRead, trackWrite, trackAllow,
-- * Directory rules
doesFileExist, doesDirectoryExist, getDirectoryContents, getDirectoryFiles, getDirectoryDirs,
getDirectoryFilesIO,
-- * Environment rules
getEnv, getEnvWithDefault, getEnvError,
parallel,
-- * Oracle rules
ShakeValue, RuleResult, addOracle, addOracleCache, addOracleHash, askOracle, askOracles,
ShakeValue, RuleResult,
-- * Special rules
alwaysRerun,
-- * Resources
Resource, newResource, newResourceIO, withResource, withResources,
newThrottle, newThrottleIO,
unsafeExtraThread,
-- * Cache
newCache, newCacheIO,
historyDisable, produces,
-- * Batching
needHasChanged,
resultHasChanged,
batch,
reschedule,
-- * Deprecated
askOracleWith,
deprioritize,
pattern Quiet, pattern Normal, pattern Loud, pattern Chatty,
putLoud, putNormal, putQuiet
) where

import Development.Shake
5 changes: 0 additions & 5 deletions hls-graph/src/Development/IDE/Graph/Database.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
module Development.IDE.Graph.Database(
ShakeDatabase,
shakeOpenDatabase,
shakeWithDatabase,
shakeOneShotDatabase,
shakeRunDatabase,
shakeLiveFilesDatabase,
shakeProfileDatabase,
shakeErrorsDatabase,
shakeRunAfter
) where

import Development.Shake.Database
12 changes: 0 additions & 12 deletions hls-graph/src/Development/IDE/Graph/Rule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ module Development.IDE.Graph.Rule(
-- * Calling builtin rules
-- | Wrappers around calling Shake rules. In general these should be specialised to a builtin rule.
apply, apply1,
-- * User rules
-- | Define user rules that can be used by builtin rules.
-- Absent any builtin rule making use of a user rule at a given type, a user rule will have on effect -
-- they have no inherent effect or interpretation on their own.
addUserRule, getUserRuleList, getUserRuleMaybe, getUserRuleOne,
-- * Lint integration
-- | Provide lint warnings when running code.
lintTrackRead, lintTrackWrite, lintTrackAllow,
-- * History caching
-- | Interact with the non-local cache. When using the cache it is important that all
-- rules have accurate 'BuiltinIdentity' functions.
historyIsEnabled, historySave, historyLoad
) where

import Development.Shake.Rule
2 changes: 1 addition & 1 deletion hls-plugin-api/src/Ide/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import Data.Semigroup
import Data.String
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8)
import Development.IDE.Graph hiding (command)
import Development.IDE.Graph
import GHC.Generics
import Ide.Plugin.Config
import Ide.Plugin.Properties
Expand Down

0 comments on commit 208962d

Please sign in to comment.