getKinds :: Exp -> [(Name, Kind)]
getKinds t = case flatten t of
                (Const x):xs -> let arity = length xs
                                    k = aToKind arity in
                                (x, k):(concat $ map getKinds xs)
                (Var x):xs -> concat $ map getKinds xs
                _ -> error "impossible happens in getKinds function"
getKinds :: Exp -> [(Name, Kind)]
getKinds t = case flatten t of
                (Const x):xs -> let arity = length xs
                                    k = aToKind arity in
                                (x, k):(concat $ map getKinds xs)
                (Var x):xs -> concat $ map getKinds xs
                _ -> error "impossible happens in getKinds function"
getKinds t = case flatten t of
                (Const x):xs -> let arity = length xs
                                    k = aToKind arity in
                                (x, k):(concat $ map getKinds xs)
                (Var x):xs -> concat $ map getKinds xs
                _ -> error "impossible happens in getKinds function"