what does "##core#check" do?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

what does "##core#check" do?

Marco Maggi
Ciao,

  in the "record-variants" egg there is:

   (##core#check (##sys#check-structure x ',original-name))

I understand what:

   (##sys#check-structure x ',original-name)

does,  but  what  is  the  "##core#check" for?   In  other  code  I  see
"##sys#check-structure" uses without it.

TIA
--
Marco Maggi

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: what does "##core#check" do?

Peter Bex
On Tue, May 14, 2019 at 07:05:41AM +0200, Marco Maggi wrote:

> Ciao,
>
>   in the "record-variants" egg there is:
>
>    (##core#check (##sys#check-structure x ',original-name))
>
> I understand what:
>
>    (##sys#check-structure x ',original-name)
>
> does,  but  what  is  the  "##core#check" for?   In  other  code  I  see
> "##sys#check-structure" uses without it.
It's an annotation in the core language (see core.scm) that causes the
expression inside to be eliminated in unsafe mode.  In normal mode, it
will just walk the expression as if the ##core#check wasn't there.

Cheers,
Peter

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users

signature.asc (499 bytes) Download Attachment