Re: Finding the type signature of a function

80 views
Skip to first unread message

Mark Tarver

unread,
May 12, 2013, 12:38:59 PM5/12/13
to Qilang
(7-) (tc +)
true

(8+) print
print : (A --> A)

Mark

On 12 May, 16:23, Artella Coding <artella.cod...@googlemail.com>
wrote:
> Hi, how do I find the type signature of a function? I was looking to find
> out what the type signature of the "print" function was. Thanks.

Bruno Deferrari

unread,
May 14, 2013, 10:49:17 AM5/14/13
to qil...@googlegroups.com
Hi Artella. The `shen-` prefix has changed to `shen.` in Shen9, if you
change that the code should work in the Chibi and Ruby ports:

Shen 2010, copyright (C) 2010 Mark Tarver
released under the Shen license
www.shenlanguage.org, version 10
running under Scheme, implementation: chibi-scheme
port 0.5 ported by Bruno Deferrari


(0-) (shen.variant? (shen.typecheck print B) [A --> A])
true

(1-) (element? print (value shen.*signedfuncs*))
true


On Mon, May 13, 2013 at 7:23 PM, Artella Coding
<artella...@googlemail.com> wrote:
> Hi jpd, thanks. I only managed to get this to work on Joel's java port
> (https://www.assembla.com/code/shen-on-java/git/nodes), for which I got :
>
> Shen 2010, copyright (C) 2010 Mark Tarver
> www.shenlanguage.org, version 7
> running under Java, implementation: Shen on Java
> port 0.7.2 ported by Joel Shellman
>
> (0-) (shen-variant? (shen-typecheck print B) [A --> A])
> true
>
> (1-) (element? print (value shen-*signedfuncs*))
> true
>
>
>
> When I tried on the latest Ruby port
> (https://github.com/gregspurrier/shen-ruby) I got :
>
> Shen 2010, copyright (C) 2010 Mark Tarver
> released under the Shen license
> www.shenlanguage.org, version 11
> running under Ruby, implementation: ruby 1.9.3
> port 0.5.0 ported by Greg Spurrier
>
>
> (0-) (shen-variant? (shen-typecheck print B) [A --> A])
> The function shen-typecheck is undefined
>
> (1-) (element? print (value shen-*signedfuncs*))
> variable shen-*signedfuncs* has no value
>
>
> When I tried on the Chibi Shen port (https://github.com/tizoc/chibi-shen) I
> got :
>
> Shen 2010, copyright (C) 2010 Mark Tarver
> released under the Shen license
> www.shenlanguage.org, version 11
> running under Scheme, implementation: chibi-scheme
> port 0.5 ported by Bruno Deferrari
>
> (0-) (shen-variant? (shen-typecheck print B) [A --> A])
> undefined variable: (shen-variant?)
>
> (1-) (element? print (value shen-*signedfuncs*))
> variable has no value:: (shen-*signedfuncs*)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Qilang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to qilang+un...@googlegroups.com.
> To post to this group, send email to qil...@googlegroups.com.
> Visit this group at http://groups.google.com/group/qilang?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
BD
Reply all
Reply to author
Forward
0 new messages