@@ -153,9 +153,10 @@ instance ToJSON T.Type where
153153 object $
154154 case tipe of
155155 T.Lambda t1 t2 ->
156+ let tipes = T.collectLambdas tipe in
156157 [ "tag" .= ("function" :: Text.Text)
157− , "args" .= toJSON (T.collectLambdas t1)
158− , "result" .= toJSON t2
158+ , "args" .= toJSON (init tipes)
159+ , "result" .= toJSON (last tipes)
159160 ]
160161
161162 T.Var x ->