package visitors
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  An OCaml syntax extension for generating visitor classes
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      archive.tar.gz
    
    
        
    
  
  
  
    
  
  
    
  
        md5=37a67faaa74c2cb9647d3fd25a979b6c
    
    
  sha512=feea43ccc6e2b7c48a5cceca7f38a78dcbf82fc8e334b22d643f4ce449b11fc4dcb1e500858a818a9b47dd4e30304bb90a450aff19daef969cc36e1f03af99a7
    
    
  doc/CHANGES.html
Changes
2020/02/07
- Avoid references to Pervasivesin the generated code.
- Switch from ocamlbuildtoduneto compilevisitors.
2018/05/13
- Fixes in _tagsandMETAso as to allowvisitorsto be used injbuilder(dune) projects. (Contributed by Armaël Guéneau.)
2018/03/06
- Warn when the visitor methods for two distinct types or two distinct data constructors have the same name, as this results in an OCaml type error or multiply-defined-method error. (Reported by Gabriel Radanne.)
2017/11/24
- Added compatibility with OCaml 4.06.0.
- Fixed the internal function occurs_typein the case of polymorphic types. This should make no observable difference, as this function is used only to produce an error message in a corner case.
2017/08/28
- Added compatibility with OCaml 4.05.0.
2017/07/25
- Updated src/Makefileto allow compilation on systems whereocamloptis missing. (Suggested by Ralf Treinen.)
2017/04/20
- New settings visit_prefix,build_prefix, andfail_prefixcan be used to control which prefixes are used in generated method names. (This feature was suggested by Philip Hölzenspies.)
2017/04/04
- Extended backward compatibility to OCaml 4.02.2. (Thanks to Benjamin Farinier.)
2017/03/17
- New attributes @buildand@@buildcan be attached to record type declarations and data constructors, so as to alter the construction code that is used inmap,endo, andmapreducevisitors. See the documentation for details. (This feature was suggested by Reuben Rowe.)
2017/03/15
- New attributes @nameand@@namecan be attached to types, type declarations, and data constructors, so as to alter the names of the generated methods. See the documentation for details. (This feature was suggested by Reuben Rowe.)
2017/03/08
- A new option polymorphic = trueallows generating visitor methods with polymorphic types. Withpolymorphic = true, a type variable'ais handled by a visitor functionvisit_'a, which is passed as an argument to every visitor method; whereas, withpolymorphic = false, a type variable'ais handled by a virtual visitor methodvisit_'a. Withpolymorphic = true, visitor classes compose better, and irregular algebraic data types are supported. See the documentation for more details. (This feature was suggested by Reuben Rowe.)
2017/03/03
- A new option data = falseallows suppressing the generation of visitor methods for data constructors. This makes the generated visitor slightly simpler and faster, but less customizable.
- A new option nude = trueallows not implicitly inheriting the classVisitorsRuntime.<variety>.
2017/02/15
- Makefile.preprocessis now installed with the package, so users can rely on it without needing to copy it. See the documentation for instructions.
2017/02/13
- Added a new variety of visitors, mapreduce. This visitor computes a pair of a data structure (like amapvisitor) and a summary (like areducevisitor). This can be used to annotate every tree node with information about the subtree that lies below it. See the documentation for an example.
2017/02/09
- Documentation: added a new subsection on OCaml objects, entitled "Where the expressiveness of OCaml's type system falls short". This section explains why mapcannot be a subclass offold, even though it should be.
2017/01/31
- Documentation: added an example of constructing a lexicographic ordering.
- Documentation: discussed generating visitors for existing types and ppx_import.
2017/01/26
- Initial release.
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page