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

Stan.Observation

Description

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

Synopsis

Documentation

data Observation #

Data type to represent discovered by Stan suggestions.

Instances

Instances details
Show Observation # 
Instance details

Defined in Stan.Observation

Eq Observation # 
Instance details

Defined in Stan.Observation

ToJSON Observation # 
Instance details

Defined in Stan.Observation

Methods

toJSON :: Observation -> Value #

type Observations = Slist Observation #

Type alias for the sized list of Observations.

Smart constructors

mkObservation #

Arguments

:: Id Inspection

Corresponding Inspections Id.

-> 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:

  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 #

Arguments

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

Ignored ^ Unknown

Pretty print

prettyShowObservation :: OutputSettings -> Observation -> Text #

Show Observation in a human-friendly format.

prettyObservationSource #

Arguments

:: Bool

Use colouring

-> Observation 
-> [Text]