-- A specification of sorting a list and an implementation based-- on the quicksort algorithm.-- CurryCheck generates and checks properties which states-- that the implementation is satisfies the specification-- and the post-condition.perm [] = []perm (x:xs) = insert x (perm xs) where insert x ys = x : ys insert x (y:ys) = y : insert x yssorted [] = Truesorted [_] = Truesorted (x:y:ys) | x<=y && sorted (y:ys) = True-- Postcondition: input and output lists should have the same lengthsort'post xs ys = length xs == length ys-- Specification of sort:-- A list is a sorted result of an input if it is a permutation and sorted.sort'spec :: [Int] -> [Int]