conlang: add lang items, remove Empty, and shuffle typeck
This commit is contained in:
4
stdlib/std/never.cl
Normal file
4
stdlib/std/never.cl
Normal file
@@ -0,0 +1,4 @@
|
||||
//! Never: the return type of an infinite loop
|
||||
|
||||
#[lang = "never"]
|
||||
type Never = !;
|
||||
@@ -1,6 +1,7 @@
|
||||
//! The optional type, representing the presence or absence of a thing.
|
||||
use super::preamble::*;
|
||||
|
||||
#[lang = "option"]
|
||||
pub enum Option<T> {
|
||||
Some(T),
|
||||
None,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! The Result type, indicating a fallible operation.
|
||||
use super::preamble::*;
|
||||
|
||||
#[lang = "result"]
|
||||
pub enum Result<T, E> {
|
||||
Ok(T),
|
||||
Err(E),
|
||||
|
||||
Reference in New Issue
Block a user