From c306f0616acc1ace6e890e3a9e18fd8c51673f52 Mon Sep 17 00:00:00 2001 From: Mason Protter Date: Mon, 22 Jan 2024 15:35:25 +0100 Subject: [PATCH] keep custom `isexpr` --- src/SumTypes.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SumTypes.jl b/src/SumTypes.jl index eab4fc2..cbe4559 100644 --- a/src/SumTypes.jl +++ b/src/SumTypes.jl @@ -3,7 +3,6 @@ module SumTypes export @sum_type, @cases, Uninit, full_type using MacroTools: MacroTools -using Base: isexpr function constructors end function constructor end @@ -14,6 +13,8 @@ is_sumtype(::Type{T}) where {T} = false function get_tag end function tags end +isexpr(x, head) = x isa Expr && x.head == head + """ isvariant(x::SumType, s::Symbol)