Feldspar

1 program Added 2026-02-28T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 9fc90e3e7a · authored 2026-02-28T20:25:59+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Felix (0.21)Feline (0.20)F* (0.17)F-star (0.14)Fexl (0.14)

LLM-contributed programs

Vector operations (dot product, norm, scale, sum)

Provenance: commit 9fc90e3e7a · authored 2026-02-28T20:25:59+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.hs · license: BSD-3-Clause · added: 2026-02-28T10:00:00Z
module Examples where

import Feldspar
import Feldspar.Vector

-- | Dot product of two vectors
dotProd :: Pull DIM1 (Data Float) -> Pull DIM1 (Data Float) -> Data Float
dotProd a b = sum (zipWith (*) a b)

-- | Euclidean norm of a vector
norm :: Pull DIM1 (Data Float) -> Data Float
norm v = sqrt (dotProd v v)

-- | Scale a vector by a scalar factor
scale :: Data Float -> Pull DIM1 (Data Float) -> Pull DIM1 (Data Float)
scale s = map (* s)

-- | Sum of all elements in an integer vector
vectorSum :: Pull DIM1 (Data Int32) -> Data Int32
vectorSum = fold (+) 0

Contribute — propose a file extension

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