File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -118,13 +118,12 @@ let expandTypes ~file ~package ~supportsMarkdownLinks typ =
118118      `InlineType  )
119119  |  all  ->
120120    let  typesSeen =  ref  StringSet. empty in 
121-     let  typeId  ~(env  : QueryEnv.t ) ~name   = 
122-       env.file.moduleName :: List. rev (name :: env.pathRev) |>  String. concat " ." 
123-     in 
124121    ( all
125122      (*  Don't produce duplicate type definitions for recursive types *) 
126-       |>  List. filter (fun  {env; name}  ->
127-              let  typeId =  typeId ~env  ~name  in 
123+       |>  List. filter (fun  {env; name; loc}  ->
124+              let  typeId = 
125+                TypeUtils. typeId ~env  ~name: (Location. mkloc name loc)
126+              in 
128127             if  StringSet. mem typeId ! typesSeen then  false 
129128             else  (
130129               typesSeen :=  StringSet. add typeId ! typesSeen;
Original file line number Diff line number Diff line change @@ -1179,6 +1179,12 @@ let transformCompletionToPipeCompletion ?(synthetic = false) ~env ?posOfDot
11791179        |  Some  posOfDot  -> Some  (makeAdditionalTextEditsForRemovingDot posOfDot));
11801180    }
11811181
1182+ (* * Light weight type id *) 
1183+ let  typeId  ~(env  : QueryEnv.t ) ~(name  : string Location.loc ) = 
1184+   (env.file.moduleName :: List. rev (name.txt :: env.pathRev)
1185+   |>  String. concat " ." 
1186+   ^  " :" ^  Loc. toString name.loc
1187+ 
11821188(* * This takes a type expr and the env that type expr was found in, and produces a globally unique 
11831189    id for that specific type. The globally unique id is the full path to the type as seen from the root 
11841190    of the project. Example: type x in module SomeModule in file SomeFile would get the globally  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments