on master help sign in
Fix silly mistake in formatting functions
d47407eEvan Czaplicki
compiler/Docs.hs+3−2
@@ -153,9 +153,10 @@ instance ToJSON T.Type where
153 object $
153 object $
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)
159 ]
160 ]
160
161
161 T.Var x ->
162 T.Var x ->