LightSumTypes.variant
— Functionvariant(inst)
Returns the variant enclosed in the sum type.
Example
julia> using LightSumTypes
+julia> @sumtype AB(A, B)
diff --git a/previews/PR112/.documenter-siteinfo.json b/previews/PR112/.documenter-siteinfo.json
index 3edf602..2d25f06 100644
--- a/previews/PR112/.documenter-siteinfo.json
+++ b/previews/PR112/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-17T23:18:54","documenter_version":"1.7.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-17T23:20:01","documenter_version":"1.7.0"}}
\ No newline at end of file
diff --git a/previews/PR112/index.html b/previews/PR112/index.html
index 4397bd7..35913b0 100644
--- a/previews/PR112/index.html
+++ b/previews/PR112/index.html
@@ -5,7 +5,7 @@
julia> struct B end;
-julia> @sumtype AB(A, B)source Returns the variant enclosed in the sum type. Example Returns the variant enclosed in the sum type. Example Returns all the enclosed variants types in the sum type in a namedtuple. Example Returns all the enclosed variants types in the sum type in a namedtuple. Example Returns the type of the variant enclosed in the sum type. Returns true if the type is a sum type otherwise returns false.LightSumTypes.variant
— Functionvariant(inst)
julia> using LightSumTypes
+julia> @sumtype AB(A, B)
LightSumTypes.variant
— Functionvariant(inst)
julia> using LightSumTypes
julia> struct A x::Int end;
@@ -17,7 +17,7 @@
AB'.A(0)
julia> variant(a)
-A(0)
LightSumTypes.allvariants
— Functionallvariants(SumType)
julia> using LightSumTypes
+A(0)
LightSumTypes.allvariants
— Functionallvariants(SumType)
julia> using LightSumTypes
julia> struct A x::Int end;
@@ -26,4 +26,4 @@
julia> @sumtype AB(A, B)
julia> allvariants(AB)
-(A = A, B = B)
LightSumTypes.variantof
— Functionvariantof(inst)
LightSumTypes.is_sumtype
— Functionis_sumtype(T)
Settings
This document was generated with Documenter.jl version 1.7.0 on Thursday 17 October 2024. Using Julia version 1.11.1.