dry-monads-sorbet 1.0.0 → 1.1.0.pre.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +2 -2
- data/dry-monads-sorbet.gemspec +1 -1
- data/lib/dry/monads/sorbet.rb +4 -0
- data/lib/dry/monads/sorbet/version.rb +1 -1
- data/rbi/dry-monads.rbi +14 -11
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e63c7f2683c4f670315300ab39f081e9883976856c52d6244c0aebea7d2ba0ac
|
4
|
+
data.tar.gz: f6a910c42a3242926ee8b9b1b0e505a7672266072c89cee37f0d01b73945c8dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25c51e24fc69a19671e9c855407e4a17aef0630fde1d4412100d24316f8ccabb6e7220211c69c50814bf6e8f4418434c2d533cd88e952bfd12d559a9f31bb439
|
7
|
+
data.tar.gz: 1252fa88e4fc280d1d0ac30f4269d643298687a31081365b12f5fab8b2a2ec9e498f8952ed5695d318d033cf2f7f5310fbc998d35f11ceb9ad25339ad9d466c3
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.1
|
data/README.md
CHANGED
data/dry-monads-sorbet.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['luke.worth@bellroy.com']
|
11
11
|
|
12
12
|
spec.summary = 'Sorbet type hints for Dry::Monads'
|
13
|
-
spec.homepage = 'https://github.com/tricycle/dry-monads-
|
13
|
+
spec.homepage = 'https://github.com/tricycle/dry-monads-sorbet'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
# Specify which files should be added to the gem when it is released.
|
data/lib/dry/monads/sorbet.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require 'sorbet-runtime'
|
5
|
+
|
4
6
|
class Dry::Monads::Result
|
5
7
|
extend T::Sig
|
6
8
|
extend T::Generic
|
9
|
+
|
7
10
|
FailureType = type_member
|
8
11
|
SuccessType = type_member
|
9
12
|
end
|
@@ -11,5 +14,6 @@ end
|
|
11
14
|
class Dry::Monads::Maybe
|
12
15
|
extend T::Sig
|
13
16
|
extend T::Generic
|
17
|
+
|
14
18
|
Elem = type_member
|
15
19
|
end
|
data/rbi/dry-monads.rbi
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
#
|
3
3
|
# dry-monads-1.3.1
|
4
4
|
#
|
5
|
-
# Note: This file depends on dry/monads/sorbet to define generics.
|
6
|
-
|
7
5
|
module Dry
|
8
6
|
end
|
9
7
|
module Dry::Monads
|
@@ -39,7 +37,12 @@ module Dry::Monads::Transformer
|
|
39
37
|
def fmap3(*args); end
|
40
38
|
end
|
41
39
|
class Dry::Monads::Maybe
|
40
|
+
extend T::Sig
|
41
|
+
extend T::Generic
|
42
42
|
extend T::Helpers
|
43
|
+
|
44
|
+
Elem = type_member
|
45
|
+
|
43
46
|
abstract!
|
44
47
|
sealed!
|
45
48
|
|
@@ -78,21 +81,14 @@ class Dry::Monads::Maybe
|
|
78
81
|
end
|
79
82
|
def to_result(val = nil, &blk); end
|
80
83
|
|
81
|
-
sig {returns(T::Boolean)}
|
82
84
|
def failure?; end
|
83
85
|
def monad; end
|
84
|
-
|
85
|
-
sig {returns(T::Boolean)}
|
86
86
|
def none?; end
|
87
87
|
def self.coerce(value); end
|
88
88
|
def self.lift(*args, &block); end
|
89
89
|
def self.pure(value = nil, &block); end
|
90
90
|
def self.to_proc; end
|
91
|
-
|
92
|
-
sig {returns(T::Boolean)}
|
93
91
|
def some?; end
|
94
|
-
|
95
|
-
sig {returns(T::Boolean)}
|
96
92
|
def success?; end
|
97
93
|
def to_maybe; end
|
98
94
|
def to_monad; end
|
@@ -162,7 +158,13 @@ module Dry::Monads::Maybe::Hash
|
|
162
158
|
def self.filter(hash); end
|
163
159
|
end
|
164
160
|
class Dry::Monads::Result
|
161
|
+
extend T::Sig
|
162
|
+
extend T::Generic
|
165
163
|
extend T::Helpers
|
164
|
+
|
165
|
+
FailureType = type_member
|
166
|
+
SuccessType = type_member
|
167
|
+
|
166
168
|
abstract!
|
167
169
|
sealed!
|
168
170
|
|
@@ -204,8 +206,9 @@ class Dry::Monads::Result
|
|
204
206
|
def failure; end
|
205
207
|
|
206
208
|
sig do
|
207
|
-
|
208
|
-
.returns(Dry::Monads::Result[
|
209
|
+
type_parameters(:NewFailureType)
|
210
|
+
.params(blk: T.proc.params(arg0: FailureType).returns(Dry::Monads::Result[T.type_parameter(:out, :NewFailureType), SuccessType]))
|
211
|
+
.returns(Dry::Monads::Result[T.type_parameter(:out, :NewFailureType), SuccessType])
|
209
212
|
end
|
210
213
|
def or(&blk); end
|
211
214
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-monads-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.pre.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Worth
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet
|
@@ -132,7 +132,7 @@ files:
|
|
132
132
|
- lib/dry/monads/sorbet.rb
|
133
133
|
- lib/dry/monads/sorbet/version.rb
|
134
134
|
- rbi/dry-monads.rbi
|
135
|
-
homepage: https://github.com/tricycle/dry-monads-
|
135
|
+
homepage: https://github.com/tricycle/dry-monads-sorbet
|
136
136
|
licenses:
|
137
137
|
- MIT
|
138
138
|
metadata: {}
|
@@ -147,12 +147,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - ">"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 1.3.1
|
153
153
|
requirements: []
|
154
|
-
|
155
|
-
rubygems_version: 2.7.6.2
|
154
|
+
rubygems_version: 3.1.2
|
156
155
|
signing_key:
|
157
156
|
specification_version: 4
|
158
157
|
summary: Sorbet type hints for Dry::Monads
|