Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
giopaglia committed Nov 25, 2024
1 parent 6db91fe commit 2c3d066
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/syntactical-normal-forms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@ struct LeftmostLinearForm{C<:Connective,SS<:SyntaxStructure} <: SyntaxStructure
end

# Ugly!!
function LeftmostLinearForm{C}(grandchildren::AbstractVector, args...) where {C<:Connective}
function LeftmostLinearForm{C}(
grandchildren::AbstractVector,
allow_empty::Bool = false,
args...
) where {C<:Connective}
allow_empty || length(grandchildren) > 0 || error("Cannot instantiate LeftmostLinearForm{$(C)} with no grandchildren.")
SS = SoleBase._typejoin(typeof.(grandchildren)...)
LeftmostLinearForm{C,SS}(grandchildren, args...)
LeftmostLinearForm{C,SS}(grandchildren, allow_empty, args...)
end

function LeftmostLinearForm(
Expand Down

0 comments on commit 2c3d066

Please sign in to comment.