Prelude Reference
The eucalypt prelude is a standard library of functions, operators, and constants that is automatically loaded before your code runs. You can suppress the prelude with -Q if needed, though this leaves a very bare environment (even true, false, and if are defined in the prelude).
Categories
Section titled “Categories”- Lists – list construction, transformation, folding, sorting (91 entries)
- Blocks – block construction, access, merging, transformation (66 entries)
- Strings – string manipulation, regex, formatting (36 entries)
- Numbers and Arithmetic – numeric operations and predicates (32 entries)
- Booleans and Comparison – boolean logic and comparison operators (12 entries)
- Combinators – function composition, application, utilities (14 entries)
- Calendar – date and time functions (8 entries)
- Sets – set operations (15 entries)
- Dicts – persistent ordered dictionaries (24 entries)
- Random Numbers – random number generation, monadic random: namespace (15 entries)
- Metadata – metadata and assertion functions (4 entries)
- IO – environment, time, argument access, and monad utility (86 entries)
403 documented entries in total.
Standard Libraries
Section titled “Standard Libraries”These are not part of the prelude (they require an explicit import) but ship with eucalypt:
- Lens Library (
{ import: "lens.eu" }) — composable lenses and traversals for reading and updating nested data:view,over,to-list-of,parts-of,at,ix,item,element,each,filtered,each-element,filtered-elements,_value,_key,‹›path shorthand.