Mark Spanbroek
e8ab268758
Ensure that .? chains work in generic code
2021-05-04 15:55:05 +02:00
Mark Spanbroek
ebc7a2b48e
version 0.7.0
2021-04-19 15:53:27 +02:00
Mark Spanbroek
ee3d38d8d5
Fix typo
2021-04-19 15:52:15 +02:00
Mark Spanbroek
0569625f6a
Replace .get with operator `!`
...
Rationale: when looking for code that might crash it's
easier to spot exclamation marks than invocations of get.
2021-04-19 15:52:07 +02:00
Mark Spanbroek
db9e1a343a
Nim 1.4.6
2021-04-17 20:10:07 +02:00
Mark Spanbroek
fa56587bcd
Avoid wrapping option in option and result in result
2021-04-17 19:50:02 +02:00
Mark Spanbroek
d82581244c
Simplify
2021-04-17 19:25:33 +02:00
Mark Spanbroek
fca4c14e0c
version 0.6.3
2021-04-16 12:29:06 +02:00
Mark Spanbroek
a8834aea66
Add missing test from readme
2021-04-16 12:27:43 +02:00
Mark Spanbroek
ef5f796463
`without` statement
2021-04-16 12:27:17 +02:00
Mark Spanbroek
827214f7a9
questionable/results also exports chaining and indexing
2021-04-16 12:10:10 +02:00
Mark Spanbroek
b85a8eb5c8
version 0.6.2
2021-04-15 11:04:54 +02:00
Mark Spanbroek
144c70580a
Calling `success` without arguments returns ?!void result
2021-04-15 11:04:26 +02:00
Mark Spanbroek
a66e42d058
version 0.6.1
2021-04-15 10:55:21 +02:00
Mark Spanbroek
89850aab50
Makes |?, =? and .option compatible with other types of Result
2021-04-15 10:54:50 +02:00
Mark Spanbroek
83101ce073
version 0.6.0
2021-04-15 09:48:09 +02:00
Mark Spanbroek
fd73ff713f
Adds `failure` overload that uses `result` to determine type
2021-04-15 09:47:08 +02:00
Mark Spanbroek
86bfcc1a47
Use `failure` and `success` instead of `ok` and `err`
...
- Adds `isFailure` and `isSuccess`.
- No longer exports `ok`, `err`, `isErr` and `isOk`.
2021-04-15 09:39:37 +02:00
Mark Spanbroek
a2023ae18e
Documented how to work with =? in generic procs
2021-04-12 18:05:01 +02:00
Mark Spanbroek
a8fe7bf7b3
version 0.5.0
2021-04-12 16:08:20 +02:00
Mark Spanbroek
e66cd2439b
Remove errorban from public api
...
Reason: pushing pragmas in included files can have
unexpected side-effects.
2021-04-12 16:07:56 +02:00
Mark Spanbroek
3e92c35a85
Rename chaining and indexing operators
...
Chaining operator is now `.?`
Indexing operator is now `.?[]`
Reason: interoperability with the binding `=?` operator.
Chaining and indexing now have lower operator precedence
than binding, ensuring that expressions such as `if a =? b.?c`
work as expected.
2021-04-12 16:07:56 +02:00
Mark Spanbroek
e0d236aaf8
version 0.4.3
2021-03-22 14:06:10 +01:00
Mark Spanbroek
40f5b4f1b8
Allow indexing of tables with ?[]
2021-03-18 17:58:48 +01:00
Mark Spanbroek
91f97c73ef
Evaluate =? expressions only once
2021-03-18 16:59:55 +01:00
Mark Spanbroek
4f0010638b
version 0.4.2
2021-03-18 09:50:43 +01:00
Mark Spanbroek
aef59c42eb
Allow optional binding to vars
2021-03-18 09:50:06 +01:00
Mark Spanbroek
68153ab182
version 0.4.1
2021-03-16 09:45:57 +01:00
Mark Spanbroek
74c5089d49
Allow failure() to be called with string argument
2021-03-16 09:45:06 +01:00
Mark Spanbroek
21927f3c88
Replace "check false" with "fail"
2021-03-13 11:54:03 +01:00
Mark Spanbroek
1d5a0222a7
Better type annotations for ->? operator
2021-03-13 11:46:26 +01:00
Mark Spanbroek
56e0e123d6
version 0.4.0
2021-03-13 11:10:41 +01:00
Mark Spanbroek
43f09e8c86
Rename toOption() -> option()
...
To match the style of std/options, where option() is also used
to convert a ref to an Option.
2021-03-13 11:10:05 +01:00
Mark Spanbroek
b8e52b6acf
Add comments to clarify chaining code
2021-03-13 11:02:27 +01:00
Mark Spanbroek
e266870dfa
version 0.3.0
2021-03-11 17:51:18 +01:00
Mark Spanbroek
8683732d99
Chaining operator becomes ?. instead of .?
2021-03-11 17:50:30 +01:00
Mark Spanbroek
53924aeeda
Handle calls and operators following a .? chain
...
Fixes #3
2021-03-11 16:17:26 +01:00
Mark Spanbroek
0e166a6e81
Update readme test
2021-03-09 09:42:35 +01:00
Mark Spanbroek
8a5ff10244
version 0.2.0
2021-03-09 09:26:01 +01:00
Mark Spanbroek
1ad83adc9d
Convert Result to Option
2021-03-09 09:23:40 +01:00
Mark Spanbroek
c7fabfc23b
Add readme
2021-03-08 16:11:20 +01:00
Mark Spanbroek
59548bcd74
Use operator lifting for the indexing operator
2021-03-08 16:11:01 +01:00
Mark Spanbroek
fe8acac2cd
Fix warning in Nim 1.2.6
2021-03-07 13:07:33 +01:00
Mark Spanbroek
1b47843012
Lift operators so that they can be used on options and results
2021-03-07 13:07:33 +01:00
Mark Spanbroek
dfe4e3cc4b
Continuous integration with Github actions
2021-03-06 10:54:11 +01:00
Mark Spanbroek
81ed9b652c
Initial version of questionable
...
Syntactic sugar for std/options, pkg/result and pkg/stew
2021-03-06 10:38:44 +01:00