Armando Santos
Armando Santos
The run time performance ought to be slightly better since the compiler tries to inline everything but it just takes too loooong to compile! I have the idea of using...
Thank you for the suggestion! I remember trying something like this but ended up giving up on the idea, dont remember why! I'll give it another try!
@ilyakooo0 Thanks for opening this issue! Indeed I found that we cannot guarantee that the `Enum`/`Bounded` will be "correct" for some custom type. I find your open type family suggestion...
I understand now! I'd be more than happy to review a PR that refactored the code and added this functionality. Let's see how it turns out :smile:
@ilyakooo0 Yes I agree, I think it just isn't as strict as I'd want it to be because I don't know of any way to tell GHC that it can...
@ilyakooo0 I gave this a try but got stuck in something that I think should be trivial: ```haskell instance (Dimension a ca, Dimension b cb, cc ~ (ca + cb))...
@ilyakooo0 oh my bad! I renamed your `MatIndex` to `Dimension`, so ```haskell class Dimension t (cardinality :: Nat) | t -> cardinality where toDim :: t -> FromNat cardinality fromDim...
I'm having trouble even with your suggestion, I don't think it is possible to go via this type class :/
Awesome! I will try and also test this out :smile: I'll report back with any findings!
> Where are these types used? > > ```haskell > Count (M1 _ _ f p) = Count (f p) > Count (K1 _ _ _) = 1 > Count...