Define `debug.ml` and `prettify.ml` to clean-up some code. Change-Id: Iee2e1ed666f2ccb5e56cc50054ca85b8ba513f3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7078 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com>
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			261 B
		
	
	
	
		
			OCaml
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			261 B
		
	
	
	
		
			OCaml
		
	
	
	
	
	
| open Types
 | |
| 
 | |
| (* Pretty-print the type, t. *)
 | |
| let rec type' (t : _type) : string =
 | |
|   match t with
 | |
|   | TypeInt -> "Integer"
 | |
|   | TypeBool -> "Boolean"
 | |
|   | TypeVariable k -> Printf.sprintf "%s" k
 | |
|   | TypeArrow (a, b) -> Printf.sprintf "%s -> %s" (type' a) (type' b)
 |