Skip to content

References and Importing

andydhancock edited this page Nov 16, 2023 · 1 revision

References and Importing

LegaleseScript provides a mechanism for referencing external documents, laws, and cases, as well as importing other LegaleseScript files. This allows for the reusability of contract components and ensures that contracts can dynamically link to authoritative sources.

Importing Documents

Use the import keyword to include external LegaleseScript files or documents into the current contract. This is useful for standard clauses, definitions, or entire sections that are used across multiple contracts.

Syntax

import "NonDisclosureAgreement.legalese";

Best Practices

  • File Paths: Use relative paths to reference files within the same repository or project.
  • File Extension: Use a consistent file extension like .legalese for LegaleseScript files.

Legal References

For referencing laws, regulations, and cases, LegaleseScript introduces specific constructs that allow users to cite these sources with precision and clarity.

Law Reference

Declare references to legal statutes with the LawReference construct. This can later be used to access specific sections or provisions.

const Law employmentAct = LawReference("Employment Act 2006");

Accessing Law Sections

Access specific sections of a law using the .section() method.

const Section unfairDismissal = employmentAct.section(94);

Case Reference

Declare references to case law with the CaseReference construct.

const Case leadingCase = CaseReference("Donoghue v Stevenson [1932] UKHL 100");

Accessing Case Paragraphs

Access specific paragraphs or points within case law using the .paragraph() method.

const Paragraph dutyOfCare = leadingCase.paragraph(15);

Assignable References

Assignable references allow you to assign a law or case to a variable, providing an easy way to cite it multiple times within the contract.

// Assigning a law reference to a variable
const Law equalityAct = LawReference("Equality Act 2010");
// Accessing a specific section using the assigned variable
const Section discriminationProvision = equalityAct.section(13);

Versioning and Amendments

LegaleseScript can also handle versioning of contracts and amendments. This allows authors to reference previous versions and clearly indicate changes.

Version Control

Use the version keyword to specify the current version of the contract.

version("2.1.0");

Amendment Reference

Use amendReference to link to a previous version of a contract or document and describe the amendment.

amendReference("EmploymentAgreement_v1.0", "Added remote work provision");

Conclusion

References and importing are critical features in LegaleseScript, allowing legal professionals to create documents that are both precise in their legal citations and efficient in their use of common clauses and sections. By standardizing these processes, LegaleseScript ensures that contracts are up-to-date and maintain legal integrity.

Clone this wiki locally