Bläddra i källkod

fixed function type display.

Nicolas Cannasse 19 år sedan
förälder
incheckning
134e16be62
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      type.ml

+ 1 - 1
type.ml

@@ -177,7 +177,7 @@ let rec s_type ctx t =
 	| TFun ([],t) ->
 		"Void -> " ^ s_type ctx t
 	| TFun (l,t) ->
-		String.concat " -> " (List.map (fun (s,t) -> s ^ " : " ^ match t with TFun _ -> "(" ^ s_type ctx t ^ ")" | _ -> s_type ctx t) l) ^ " -> " ^ s_type ctx t
+		String.concat " -> " (List.map (fun (s,t) -> (if s = "" then "" else s ^ " : ") ^ match t with TFun _ -> "(" ^ s_type ctx t ^ ")" | _ -> s_type ctx t) l) ^ " -> " ^ s_type ctx t
 	| TAnon (fl,name) ->
 		(match name with
 		| Some s -> s