-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
test.saty:
module M = struct
module N = struct
let x = 1
end
end
module N = struct end
let z = M.N.xTypechecking test.saty results in the following error message:
! [Type Error] at "test.saty", line 9, characters 8-13:
undefined variable 'M.N.x'.
The reason may be that Typeenv.t contains name_to_id_map as a mapping from module names to module ids, not as a mapping from sequences of module names to module ids.
SATySFi/src/frontend/typeenv.ml
Line 69 in 69e62f6
| type name_to_id_map = ModuleID.t ModuleNameMap.t |
SATySFi/src/frontend/typeenv.ml
Lines 206 to 216 in 69e62f6
| let find (tyenv : t) (mdlnmlst : module_name list) (varnm : var_name) (rng : Range.t) : (poly_type * EvalVarID.t * stage) option = | |
| let open OptionMonad in | |
| let nmtoid = tyenv.name_to_id_map in | |
| let mtr = tyenv.main_tree in | |
| let addrlst = Alist.to_list tyenv.current_address in | |
| let addrlast = | |
| mdlnmlst |> List.map (fun nm -> | |
| match nmtoid |> ModuleNameMap.find_opt nm with | |
| | None -> raise (UndefinedModuleName(rng, nm, get_candidates ModuleNameMap.fold nmtoid nm)) | |
| | Some(mdlid) -> mdlid | |
| ) |
Reactions are currently unavailable