From e99f9e060575930bac00240f252bf6f975a13deb Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Wed, 14 Mar 2018 19:28:14 +0000 Subject: WIP Latex formatting Added option -latex that outputs input to a latex document. Added doc comments that can be attached to certain AST nodes - right now just valspecs and function clauses, e.g. /*! Documentation for main */ val main : unit -> unit These comments are kept by the sail pretty printer, and used when generating latex --- src/initial_check.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/initial_check.ml') diff --git a/src/initial_check.ml b/src/initial_check.ml index 0019f18f..12d56484 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -859,8 +859,8 @@ let to_ast_def (names, k_env, def_ord) partial_defs def : def_progress envs_out let _ = Envmap.iter (fun v' k -> Printf.eprintf "%s -> %s\n" v' (kind_to_string k) ) (Envmap.union k k_env) in *) (match !d with | DEF_fundef(FD_aux(FD_function(r,t,e,fcls),fl)),false -> - let funcl = to_ast_funcl (names,Envmap.union k k_env,def_ord) funcl in - d:= DEF_fundef(FD_aux(FD_function(r,t,e,fcls@[funcl]),fl)),false; + let (FCL_aux (funcl_aux, _)) = to_ast_funcl (names,Envmap.union k k_env,def_ord) funcl in + d:= DEF_fundef(FD_aux(FD_function(r,t,e,fcls@[FCL_aux (funcl_aux, (l, ()))]),fl)),false; (No_def,envs),partial_defs | _,true -> typ_error l "Scattered funciton definition clauses extends ended defintion" (Some id) None None | _ -> typ_error l "Scattered function definition clause matches an existing scattered type definition header" (Some id) None None))) -- cgit v1.2.3