| Copyright | (c) 2020 Kowainik |
|---|---|
| License | MPL-2.0 |
| Maintainer | Kowainik <xrom.xkov@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Stan.Observation
Contents
Description
Observation — a suggestion found in the target project by Stan.
Synopsis
- data Observation = Observation {}
- type Observations = Slist Observation
- mkObservation :: Id Inspection -> HieFile -> RealSrcSpan -> Observation
- mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation
- ignoredObservations :: [Id Observation] -> Observations -> ([Id Observation], [Id Observation])
- prettyShowObservation :: OutputSettings -> Observation -> Text
- prettyShowIgnoredObservations :: [Id Observation] -> Observations -> Text
- prettyObservationSource :: Bool -> Observation -> [Text]
Documentation
data Observation #
Data type to represent discovered by Stan suggestions.
Constructors
| Observation | |
Fields | |
Instances
| Show Observation # | |
Defined in Stan.Observation Methods showsPrec :: Int -> Observation -> ShowS # show :: Observation -> String # showList :: [Observation] -> ShowS # | |
| Eq Observation # | |
Defined in Stan.Observation | |
| ToJSON Observation # | |
Defined in Stan.Observation Methods toJSON :: Observation -> Value # | |
type Observations = Slist Observation #
Type alias for the sized list of Observations.
Smart constructors
Arguments
| :: Id Inspection | Corresponding |
| -> HieFile | |
| -> RealSrcSpan | Position. |
| -> Observation |
Smart constructor for Observations from HieFiles.
mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation #
Create a stable Observation Id in a such way that:
Iddoesn't depend on other inspections in this file.Iduniquely identifiesObservationlocation.Ids are guaranteed to be the same if the module content didn't change between differentstanruns.
The Observation Id should look like this:
OBS-STAN-XXXX-module-name-hash-10:42
Arguments
| :: [Id Observation] | |
| -> Observations | |
| -> ([Id Observation], [Id Observation]) | Ignored ^ Unknown |
Pretty print
prettyShowObservation :: OutputSettings -> Observation -> Text #
Show Observation in a human-friendly format.
prettyShowIgnoredObservations :: [Id Observation] -> Observations -> Text #
Arguments
| :: Bool | Use colouring |
| -> Observation | |
| -> [Text] |