baetheus / fun

A collection of algebraic data types, optics, and data structures based on a light weight higher kinded type implementation. Written for deno.

Home Page:https://jsr.io/@baetheus/fun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Types 2.0

baetheus opened this issue · comments

Standard Module Implementation for types.ts

  • Add file block comment at top of file describing the adt/structure.
  • Check for any missing combinators/derivations that could be implemented.
  • Modify all combinator variable names to be readable (use style guide).
  • Add documentation to every export (and // comment local tools).
  • Check that every function and line is covered by tests in the testing directory.

Style Guide

  • Use A -> I, B -> J, C -> K, D -> L for inner types.
  • Use ua, va to match URI, VRI, etc in generic positions.
  • Implement algebraic structure types (type classes) out to length 4.
  • Use functions over const arrow functions for root exports.
  • Document all type exports.
  • Order file exports by group and then alphabetically. Groups are Types, Constructors, Combinators, Type Class Instances, Type Class Constructors, and Derived Combinators.

Documentation Guide

  • Start with at least one full sentence describing the use case for the export.
  • Include a @SInCE tag (default to 2.0.0)
  • Include an @example tag with a simple example
    • Imports should be relative for functional stuff and otherwise full urls with versions
    • Example should end with at least one assert from the deno std lib

Extras

  • Move owned types like Guard, Refinement, Nil, etc to their associated module files