ucsd-progsys/liquidhaskell

Cannot parse specification

Open

#1781 aperta il 22 ott 2020

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Haskell (157 fork)batch import
good first issue

Metriche repository

Star
 (1306 star)
Metriche merge PR
 (Merge medio 2g 18h) (12 PR mergiate in 30 g)

Descrizione

{-@ inline id' @-}
id' x = x

{-@ arith :: { id' ( 2 <= 2 ) } @-}
arith = ()

yields:

/home/zgrannan/rewriting-paper/optimization/arith.hs:4:20: error:  Cannot parse specification:
                                                                       unexpected "( "
                                                                       expecting "&&", "->", "<:", "<=>", "==>", "=>", "||", "~>", ':', '}', or monoPredicateP

This is a contrived example but I've run into similar issues generating LH specifications programmatically.

In general I would expect that if the expression {-@ thm : { x } @-} parses, then {-@ thm : { id' (x) } @-} should also parse (excluding the LH builtin operators not already present in Haskell, such as <=>)

Guida contributor