Shen kata: type-safe reference cells

77 views
Skip to first unread message

Mark Thom

unread,
Jun 8, 2015, 11:56:15 PM6/8/15
to qil...@googlegroups.com
I've started a blog which will contain various exercises ("katas") in Shen, mostly to introduce the language to people
without overwhelming them.

The link is below. I'd ask that you please *NOT* post the link elsewhere until I've had the opportunity to receive 
sufficient feedback on the writing and accuracy of technical statements, to incorporate suggestions from others
in the community, etc. Thanks.

Artella Coding

unread,
Jun 9, 2015, 1:44:12 AM6/9/15
to qil...@googlegroups.com
Wow thanks for taking the time to write a detailed post like that. 

A section (maybe in an appendix) on using spy+ to track the inferences made by shen (and an explanation of what each output at each step means) would be useful, since when one makes an error in the sequent rules one invariably has to resort to using spy+ to debug.

Mark Tarver

unread,
Jun 9, 2015, 6:08:31 AM6/9/15
to qil...@googlegroups.com, artella...@googlemail.com
Very good;  I'll put this up as a resource.  Might I suggest putting this link on comp.lang.functional when you're happy?   Or even a video?

A lot of people don't really understand Shen.  

Small note; unit is actually built into Shen as a type - though this probably does not affect your program.

Mark

Mark Thom

unread,
Jun 9, 2015, 11:20:41 AM6/9/15
to qil...@googlegroups.com, dr.mt...@gmail.com, artella...@googlemail.com
I may talk about spy in a future post. 

Mark, how do you produce the default unit value? I'd like to use that instead.

Mark Thom

unread,
Jun 9, 2015, 11:25:17 AM6/9/15
to qil...@googlegroups.com, markjor...@gmail.com, dr.mt...@gmail.com, artella...@googlemail.com
Never mind, I found it in the BoS. unit is uninhabited.

Mark Thom

unread,
Jun 9, 2015, 11:29:12 AM6/9/15
to qil...@googlegroups.com, markjor...@gmail.com, artella...@googlemail.com, dr.mt...@gmail.com
OK, I corrected the bit about unit types. I'm fine with the link being posted wherever.

Mark Tarver

unread,
Jun 9, 2015, 5:30:28 PM6/9/15
to qil...@googlegroups.com, markjor...@gmail.com, artella...@googlemail.com, dr.mt...@gmail.com
unit is produced by certain functions like read and read-file to return objects whose type is unknown;  these objects can be printed etc. but not manipulated by any type specific operation.

Mark
Reply all
Reply to author
Forward
0 new messages