-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
The function inferType below can be declared as a measure, which makes both foo and bar pass. When declaring it as reflect only foo passes. Enabling --ple-with-undecided-guards makes both pass again.
{-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
-- {-@ LIQUID "--ple-with-undecided-guards" @-}
module Test where
data Ty = TInt | TBool
data Expr = CONST Int | TRUE | FALSE
{-@ reflect inferType @-}
-- {-@ measure inferType @-}
inferType :: Expr -> Ty
inferType (CONST _) = TInt
inferType TRUE = TBool
inferType FALSE = TBool
{-@ type IntExpr = {e:Expr | inferType e = TInt} @-}
-- passes
{-@ foo :: IntExpr @-}
foo :: Expr
foo = CONST 42
-- fails
{-@ bar :: [IntExpr] @-}
bar :: [Expr]
bar = [CONST 42]Metadata
Metadata
Assignees
Labels
No labels