l4
Installation
SKILL.md
L4 — Programming Language for Law
Overview
L4 is a statically-typed functional programming language for computational law, inspired by Haskell. It enables legal professionals and developers to encode contracts, regulations, and policies as executable, testable, verifiable programs. L4 bridges the gap between human-readable legal text and machine-executable logic.
Cloud Validation Available: This skill includes a cloud-based validator that connects to wss://jl4.legalese.com/lsp, allowing you to validate L4 code without installing the Haskell toolchain locally. See Section 5 for details.
Core Workflow
When working with L4, follow this systematic approach:
1. Analyze Source Material
When given natural language legal text (PDFs, URLs, legislation):
- Identify the domain ontology: What entities, statuses, and categories exist? (Often unstated in source documents—use world knowledge)
- Extract decision logic: What are the business rules and conditions?
- Map state transitions: What obligations, deadlines, and modalities govern parties over time?