The definition forgot to recursively call itself, and the order of the predicates should be swapped, may be:
quicksort : List comparable -> List comparable
quicksort list =
case list of
[] -> []
(x::xs) ->
let
smallerSorted = quicksort (List.filter ((>) x) xs)
biggerSorted = quicksort (List.filter ((<=) x) xs)
in
smallerSorted ++ [x] ++ biggerSorted
The definition forgot to recursively call itself, and the order of the predicates should be swapped, may be: