ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Core.OfInterest

Description

Utilities and state for the files of interest - those which are currently open in the editor. The rule is `IsFileOfInterest`

Synopsis

- ofInterestRules :: Recorder (WithPriority Log) -> Rules ()
- getFilesOfInterest :: IdeState -> IO (HashMap NormalizedFilePath FileOfInterestStatus)
- getFilesOfInterestUntracked :: Action (HashMap NormalizedFilePath FileOfInterestStatus)
- addFileOfInterest :: IdeState -> NormalizedFilePath -> FileOfInterestStatus -> IO ()
- deleteFileOfInterest :: IdeState -> NormalizedFilePath -> IO ()
- setFilesOfInterest :: IdeState -> HashMap NormalizedFilePath FileOfInterestStatus -> IO ()
- kick :: Action ()
- data FileOfInterestStatus
  - = OnDisk
  - | Modified {
    - firstOpen :: !Bool
    }
- newtype OfInterestVar = OfInterestVar (Var (HashMap NormalizedFilePath FileOfInterestStatus))
- scheduleGarbageCollection :: IdeState -> IO ()
- data Log = LogShake Log

# Documentation

ofInterestRules :: Recorder (WithPriority Log) -> Rules () #

The rule that initialises the files of interest state.

getFilesOfInterest :: IdeState -> IO (HashMap NormalizedFilePath FileOfInterestStatus) #

getFilesOfInterestUntracked :: Action (HashMap NormalizedFilePath FileOfInterestStatus) #

addFileOfInterest :: IdeState -> NormalizedFilePath -> FileOfInterestStatus -> IO () #

deleteFileOfInterest :: IdeState -> NormalizedFilePath -> IO () #

setFilesOfInterest :: IdeState -> HashMap NormalizedFilePath FileOfInterestStatus -> IO () #

Set the files-of-interest - not usually necessary or advisable. The LSP client will keep this information up to date.

kick :: Action () #

Typecheck all the files of interest. Could be improved

data FileOfInterestStatus #

Constructors

OnDisk |
Modified |

Fields

- firstOpen :: !Bool

  was this file just opened

#### Instances

Instances details

Generic FileOfInterestStatus # |

Instance details

Defined in Development.IDE.Core.RuleTypes

Associated Types

type Rep FileOfInterestStatus |

Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileOfInterestStatus = D1 ('MetaData "FileOfInterestStatus" "Development.IDE.Core.RuleTypes" "ghcide-2.7.0.0-4RFlm38cSV494413rRqzNs" 'False) (C1 ('MetaCons "OnDisk" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Modified" 'PrefixI 'True) (S1 ('MetaSel ('Just "firstOpen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))

Methods

from :: FileOfInterestStatus -> Rep FileOfInterestStatus x #

to :: Rep FileOfInterestStatus x -> FileOfInterestStatus #

Show FileOfInterestStatus # |
Instance details Defined in Development.IDE.Core.RuleTypes Methods showsPrec :: Int -> FileOfInterestStatus -> ShowS # show :: FileOfInterestStatus -> String # showList :: [FileOfInterestStatus] -> ShowS #
NFData FileOfInterestStatus # |
Instance details Defined in Development.IDE.Core.RuleTypes Methods rnf :: FileOfInterestStatus -> () #
Eq FileOfInterestStatus # |
Instance details Defined in Development.IDE.Core.RuleTypes Methods (==) :: FileOfInterestStatus -> FileOfInterestStatus -> Bool # (/=) :: FileOfInterestStatus -> FileOfInterestStatus -> Bool #
Hashable FileOfInterestStatus # |
Instance details Defined in Development.IDE.Core.RuleTypes Methods hashWithSalt :: Int -> FileOfInterestStatus -> Int # hash :: FileOfInterestStatus -> Int #
type Rep FileOfInterestStatus # |

Instance details

Defined in Development.IDE.Core.RuleTypes

type Rep FileOfInterestStatus = D1 ('MetaData "FileOfInterestStatus" "Development.IDE.Core.RuleTypes" "ghcide-2.7.0.0-4RFlm38cSV494413rRqzNs" 'False) (C1 ('MetaCons "OnDisk" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Modified" 'PrefixI 'True) (S1 ('MetaSel ('Just "firstOpen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))

newtype OfInterestVar #

Constructors

OfInterestVar (Var (HashMap NormalizedFilePath FileOfInterestStatus)) |

#### Instances

Instances details

IsIdeGlobal OfInterestVar # |
Instance details Defined in Development.IDE.Core.OfInterest

scheduleGarbageCollection :: IdeState -> IO () #

data Log #

Constructors

LogShake Log |

#### Instances

Instances details

Show Log # |
Instance details Defined in Development.IDE.Core.OfInterest Methods showsPrec :: Int -> Log -> ShowS # show :: Log -> String # showList :: [Log] -> ShowS #
Pretty Log # |
Instance details Defined in Development.IDE.Core.OfInterest Methods pretty :: Log -> Doc ann # prettyList :: [Log] -> Doc ann #