As of now, when you define a guard with `defguard` it adds the
attribute: `@doc guard: true`, we could include guards that are defined
with `defguard` and any other macros with this attribute set. Or we
could introduce  a new attribute for identifying guards, as @doc seems
limited to documentation only.

`defguardp`  are private so they wouldn't be available to be imported.

On Mon, 13 Jun 2022 09:21:39 -0700 (PDT)
Kenny Evitt <kenny.ev...@gmail.com> wrote:

> So the `:guards` option would only import guard macros?
> 
> Should this option also import guards that are NOT defined using
> `defguard` or `defguardp`?
> 
> On Monday, June 13, 2022 at 10:02:46 AM UTC-4 eksperimental wrote:
> 
> > Hi,
> > Currenly import/1 allows us to import :functions, :macros, :sigils
> > with the :only option.
> > I have found myself to manually have to list every guard I want to
> > import from my "Util" module. This has been a recurring issue.
> >
> > I think it will be a good addition given the nature of guards that
> > since they are macros they need to be required, plus usually you
> > don't want to have the module name when you call the guard.
> >
> > What do you guys think?
> >  
> 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/62a76955.1c69fb81.d33d9.30f0SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to