@@ -0,0 +1,30 @@
1+{-# LANGUAGE NumDecimals #-}
2+{-# LANGUAGE DerivingStrategies #-}
3+{-# LANGUAGE DerivingVia #-}
4+{-# LANGUAGE DeriveAnyClass #-}
6+module LimitationDemo where
9+import GHC.Generics (Generic)
10+import Test.QuickCheck
11+import Test.QuickCheck.Arbitrary.Generic
13+-- As you can see, we have this instance generated, but it will definitely lead
14+-- to generating an infinite term (and the only term). The recursion detection
17+ deriving (Eq, Ord, Show, Generic)
18+ deriving anyclass NFData
19+ deriving Arbitrary via (GenericArbitrary R1)
22+ deriving (Eq, Ord, Show, Generic)
23+ deriving anyclass NFData
24+ deriving Arbitrary via (GenericArbitrary R2)
26+-- To force the instance realy be generated
29+ r1 :: R1 <- generate arbitrary