-- | Number of argument needed to fully apply a function
typeArgCnt :: Type -> Int
typeArgCnt x = cnt x - 1
  where
    cnt (_ :-> b) = 1 + cnt b
    cnt (TVar _)  = 1
    cnt (TCon _)  = 1
    cnt (TCns {}) = 1

-- | (Expected type, Actual type)
typeArgCnt :: Type -> Int
typeArgCnt x = cnt x - 1
  where
    cnt (_ :-> b) = 1 + cnt b
    cnt (TVar _)  = 1
    cnt (TCon _)  = 1
    cnt (TCns {}) = 1

-- | (Expected type, Actual type)
typeArgCnt x = cnt x - 1
  where
    cnt (_ :-> b) = 1 + cnt b
    cnt (TVar _)  = 1
    cnt (TCon _)  = 1
    cnt (TCns {}) = 1

-- | (Expected type, Actual type)