Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions distribution/lib/Standard/Base/0.0.0-dev/docs/api/Any.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- >= self that:Standard.Base.Any.Any -> Standard.Base.Any.Any
- catch self error_type:Standard.Base.Any.Any= handler:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- catch_primitive self handler:Standard.Base.Any.Any -> Standard.Base.Any.Any
- has_warnings self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- if_not_error self ~other:Standard.Base.Any.Any -> Standard.Base.Any.Any
- if_not_nothing self ~action:Standard.Base.Any.Any -> Standard.Base.Any.Any
- if_nothing self ~other:Standard.Base.Any.Any -> Standard.Base.Any.Any
Expand All @@ -18,8 +17,6 @@
- map_error self ~f:Standard.Base.Any.Any -> Standard.Base.Any.Any
- map_nothing self f:Standard.Base.Any.Any -> Standard.Base.Any.Any
- pretty self -> Standard.Base.Any.Any
- remove_warnings self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- throw_on_warning self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- to self target_type:Standard.Base.Any.Any -> Standard.Base.Any.Any
- to_display_text self -> Standard.Base.Any.Any
- to_text self -> Standard.Base.Any.Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
- get_all_vector value:Standard.Base.Any.Any should_wrap:Standard.Base.Any.Any -> Standard.Base.Any.Any
- map_attached_warnings_helper mapper:Standard.Base.Any.Any value:Standard.Base.Any.Any frames_to_drop:Standard.Base.Any.Any -> Standard.Base.Any.Any
- set_array value:Standard.Base.Any.Any warnings:Standard.Base.Any.Any -> Standard.Base.Any.Any
- Standard.Base.Any.Any.has_warnings self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- Standard.Base.Any.Any.remove_warnings self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- Standard.Base.Any.Any.throw_on_warning self warning_type:Standard.Base.Any.Any= -> Standard.Base.Any.Any
46 changes: 0 additions & 46 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso
Original file line number Diff line number Diff line change
Expand Up @@ -572,49 +572,3 @@ type Any
In these contexts we recommend using `|>`.
|> : (Any -> Any) -> Any
|> self ~function = function self

## ---
group: Errors
icon: metadata
---
Checks if any warnings (either all or of a specified type) are attached to
the value.

## Arguments
- `warning_type`: The type to check if attached to the value. Defaults to
any warning.
has_warnings : Any -> Boolean
has_warnings self warning_type=Any =
_ = warning_type
False

## ---
group: Errors
icon: warning
---
Remove the warnings (either all or of a specified type) attached to the
value.

## Arguments
- `warning_type`: The type to remove if attached to the value. Defaults
to all warnings.
remove_warnings : Any -> Any
remove_warnings self warning_type=Any =
_ = warning_type
self

## ---
group: Errors
icon: error
---
Throws the first matching warning (either all or of a specified type) as a
data flow error.

## Arguments
- `warning_type`: The type to throw if attached to the value. Defaults to
all warnings.
throw_on_warning : Any -> Any
throw_on_warning self warning_type=Any =
_ = warning_type
self

43 changes: 43 additions & 0 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Warning.enso
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,46 @@ map_attached_warnings_helper mapper value frames_to_drop =
original (unwrapped) warning instance.
Nothing -> warning
Warning.set value mapped_warnings


## ---
group: Errors
icon: metadata
---
Checks if any warnings (either all or of a specified type) are attached to
the value.

## Arguments
- `warning_type`: The type to check if attached to the value. Defaults to
any warning.
Any.has_warnings self warning_type=Any =
_ = warning_type
False

## ---
group: Errors
icon: warning
---
Remove the warnings (either all or of a specified type) attached to the
value.

## Arguments
- `warning_type`: The type to remove if attached to the value. Defaults
to all warnings.
Any.remove_warnings self warning_type=Any =
_ = warning_type
self

## ---
group: Errors
icon: error
---
Throws the first matching warning (either all or of a specified type) as a
data flow error.

## Arguments
- `warning_type`: The type to throw if attached to the value. Defaults to
all warnings.
Any.throw_on_warning self warning_type=Any =
_ = warning_type
self
Loading