packages feed

liquidhaskell-0.8.0.2: tests/neg/NewTypes0.hs

newtype Foo a = Bar Int


{-@ newtype Foo a = Bar {x :: Nat} @-}

{-@ fromFoo :: Foo a -> {v:Int | v == 0 } @-}
fromFoo :: Foo a -> Int
fromFoo (Bar n) = n