about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ast/Ast.ml6
-rw-r--r--src/parser/Grammar.mly8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/ast/Ast.ml b/src/ast/Ast.ml
index bbf3e93..3e87776 100644
--- a/src/ast/Ast.ml
+++ b/src/ast/Ast.ml
@@ -1,4 +1,4 @@
-type ident = Name.t Asai.Range.located
+type name = Name.t Asai.Range.located
 type local_name = Name.local Asai.Range.located
 
 type arg = local_name * expr
@@ -31,7 +31,7 @@ and expr = raw_expr Asai.Range.located
 
 type item =
   | Def of {
-      name : ident;
+      name : name;
       args : arg List.t;
       tp : expr;
       tm : expr;
@@ -39,7 +39,7 @@ type item =
 
 type file = item List.t
 
-let dump_ident fmt ({ value; _ } : ident) = Name.pp fmt value
+let dump_name fmt ({ value; _ } : name) = Name.pp fmt value
 
 let dump_local_name fmt ({ value; _ } : local_name) = match value with
   | Some name -> Format.pp_print_string fmt name
diff --git a/src/parser/Grammar.mly b/src/parser/Grammar.mly
index 5e4886e..64f540d 100644
--- a/src/parser/Grammar.mly
+++ b/src/parser/Grammar.mly
@@ -25,10 +25,10 @@ open Ast
 %inline
 locate(X): e = X { Asai.Range.locate_lex ~source:(Eff.read()) $loc e }
 
-raw_ident: id = separated_nonempty_list(DOT, IDENT) { id }
+raw_name: id = separated_nonempty_list(DOT, IDENT) { id }
 
 %inline
-ident: id = locate(raw_ident) { id }
+name: name = locate(raw_name) { name }
 
 raw_local_name:
   | name = IDENT { Some name }
@@ -40,7 +40,7 @@ arg: LPR; name = local_name; COLON; tp = expr; RPR
 	{ (name, tp) }
 
 raw_expr:
-  | name = raw_ident
+  | name = raw_name
 	{ Var name }
   | LPR; e = raw_expr; RPR
 	{ e }
@@ -84,7 +84,7 @@ raw_expr:
 expr: e = locate(raw_expr) { e }
 
 item:
-  | DEF; name = ident; args = list(arg); COLON; tp = expr; ASSIGN; tm = expr
+  | DEF; name = name; args = list(arg); COLON; tp = expr; ASSIGN; tm = expr
     { Def { name; args; tp; tm } }
 
 file: items = list(item) { items }