diff options
Diffstat (limited to 'frontend/postparse.icl')
-rw-r--r-- | frontend/postparse.icl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/postparse.icl b/frontend/postparse.icl index 7db57bd..a81a358 100644 --- a/frontend/postparse.icl +++ b/frontend/postparse.icl @@ -1280,8 +1280,10 @@ reorganiseDefinitions icl_module [PD_TypeSpec pos name prio (Yes fun_type=:{st_a = (fun_defs, c_defs, imports, imported_objects, ca) # fun = MakeNewImpOrDefFunction name fun_type.st_arity bodies fun_kind prio (Yes fun_type) pos | icl_module - = ([fun : fun_defs], c_defs, imports, imported_objects, ca) - = ([fun : fun_defs], c_defs, imports, imported_objects, postParseError pos "function body not allowed in definition module" ca) + | case fun_kind of FK_Macro -> True; _ -> False + = ([fun : fun_defs], c_defs, imports, imported_objects, postParseError pos "macro with function type not allowed" ca) + = ([fun : fun_defs], c_defs, imports, imported_objects, ca) + = ([fun : fun_defs], c_defs, imports, imported_objects, postParseError pos "function body not allowed in definition module" ca) reorganiseDefinitions icl_module [PD_Type type_def=:{td_rhs = ConsList cons_defs} : defs] cons_count sel_count mem_count type_count ca # (cons_symbs, cons_count) = determine_symbols_of_conses cons_defs cons_count (fun_defs, c_defs, imports, imported_objects, ca) = reorganiseDefinitions icl_module defs cons_count sel_count mem_count (type_count+1) ca |