Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unitful as a package extension #49

Closed
JeffFessler opened this issue May 12, 2024 · 1 comment
Closed

Unitful as a package extension #49

JeffFessler opened this issue May 12, 2024 · 1 comment

Comments

@JeffFessler
Copy link
Owner

No description provided.

@JeffFessler
Copy link
Owner Author

On 2nd thought, let's keep it Number to support other number types besides Unitful

Here is how I might have tried to do it with extensions, but it may not work anyway:

    _ext = Base.get_extension(@__MODULE__, :MIRTjim_Units)
    if isnothing(_ext)
        const RealU = Real
    else
        const RealU = Union{Real, _ext.Unitful.Length}
    end

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

No branches or pull requests

1 participant