Generated by GPT-5-mini| Idris (programming language) | |
|---|---|
| Name | Idris |
| Paradigm | Functional programming, Declarative programming, Dependent type theory |
| Designer | Edwin Brady |
| Developer | Edwin Brady |
| First appeared | 2007 |
| Typing | Static typing, Dependent type |
| Influenced by | Haskell (programming language), Agda (programming language), Coq (proof assistant) |
| Operating system | Cross-platform software |
| License | BSD license |
Idris (programming language) is a general-purpose functional programming language emphasizing a full-spectrum dependently typed type system for practical software development. Designed to bridge research in type theory and industrial programming, it supports interactive development, compilation to native code and integration with existing toolchains like LLVM and JavaScript. Idris aims to enable verified systems programming, domain-specific languages, and high-assurance applications while preserving pragmatic features found in languages such as Haskell (programming language) and tools from the Proof Assistant community.
Idris originated as a research project led by Edwin Brady in the late 2000s within the context of academic work on dependent types and functional programming languages. The language evolved through academic collaborations with institutions associated with The University of St Andrews and discussions at conferences such as ICFP and POPL, drawing influence from projects like Agda (programming language), Coq (proof assistant), and Lean (proof assistant). Early releases focused on interactive theorem construction and type-driven development; subsequent versions added backends targeting C (programming language), LLVM, and JavaScript to broaden deployment contexts. Community growth involved contributors from organizations familiar with open source software ecosystems, resulting in tooling and libraries supporting domains similar to research efforts at Microsoft Research and Google Research.
Idris integrates practical features for application development with research-grade type theory constructs. Core design choices include totality checking inspired by Agda (programming language) and pattern-matching semantics similar to Haskell (programming language). The language provides a module system influenced by ML (programming languages) styles, interactive REPL workflows akin to GHCi, and foreign function interfaces connecting to runtimes like Node.js and POSIX. Idris supports metaprogramming and reflection mechanisms comparable to facilities in Template Haskell and proof scripting reminiscent of Isabelle (proof assistant) tactics, enabling domain-specific verification pipelines used in projects at institutions such as Carnegie Mellon University and ETH Zurich.
The type system is dependently typed, permitting types to be parameterized by values and enabling expressive specifications directly in program interfaces. This design mirrors notions from Martin-Löf Type Theory and systems found in Coq (proof assistant) and Agda (programming language), allowing propositions-as-types workflows comparable to practice at INRIA and University of Cambridge research groups. Idris implements implicit arguments, type inference inspired by Hindley–Milner variants, and totality checking to ensure termination where required, paralleling features in Idris 2 research and implementations influenced by Annabelle (programming language) experiments. The system supports dependent records, indexed containers, and refinement-style types useful in verified cryptographic primitives researched at Stanford University and University of Cambridge Computer Laboratory.
Implementations include a compiler with backends for native code using LLVM, bytecode generators, and a JavaScript backend for web deployment. Tooling encompasses an interactive REPL, editor integrations for Visual Studio Code and Neovim, and debugging assistance similar to facilities in GHC (Glasgow Haskell Compiler). Build systems and package management practices intersect with Stack (Haskell tool) and Cargo (package manager), while continuous integration patterns follow conventions used by projects at GitHub and GitLab. The runtime and interop layers enable linkage to C libraries and runtime systems used by projects in organizations like Red Hat and NVIDIA.
The ecosystem offers libraries for parsing, serialization, concurrency, and numeric computation with influences from Hackage and package collections promoted by Stackage. Community-contributed packages support web frameworks analogous to Yesod, database bindings similar to PostgreSQL clients, and cryptography primitives referencing standards from NIST and implementations used at Mozilla. Domain-specific libraries have emerged for embedded systems, formal verification, and protocol implementation, paralleling work seen in Tock OS and research prototypes from MIT and Princeton University. Ecosystem growth has been fostered through workshops and sprints at conferences such as Strange Loop and LambdaConf.
Adoption spans academic research, tooling for verified software, and experimental production systems where correctness is critical. Case studies include prototype verifications for network protocols inspired by standards from IETF and security analyses similar to efforts at OpenSSL modernization projects. Companies interested in formal methods, including teams at Galois, Inc. and research labs at Microsoft Research, have explored Idris for DSL development and model-driven engineering. Educational use appears in university courses on type theory and programming language theory at University of Oxford and University of Cambridge.
Idris syntax resembles Haskell (programming language) with extensions for dependent types and totality annotations. A simple function signature demonstrates indexed types and implicit arguments used in tutorials from Edinburgh University and examples circulated at ICFP:
- Function types and pattern matching mirror constructs from Haskell (programming language). - Dependent pairs and records use notation influenced by Agda (programming language) examples taught at University of St Andrews. - Totality checking and proof-like terms follow styles presented in lectures at ETH Zurich and workshops at POP (conference).