ReScript

1 program Added 2025-10-28T06:38:48Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit fe3e3ac922 · authored 2025-10-28T07:38:49+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

6 sources · pl_id: pl/rescript
LLM (this repo) · 1PldbLinguistWikipediaRosettacodeWikidata · Q116885321

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: functional · imperative · modular · object-oriented
First appeared2020
Influenced byOCaml · Reason · JavaScript
LicenseMIT
Implemented inOCaml
Homepagehttps://rescript-lang.org/

Extensions claimed by this language

4 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.reslinguistprimary2.2M files
.reswikidataprimary2.2M files
.resiwikidataprimary5.0K files
.resilinguistsecondary5.0K files

Related languages

RiveScript (0.57)ZScript (0.46)AppleScript (0.44)LuneScript (0.44)RapydScript (0.44)

LLM-contributed programs

React Reducer Counter Example

Provenance: commit fe3e3ac922 · authored 2025-10-28T07:38:49+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.res · added: 2025-10-28T06:38:48Z
type state = {count: int}

type action =
  | Click
  | Reset

let initialState = {count: 0}

let reducer = (state, action) =>
  switch action {
  | Click => {count: state.count + 1}
  | Reset => {count: 0}
  }

@react.component
let make = () => {
  let (state, dispatch) = React.useReducer(reducer, initialState)

  let message = "You've clicked " ++ state.count->Int.toString ++ " times"

  <div>
    <button onClick={_ => dispatch(Click)}> {React.string(message)} </button>
    <button onClick={_ => dispatch(Reset)}> {React.string("Reset")} </button>
  </div>
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.res/0.respredicates[{"kind": "any", "regexes": ["^\\s*(let|module|type)\\s+\\w*\\s+=\\s+", "^\\s*(?:include|open)\\s+\\w+\\s*$"]}]

Contribute — propose a file extension

Tell us where to find evidence about ReScript (mapped to pl/rescript). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/ReScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Reprog Reset →