15 lines
405 B
Haskell
15 lines
405 B
Haskell
module Test.QuickCheck.Classes.PathPiece
|
|
( pathPieceLaws
|
|
) where
|
|
|
|
import ClassyPrelude
|
|
import Test.QuickCheck
|
|
import Test.QuickCheck.Classes
|
|
import Web.PathPieces
|
|
import Data.Proxy
|
|
|
|
pathPieceLaws :: forall a. (Arbitrary a, PathPiece a, Eq a, Show a) => Proxy a -> Laws
|
|
pathPieceLaws _ = Laws "PathPiece"
|
|
[ ("Partial Isomorphism", property $ \(a :: a) -> fromPathPiece (toPathPiece a) == Just a)
|
|
]
|