Skip to content

Commit

Permalink
Minor indentation and comment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorchrob committed Aug 1, 2024
1 parent d662033 commit b5a484e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions src/lustre/typeCheckerContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,24 @@ let rec lookup_ty_syn: tc_context -> LA.ident -> tc_type list -> tc_type option
match (IMap.find_opt i (ctx.ty_syns), IMap.find_opt i (ctx.ty_ty_vars)) with
| Some ty, Some ps ->
let sigma = List.combine ps ty_args in
let ty = LustreAstHelpers.apply_type_subst_in_type sigma ty in
(match ty with
| LA.UserType (_, ty_args, uid) ->
if uid = i
then Some ty
else lookup_ty_syn ctx uid ty_args
| _ -> Some ty)
let ty = LustreAstHelpers.apply_type_subst_in_type sigma ty in (
match ty with
| LA.UserType (_, ty_args, uid) ->
if uid = i
then Some ty
else lookup_ty_syn ctx uid ty_args
| _ -> Some ty
)
| Some ty, None ->
let sigma = List.combine [] ty_args in
let ty = LustreAstHelpers.apply_type_subst_in_type sigma ty in
(match ty with
| LA.UserType (_, ty_args, uid) ->
if uid = i
then Some ty
else lookup_ty_syn ctx uid ty_args
| _ -> Some ty)
let ty = LustreAstHelpers.apply_type_subst_in_type sigma ty in (
match ty with
| LA.UserType (_, ty_args, uid) ->
if uid = i
then Some ty
else lookup_ty_syn ctx uid ty_args
| _ -> Some ty
)
| _ -> None
(** Picks out the type synonym from the context
If it is user type then chases it (recursively looks up)
Expand Down
2 changes: 1 addition & 1 deletion src/lustre/typeCheckerContext.mli
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ val lookup_contract_ty_vars: tc_context -> HString.t -> HString.t list option
(** Lookup a contract's type variables *)

val lookup_ty_ty_vars: tc_context -> HString.t -> HString.t list option
(** Lookup a type's type variables *)
(** Lookup a user type's type variables *)

val lookup_node_param_attr: tc_context -> LA.ident -> (HString.t * bool) list option
(** Track whether node parameters are constant or not *)
Expand Down

0 comments on commit b5a484e

Please sign in to comment.