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

Language.Haskell.Liquid.UX.Tidy

Description

This module contains functions for cleaning up types before they are rendered, e.g. in error messages or annoations, and also some PPrint instances that rely upon tidying.

Synopsis

Tidying functions

tidySymbol :: Symbol -> Symbol #

tidySymbol is used to prettify the names of parameters of kvars appearing in solutions.(*) For example, if you have a kvar $k0 with two parameters, you may have a solution that looks like 0 < lq_karg$nnf_arg$##k0 where we know it is a kvar-arg because of the - kArgPrefix (lq_arg) - hvarArgPrefix (nnf_arg) - k0 the name of the kvar - `0` the parameter index - k0 again (IDK why?!) all of which are separated by ## So tidySymbol tests if indeed it is a kArgPrefix-ed symbol and if so converts `lq_karg$nnf_arg$##k0` ----> `$k0##0`

Panic and Exit

panicError :: Error -> a Source #

This function is put in this module as it depends on the Exception instance, which depends on the PPrint instance, which depends on tidySpecType.

Show an Error, then crash

Final result

class Result a where Source #

Converting Results To Answers -------------------------------------

Error to UserError

MOVE TO TYPES

Orphan instances

Exception Error Source # 
Instance details

Show Error Source # 
Instance details

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

PPrint Error Source # 
Instance details

Methods

pprintTidy :: Tidy -> Error -> Doc #

pprintPrec :: Int -> Tidy -> Error -> Doc #

Exception [Error] Source # 
Instance details

PPrint (CtxError SpecType) Source # 
Instance details

PPrint (CtxError Doc) Source #

Pretty Printing Error Messages --------------------------------------------

Need to put PPrint Error instance here (instead of in Types), as it depends on PPrint SpecTypes, which lives in this module.

Instance details