Content deleted Content added
No edit summary |
Added in the list of statically typed programming languages (as described in 'Typing discipline'). |
||
(14 intermediate revisions by 10 users not shown) | |||
Line 3:
{{Infobox programming language
| name = Idris
| paradigm = [[
| designer = Edwin Brady
| developer =
| released = {{Start date and age|2007}}<ref>{{cite web |last=Brady |first=Edwin |date=2007-12-12 |title=Index of /~eb/darcs/Idris |url=http://www-fp.cs.st-and.ac.uk/~eb/darcs/Idris/ |website=[[University of St Andrews]] School of Computer Science |archive-url=https://web.archive.org/web/20080320233322/http://www-fp.cs.st-and.ac.uk/~eb/darcs/Idris/ |archive-date=2008-03-20 |df=dmy}}</ref>
|
|
|
|
| typing = [[Type inference|Inferred]], [[Static typing|static]], [[Strong and weak typing|strong]]
| implementations =
| dialects =
|
| influenced =
|
| license = [[BSD licenses|BSD]]
| file ext = .idr, .lidr
Line 23 ⟶ 22:
}}
'''Idris''' is a [[purely functional programming|purely-functional]] [[programming language]] with [[dependent type]]s, optional [[lazy evaluation]], and features such as a [[Termination analysis|totality checker]]. Idris may be used as a [[proof assistant]], but
The Idris [[type system]] is similar to [[Agda (programming language)|Agda]]'s, and proofs are similar to [[Coq (software)|Coq]]'s, including
Idris is named after a singing dragon from the 1970s UK children's television program ''[[Ivor the Engine#Idris the Dragon|Ivor the Engine]]''.<ref>{{cite web |title=Frequently Asked Questions |url=http://docs.idris-lang.org/en/latest/faq/faq.html#what-does-the-name-idris-mean |access-date=2015-07-19}}</ref>
==Features==
Line 41 ⟶ 40:
</syntaxhighlight>
The only differences between this program and its [[Haskell
===Inductive and parametric data types===
Idris supports [[inductively-defined data type]]s and [[parametric polymorphism]].
<syntaxhighlight lang="idris">
Line 50 ⟶ 49:
</syntaxhighlight>
or in the more general [[
<syntaxhighlight lang="idris">
Line 91 ⟶ 90:
===Proof assistant features===
Dependent types are powerful enough to encode most properties of programs, and an Idris program can prove invariants at compile time.
There are two standard ways of interacting with proof assistants: by writing a series of tactic invocations (Coq style), or by interactively elaborating a proof term ([[Epigram (programming language)|Epigram]]
===Code generation===
Because Idris contains a proof assistant, Idris programs can be written to pass proofs around. If treated naïvely, such proofs remain around at runtime. Idris aims to avoid this pitfall by aggressively erasing unused terms.<ref>{{cite web |url=http://idris.readthedocs.org/en/latest/reference/erasure.html |title=Erasure By Usage Analysis
By default, Idris generates native code through [[C (programming language)|C]]. The other officially supported backend generates [[JavaScript]].
==Idris 2==
Idris 2 is a new [[Self-hosting (compilers)|self-hosted]] version of the language which deeply integrates a [[linear type system]], based on [[quantitative type theory]]. It currently compiles to [[Scheme (programming language)|Scheme]] and [[C (programming language)|C]].<ref>{{Cite web |title=idris-lang/Idris2 |url=https://github.com/idris-lang/Idris2 |access-date=2021-04-11 |website=GitHub |language=en}}</ref>
==See also==
Line 108 ⟶ 107:
==References==
{{
==External links==
*
* [http://hackage.haskell.org/package/idris Idris at the Hackage repository]
* [http://docs.idris-lang.org/en/latest/index.html Documentation for the Idris Language (tutorial, language reference, etc.)]
{{Haskell programming}}
{{Programming languages}}
Line 122:
[[Category:Free software programmed in Haskell]]
[[Category:Haskell programming language family]]
[[Category:Articles with example Haskell code]]
[[Category:Cross-platform free software]]
[[Category:Free
[[Category:Software using the BSD license]]
[[Category:Programming languages created in 2007]]
Line 129 ⟶ 130:
[[Category:2007 software]]
[[Category:Pattern matching programming languages]]
[[Category:Statically typed programming languages]]
|