From ce88cc5f0ba1233f7ff3e6535acfc6b14e1ece78 Mon Sep 17 00:00:00 2001 From: Tom Harding Date: Mon, 10 Jun 2019 09:59:40 +0100 Subject: [PATCH] Expose `Tuple` class For many of the instances, we use a transformation to and from a nested tuple shape. For example, we can have an instance of `Eq` for any HKD by converting it to nested tuples and using _that_ instance. @pacak notes that, while this is fine in principal, not exposing it means that we can't write functions on top of various internals that are suitably polymorphic because we can't add this class as a constraint. This commit exposes this class, and frees us all. --- higgledy.cabal | 2 +- src/Data/Generic/HKD/Types.hs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/higgledy.cabal b/higgledy.cabal index 260891e..ee61141 100644 --- a/higgledy.cabal +++ b/higgledy.cabal @@ -1,7 +1,7 @@ cabal-version: 2.4 name: higgledy -version: 0.2.0.1 +version: 0.2.1.0 synopsis: Partial types as a type constructor. description: Use the generic representation of an ADT to get a higher-kinded data-style interface automatically. homepage: https://github.com/i-am-tom/higgledy diff --git a/src/Data/Generic/HKD/Types.hs b/src/Data/Generic/HKD/Types.hs index bf53259..b13c8a4 100644 --- a/src/Data/Generic/HKD/Types.hs +++ b/src/Data/Generic/HKD/Types.hs @@ -27,6 +27,8 @@ module Data.Generic.HKD.Types , HKD_ , GHKD_ + + , Tuple (..) ) where import Data.Barbie (ConstraintsB (..), FunctorB (..), ProductB (..), ProductBC (..), TraversableB (..))