@@ -153,9 +153,10 @@ instance ToJSON T.Type where
154 case tipe of
154 case tipe of
155 T.Lambda t1 t2 ->
155 T.Lambda t1 t2 ->
156+ let tipes = T.collectLambdas tipe in
156 [ "tag" .= ("function" :: Text.Text)
157 [ "tag" .= ("function" :: Text.Text)
157− , "args" .= toJSON (T.collectLambdas t1)
158+ , "args" .= toJSON (init tipes)
158− , "result" .= toJSON t2
159+ , "result" .= toJSON (last tipes)
161 T.Var x ->
162 T.Var x ->