feat[test]: roundtrips, test for read <-> show

This commit is contained in:
vegowotenks 2025-08-14 09:21:50 +02:00
parent 8181113bfe
commit 60762c3493
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,7 @@
{-# LANGUAGE Safe #-}
module Test.QuickCheck.Roundtrip (roundtrips) where
import Data.Eq ((==), Eq)
import Data.Bool (Bool)
roundtrips :: Eq t1 => (t2 -> t1) -> (t1 -> t2) -> t1 -> Bool
roundtrips back forth x = x == back (forth x)