Language record
Clean
Clean modules are indexed with uniqueness types and type classes read as real structure: an instance is recorded against the type it is written for — resolved past the uniqueness constraint — and a where-local is a scoped symbol rather than a module-level one.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .icl, .dcl
- Registry names
clean- Recorded symbols
- modules · functions · types
Relationship types this analyzer constructs
9 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | ruled absent |
implements | constructed by this analyzer |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | constructed by this analyzer |
decorates | ruled absent |
renders | ruled absent |
mixes_in | ruled absent |
part_of | ruled absent |
9 constructed, 5 not constructed. All 5 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- An uppercase applied name that this file does not declare as a data constructor produces no construction edge. The population is measured at 24,986 sites on the pinned corpus: 78.31% name something no file declares at all, and of the 5,420 the file can name, zero are data constructors, so the node type alone proves a construction in no case. The declines are counted and published rather than dropped silently.
- Imported operators and linker inputs produce no edge at all: an operator item cannot be written as a module-and-name pair that resolves, and a foreign code import names a build input rather than a module.
- A .dcl signature and its .icl implementation merge only inside one file. Across files nothing merges, because the analyzer is handed a single root node and a path and has no project context to join them with.
Every line above was written against Clean’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .icl, .dcl. Everything below is about where those files actually sit in a working repository.
- A Clean library ships .dcl interface files beside .icl implementation files, and the two halves of one declaration merge into a single symbol.
- Uniqueness types are how Clean expresses absence and ownership, so a uniqueness constraint sits inside the type of almost every field.
- The standard library is generic, so one import line can bring in a type class together with its constructor set.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which type class does this instance implement, and for which type?
- Which record fields does this type carry?
- Which data constructors does this algebraic type have?
- Which functions does this module export?
What the analyzer sees in code like this
implementation module Data.Cart // bb records: module Data.Cart
:: Order = { id :: !Int, total :: !Int } // bb records: type Order · fields id, total
class Chargeable a where charge :: !a -> Int // bb records: interface Chargeable
instance Chargeable Order where charge o = o.total // bb records: Chargeable implemented for OrderSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Functional & declarative — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Clean, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.