Skip to content

Support String patterns#44

Open
AntonOresten wants to merge 1 commit intomainfrom
string-pattern
Open

Support String patterns#44
AntonOresten wants to merge 1 commit intomainfrom
string-pattern

Conversation

@AntonOresten
Copy link
Copy Markdown
Member

Currently has deprecation warnings to warn when these are actually used. It's only shown when running Julia with --depwarn=yes though. Might need to pass force=true since people are most likely to use it in REPL, or accidentally in source code.

Closes #42

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.97%. Comparing base (8a848de) to head (726afcf).

Files with missing lines Patch % Lines
src/String.jl 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   98.69%   94.97%   -3.72%     
==========================================
  Files          12       13       +1     
  Lines         383      398      +15     
==========================================
  Hits          378      378              
- Misses          5       20      +15     

☔ View full report in Codecov by Sentry.
📢 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.

@AntonOresten
Copy link
Copy Markdown
Member Author

Note that this is not and can't be done for reshape (#50), reduce, or repeat due to type piracy as they are defined in Base.

@AntonOresten
Copy link
Copy Markdown
Member Author

A possible workaround is defining the functions in Einops, such that users need to do using Einops: reshape, reduce, repeat, dispatching to Base.reshape when it doesn't match to ArrowPattern or String. This is kind of an all-or-nothing, where reduce can only be implicitly imported by one module, and it already is from Base.

@AntonOresten
Copy link
Copy Markdown
Member Author

I would really like to find a way to constant-propagate String. ccall has some String argument but I think that's a special case and not a normal function since it can't be taken as a variable.

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.

String patterns

1 participant