liquidhaskell-boot-0.9.2.5.0: Liquid Types for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Haskell.Liquid.UX.CmdLine

Description

This module contains all the code needed to output the result which is either: SAFE or WARNING with some reasonable error message when something goes wrong. All forms of errors/exceptions should go through here. The idea should be to report the error, the source position that causes it, generate a suitable .json file and then exit.

Synopsis

Get Command Line Configuration

Update Configuration With Pragma

withPragmas :: MonadIO m => Config -> FilePath -> [Located String] -> (Config -> m a) -> m a Source #

Canonicalize Paths in Config

canonicalizePaths :: FilePath -> Config -> IO Config Source #

Attempt to canonicalize all FilePaths in the Config so we don't have to worry about relative paths.

Exit Function

Reporting the output of the checking

data OutputResult Source #

Constructors

OutputResult 

Fields

  • orHeader :: Doc

    The "header" like "LIQUID: SAFE", or "LIQUID: UNSAFE".

  • orMessages :: [(SrcSpan, Doc)]

    The list of pretty-printable messages (typically errors) together with their source locations.

reportResult :: MonadIO m => (OutputResult -> m ()) -> Config -> [FilePath] -> Output Doc -> m () Source #

Write the annotations (i.e. the files in the ".liquid" hidden folder) and report the result of the checking using a supplied function, or using an implicit JSON function, if json flag is set.

Diff check mode

diffcheck :: Config -> Bool Source #

check subset of binders modified (+ dependencies) since last check

Show info about this version of LiquidHaskell

printLiquidHaskellBanner :: IO () Source #

Shows the LiquidHaskell banner, that includes things like the copyright, the git commit and the version.

Orphan instances

Show (CtxError Doc) Source # 
Instance details