restructure std -> nib.types + change type naming convention
This commit is contained in:
parent
b9f2acf7e7
commit
eac4161b36
11 changed files with 129 additions and 139 deletions
|
|
@ -1,16 +0,0 @@
|
|||
{...}: rec {
|
||||
# Fault Monad
|
||||
# Wrapper around an error (ie builtins.abort)
|
||||
Fault = error: {
|
||||
error = error;
|
||||
};
|
||||
|
||||
# Pattern Matching
|
||||
isFault = F: builtins.attrNames F == ["error"];
|
||||
|
||||
# Unwrap (Monadic Return Operation)
|
||||
unwrap = F: F.error;
|
||||
|
||||
# Map (Monadic Bind Operation)
|
||||
map = f: F: Fault (f (unwrap F));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue