concept base in category idris

appears as: base
Type-Driven Development with Idris

This is an excerpt from Manning's book Type-Driven Development with Idris.

Packages: prelude and base

Idris modules can be combined into packages, from which individual modules can be imported. The Prelude is defined in a package called prelude, from which all modules are imported automatically. Idris programs also have access to a package called base, which defines several commonly useful data structures and algorithms including Vect, but from which modules must be imported explicitly. Up-to-date documentation for the packages distributed with Idris is available at www.idris-lang.org/documentation.

Figure 4.2. Example shapes represented as a union type. Triangle takes two Doubles, for base and height; Rectangle takes two Doubles, for width and height; Circle takes a Double for radius.