-- Some usual list functions. {-# LANGUAGE ScopedTypeVariables, ConstraintKinds, RankNTypes, ConstraintKinds, FlexibleContexts #-} import QuickSpec import Data.List main = quickSpec [ con "reverse" (reverse :: [A] -> [A]), con "++" ((++) :: [A] -> [A] -> [A]), con "[]" ([] :: [A]), con "map" (map :: (A -> B) -> [A] -> [B]), con "length" (length :: [A] -> Int), con "concat" (concat :: [[A]] -> [A]), -- Add some numeric functions to get more laws about length. background [ con "0" (0 :: Int), con "+" ((+) :: Int -> Int -> Int) ] ]