Skip to content

Add isthick trait for non-subtype implementations - #24

Merged
timholy merged 2 commits into
mainfrom
teh/foreign
Sep 5, 2026
Merged

Add isthick trait for non-subtype implementations#24
timholy merged 2 commits into
mainfrom
teh/foreign

Conversation

@timholy

@timholy timholy commented Sep 5, 2026

Copy link
Copy Markdown
Member

isthick(T) returns whether a type implements the ThickNumbers interface. Subtypes of ThickNumber return true automatically; a type with another supertype opts in by defining isthick(::Type{<:T}) = true and the required methods.

isempty_tn is the name such types implement in place of Base.isempty(::ThickNumber), which now forwards to it.

The developer docs list the requirements, and the interface tests check isthick.

Assisted-by: Claude Fable 5.1 noreply@anthropic.com

`isthick(T)` returns whether a type implements the ThickNumbers
interface. Subtypes of `ThickNumber` return `true` automatically;
a type with another supertype opts in by defining
`isthick(::Type{<:T}) = true` and the required methods.

`isempty_tn` is the name such types implement in place of
`Base.isempty(::ThickNumber)`, which now forwards to it.

The developer docs list the requirements, and the interface tests
check `isthick`.

Assisted-by: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.00%. Comparing base (dd5c79c) to head (6d7be1b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   93.87%   94.00%   +0.12%     
==========================================
  Files           2        2              
  Lines         147      150       +3     
==========================================
+ Hits          138      141       +3     
  Misses          9        9              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

There is no iszero_tn function: iszero is defined directly for
ThickNumber, so the list of derived methods names it without an @ref.
The unresolved reference failed the Documentation CI job on #24.

Assisted-by: Claude Fable 5.1 <noreply@anthropic.com>
@timholy
timholy merged commit 49aed10 into main Sep 5, 2026
5 checks passed
@timholy
timholy deleted the teh/foreign branch September 5, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant