ucsd-progsys / liquidhaskell

Liquid Types For Haskell
BSD 3-Clause "New" or "Revised" License
1.2k stars 139 forks source link

Termination error messages do not follow standard GHC format #1961

Open Fizzixnerd opened 2 years ago

Fizzixnerd commented 2 years ago

When checking tests/neg/AutoSize.hs, the folllowing is output:

**** LIQUID: UNSAFE ************************************************************

neg/AutoSize.hs:19:1: error:
    Termination Error
AutoSize.expSize
No decreasing parameter
   |
19 | expSize (EConst _) = 0
   | ^^^^^^^

Compare with:

**** LIQUID: UNSAFE ************************************************************

neg/Ast.hs:55:1: error:
    Liquid Type Mismatch
    .
    The inferred type
      VV : Ast.AstIndex
    .
    is not a subtype of the required type
      VV : {VV : Ast.AstIndex | Ast.isTypeIndex VV}
    .
    Constraint id 1
   |
55 | wrong = id1 astExpr
   | 

and you can see the leading whitespace differences.

ranjitjhala commented 2 years ago

TBF we were doing code-context snippets before GHC :-)

but yes, I think it would be great to make this uniform now!