testing-feat 0.4.0.1 → 0.4.0.2
raw patch · 2 files changed
+81/−6 lines, 2 filesdep ~basedep ~template-haskell
Dependency ranges changed: base, template-haskell
Files
- Test/Feat/Class.hs +78/−3
- testing-feat.cabal +3/−3
Test/Feat/Class.hs view
@@ -163,7 +163,9 @@ --------------------------------------------------------------------- -- Instances -+{-+-- There may have been some problems with this TH script on older GHC versions. +-- Its result is pasted at the end of this file (let it = mapM (instanceFor ''Enumerable [enumDef]) [ ''[] @@ -189,7 +191,7 @@ mk_freqs_binding :: Exp -> Dec mk_freqs_binding e = ValD (VarP 'enumerate) (NormalB e) [] in it)- +-} simpleEnum car sel = let e = Enumerate @@ -279,5 +281,78 @@ enumerate = cutOff 8 $ unary (toEnum . fromIntegral :: Word -> Char) - +++---- The rest of this file is automatically generated with -ddump-splices, then adjusted by hand+instance Enumerable a_12 =>+ Enumerable ([] a_12) where+ enumerate+ = consts+ [pure [],+ unary (funcurry (:))]+instance Enumerable Bool where+ enumerate = consts [pure False, pure True]+instance Enumerable () where+ enumerate = consts [pure ()]+instance (Enumerable a_12, Enumerable b_13) =>+ Enumerable ((,) a_12 b_13) where+ enumerate = consts [unary (funcurry (,))]+instance (Enumerable a_12, Enumerable b_13, Enumerable c_14) =>+ Enumerable ((,,) a_12 b_13 c_14) where+ enumerate+ = consts [unary (funcurry (funcurry (,,)))]+instance (Enumerable a_12,+ Enumerable b_13,+ Enumerable c_14,+ Enumerable d_15) =>+ Enumerable ((,,,) a_12 b_13 c_14 d_15) where+ enumerate+ = consts+ [unary (funcurry (funcurry (funcurry (,,,))))]+instance (Enumerable a_12,+ Enumerable b_13,+ Enumerable c_14,+ Enumerable d_15,+ Enumerable e_16) =>+ Enumerable ((,,,,) a_12 b_13 c_14 d_15 e_16) where+ enumerate+ = consts+ [unary+ (funcurry+ (funcurry (funcurry (funcurry (,,,,)))))]+instance (Enumerable a_12,+ Enumerable b_13,+ Enumerable c_14,+ Enumerable d_15,+ Enumerable e_16,+ Enumerable f_17) =>+ Enumerable ((,,,,,) a_12 b_13 c_14 d_15 e_16 f_17) where+ enumerate+ = consts+ [unary+ (funcurry+ (funcurry+ (funcurry (funcurry (funcurry (,,,,,))))))]+instance (Enumerable a_12,+ Enumerable b_13,+ Enumerable c_14,+ Enumerable d_15,+ Enumerable e_16,+ Enumerable f_17,+ Enumerable g_18) =>+ Enumerable ((,,,,,,) a_12 b_13 c_14 d_15 e_16 f_17 g_18) where+ enumerate+ = consts+ [unary+ (funcurry+ (funcurry+ (funcurry+ (funcurry (funcurry (funcurry (,,,,,,)))))))]+instance (Enumerable a_acKx, Enumerable b_acKy) =>+ Enumerable (Either a_acKx b_acKy) where+ enumerate = consts [unary Left, unary Right]+instance Enumerable a_a1aW => Enumerable (Maybe a_a1aW) where+ enumerate = consts [pure Nothing, unary Just]+instance Enumerable Ordering where+ enumerate = consts [pure LT, pure EQ, pure GT]
testing-feat.cabal view
@@ -1,5 +1,5 @@ Name: testing-feat-Version: 0.4.0.1+Version: 0.4.0.2 Synopsis: Functional Enumeration of Algebraic Types Description: Feat (Functional Enumeration of Algebraic Types) provides enumerations as functions from natural numbers to values @@ -42,8 +42,8 @@ Build-depends: - base >= 4.5 && <= 5,- template-haskell >= 2.5 && < 2.9,+ base >= 4.5 && <= 4.8,+ template-haskell >= 2.5 && < 2.10, mtl >= 1 && < 3, QuickCheck > 2 && < 3, tagshare<0.1