-- https://wiki.haskell.org/Graham_Scan_Implementation
module Algorithms.GrahamScanQCTest where

import Test.QuickCheck
import Control.Monad
import Data.List
import Algorithms.GrahamScan


convex' = map (\(Pt x) -> x) . convex . map Pt

prop_convex n = forAll (replicateM n arbitrary) (\xs -> sort (convex' xs) == sort (convex' (convex' xs)))