Skip to content

Commit f1c7cd2

Browse files
authored
Add 'apply' to exported functions in LightSumTypes
1 parent fcb08e4 commit f1c7cd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LightSumTypes.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module LightSumTypes
33

44
using MacroTools: namify
55

6-
export @sumtype, sumtype_expr, variant, variantof, allvariants, is_sumtype
6+
export @sumtype, sumtype_expr, variant, variantof, allvariants, is_sumtype, apply
77

88
unwrap(sumt) = getfield(sumt, :variants)
99

@@ -194,7 +194,7 @@ is_sumtype(T::Type) = false
194194

195195
function variant_idx end
196196

197-
function _is_sumtype_structurally(T)
197+
function _is_sumtype_structurally(T)
198198
return T isa DataType && fieldcount(T) == 1 && fieldname(T, 1) === :variants && fieldtype(T, 1) isa Union
199199
end
200200

0 commit comments

Comments
 (0)