stan-0.1.2.1: Haskell STatic ANalyser
Copyright(c) 2020 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Stan.Observation

Description

Observation — a suggestion found in the target project by Stan.

Synopsis

Documentation

data Observation Source #

Data type to represent discovered by Stan suggestions.

Instances

Instances details
Show Observation Source # 
Instance details

Defined in Stan.Observation

Eq Observation Source # 
Instance details

Defined in Stan.Observation

ToJSON Observation Source # 
Instance details

Defined in Stan.Observation

Methods

toJSON :: Observation -> Value #

type Observations = Slist Observation Source #

Type alias for the sized list of Observations.

Smart constructors

mkObservation Source #

Arguments

:: Id Inspection

Corresponding Inspections Id.

-> HieFile 
-> RealSrcSpan

Position.

-> Observation 

Smart constructor for Observations from HieFiles.

mkObservationId :: Id Inspection -> ModuleName -> RealSrcSpan -> Id Observation Source #

Create a stable Observation Id in a such way that:

  1. Id doesn't depend on other inspections in this file.
  2. Id uniquely identifies Observation location.
  3. Ids are guaranteed to be the same if the module content didn't change between different stan runs.

The Observation Id should look like this:

OBS-STAN-XXXX-module-name-hash-10:42

ignoredObservations Source #

Arguments

:: [Id Observation] 
-> Observations 
-> ([Id Observation], [Id Observation])

Ignored ^ Unknown

Pretty print

prettyShowObservation :: OutputSettings -> Observation -> Text Source #

Show Observation in a human-friendly format.

prettyObservationSource Source #

Arguments

:: Bool

Use colouring

-> Observation 
-> [Text]