package merlin-lib
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  Merlin's libraries
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      merlin-4.14-500.tbz
    
    
        
    
  
  
  
    
  
  
    
  
        sha256=ec23f324f875520cd8897f303cc6d4e595f3d7000914d410729f16b86ad1d70e
    
    
  sha512=8db22100cc0af65b08f456a2a7af84e75396f5869ee7552f1f5888a1c0279d1d85e6eecb3a677ae6f0973a99823cddba0563843ce216197255667342ef161885
    
    
  doc/merlin-lib.analysis/Merlin_analysis/Destruct/index.html
Module Merlin_analysis.DestructSource
Destruct at the moment works in two contexts:
- an expression context: It will replace the expression eunder the cursor with
  match e with
  | p1 -> _
  | ...This matching will be exhaustive.
If e has a "package" type, it will be replaced by let module M = (val e) in _
- a pattern context: Here two different behaviors can be observed:
- if your matching is not exhaustive, it will be made exhaustive.
- if your matching is exhaustive, it will refine the subpattern under the cursor if possible (i.e. if your cursor is on a variable or _ ).
* * *
Final remarks:
- Destruct will refuse to work on expression (resp. patterns) with a functional or polymorphic type.
- Constructors of variant types will be prefixed by their path (if necessary) but record labels will not. The reason is that we don't control the way things are printed, we reuse Pprintastwhich will print things like:{ Module.label1 = label1 ; Module.label2 = label2}where one would rather have{ Module.label1 ; label2 }. Since qualifying one label is less annoying than rewriting the whole pattern, we decided to note qualify labels (understanding that the code inserted by merlin in the buffer will sometimes be wrong).
Source
val node : 
  Merlin_kernel.Mconfig.t ->
  Merlin_kernel.Msource.t ->
  Merlin_specific.Browse_raw.node ->
  Merlin_specific.Browse_raw.node list ->
  Ocaml_parsing.Location.t * stringnode ~env parents current_node returns a location indicating which portion of the buffer must be replaced and the string to replace it with.
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >