79645984

Date: 2025-05-30 19:19:22
Score: 0.5
Natty:
Report link

While it may not be possible with type families, here is a hacked up solution.

class CurryN num a b | num a -> b, b -> a where 
    curryNp :: b -> a

makeTuple :: forall num a1 a2. CurryN (ToPeano num) a1 (a2 -> a2) => a1 
makeTuple = curryNp @(ToPeano num) id
instance CurryingN  (Succ (Succ Zero)) (v1 -> v2 -> v3) ((v1, v2) -> v3) where
    curryNp =curry
... for all tuples
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ashok Kimmel