liquidhaskell-0.9.0.2.1: tests/neg/ListElem.hs
{-@ LIQUID "--expect-any-error" @-}
module ListElem (listElem) where
import Data.Set
{-@ listElem :: (Eq a)
=> y:a
-> xs:[a]
-> {v:Bool | v <=> Set_mem y (listElts xs)}
@-}
listElem :: (Eq a) => a -> [a] -> Bool
listElem _ [] = False
listElem y (x:_xs)
| x == y = True
| otherwise = True -- listElem y xs