moduleTest.Data.DigitwhereimportData.DigitimportTest.QuickCheckimportTest.FrameworkimportTest.Framework.Providers.QuickCheck2(testProperty)instanceArbitraryDigitwherearbitrary=elements[d0..d9]main::IO()main=defaultMaindigitTestsdigitTests::[Test]digitTests=[testGroup"Digit"[testProperty"fold for Digit"prop_fold,testProperty"fold for Digit with if"prop_if,testProperty"even/odd Digit"prop_even_odd]]prop_fold::Digit->Boolprop_foldd=foldDigitd0d1d2d3d4d5d6d7d8d9d==dprop_if::Int->Int->Digit->Boolprop_ifxyd=foldDigitif0if1if2if3if4if5if6if7if8if9dxyd==xprop_even_odd::Int->Int->Digit->Boolprop_even_oddxyd=ifEvenxyd==ifOddyxd