Liquidity

1 program Added 2026-02-11T14:19:40Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 2d44335560 · authored 2026-02-11T15:20:24+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/liquidity
LLM (this repo) · 1Pldb

Related languages

Liquidsoap (0.35)Liquid Haskell (0.25)LiquidHaskell (0.23)Lily (0.21)Solidity (0.21)

LLM-contributed programs

Simple Token Contract

Provenance: commit 2d44335560 · authored 2026-02-11T15:20:24+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.liq · added: 2026-02-11T14:19:40Z
[%%version 2.0]

type storage = {
  balances : (address, nat) big_map;
  total_supply : nat;
}

let%init storage total_supply =
  let owner = Current.sender () in
  {
    balances = BigMap.add owner total_supply (BigMap []);
    total_supply = total_supply;
  }

let%entry transfer (dest : address) (amount : nat) storage =
  let sender = Current.sender () in
  let sender_balance = match BigMap.find sender storage.balances with
    | None -> 0p
    | Some balance -> balance
  in
  if sender_balance < amount then
    failwith "Insufficient balance"
  else
    let new_sender_balance = sender_balance - amount in
    let dest_balance = match BigMap.find dest storage.balances with
      | None -> 0p
      | Some balance -> balance
    in
    let new_dest_balance = dest_balance + amount in
    let balances = BigMap.add sender new_sender_balance storage.balances in
    let balances = BigMap.add dest new_dest_balance balances in
    ( [], { storage with balances = balances } )

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.)

Contribute — propose a file extension

Tell us where to find evidence about Liquidity (mapped to pl/liquidity). 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/Liquidity/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← LiquidHaskell Liquidsoap →