coalton-lang / coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
https://coalton-lang.github.io/
MIT License
1.12k stars 67 forks source link

print-object method for seq:seq #1172

Closed garlic0x1 closed 1 month ago

garlic0x1 commented 1 month ago

Solves https://github.com/coalton-lang/coalton/issues/1144

COALTON-USER> (coalton (coalton-library/seq:make 1 2 3))
#.(SEQ 1 2 3)

To avoid the methods defined here being used, I short-circuited them by using an :around method.

Regarding the suggested output #.(seq:make 1 2 3), I replaced seq:make with just seq to match the implementations for Queue and Cell.

There will be nits, I will resolve them tomorrow :)

garlic0x1 commented 1 month ago

Now it prints like this:

COALTON-USER> (coalton (coalton-library/seq:make 1 2))
#<SEQ 1 2>
stylewarning commented 1 month ago

squash it all, and i'll merge.

great contribution and sleuthing! thanks!