Zahary Karadjov
42475fd2f1
Fix a FieldError crash in the == comparison for Result[void, T]
2021-02-22 21:04:27 +02:00
Jacek Sieka
a0e8ec451e
results: include error when expecting ( #76 )
2021-02-10 11:05:29 +01:00
Mamy Ratsimbazafy
6d3e6a21ca
results.`==` with void, Reboot #73 addressing comments ( #74 )
2021-01-26 15:06:17 +01:00
Mamy Ratsimbazafy
b4b3841a85
Revert "Allow comparing Result[void, E] ( #71 )" ( #73 )
...
This reverts commit 068412ff4e
.
2021-01-26 14:20:09 +01:00
Mamy Ratsimbazafy
068412ff4e
Allow comparing Result[void, E] ( #71 )
2021-01-26 14:12:08 +01:00
Jacek Sieka
e15c1ae012
results: prevent dangling cstring pointers in result ( #63 )
2020-12-09 17:21:12 +01:00
Zahary Karadjov
2b9e5f34d1
Some fixes for Result[T, void]
2020-09-29 21:31:20 +03:00
Jacek Sieka
ec2f52b0ce
results: make `?` work with void ( #50 )
2020-07-13 18:09:45 +02:00
Mamy Ratsimbazafy
11aeb996ab
Error message typo
2020-06-23 19:46:18 +02:00
Giovanni Petrantoni
5fa6bb2742
Add a note about compiler crash with raises pragma (results)
2020-05-12 19:37:15 +09:00
Jacek Sieka
2d9226464d
heterogenous `or`
...
Useful for translating `error` results
2020-05-08 18:54:36 +03:00
Jacek Sieka
8065e36c5a
results: fix non-void [] overload
2020-04-23 06:46:10 +02:00
Zahary Karadjov
4acc3866ed
Adds results.Opt
...
It turned out that Nim's Option type is broken for `not nil` and
`requiresInit` types. It will report an udesired warning due to
the way `none` is defined. The `Result` type doesn't suffer from
this problem, so I've transitioned some APIs in NBC to use the
new `results.Opt[T]` type (alias of `Result[T, void]`).
Perhaps we should renamed `Result` to `Res` to make the naming
more consistent and to allow the code to more easily fit in the
80 character per-line budget.
2020-04-22 15:43:26 +03:00
Jacek Sieka
ff755bbf75
change get/[] to always raise Defect and tryGet to do eh bridge mode ( #30 )
...
* also sprinkle mixin randomly across the codebase
2020-04-16 18:23:12 +02:00
Jacek Sieka
805ef4f1b2
result: cleanups
...
* fix defect raising without `$`
* doc updates
* better `?` that doesn't cause raises effect (it should, because of
FieldError but...)
2020-04-11 16:22:37 +02:00
Jacek Sieka
b06a5b6e32
result -> results ( #27 )
2020-04-07 11:43:07 +02:00