Skip to content

Instantly share code, notes, and snippets.

Created February 6, 2020 17:10
What would you like to do?
Differences between ML and Lisp
pyon% poly
Poly/ML 5.8 Release
> datatype foo = Foo;
datatype foo = Foo
> val mine = Foo;
val mine = Foo: foo
> datatype foo = Foo;
datatype foo = Foo
> val yours = Foo;
val yours = Foo: foo
> mine = yours;
poly: : error: Type error in function application.
Function: = : ?.foo * ?.foo -> bool
Argument: (mine, yours) : ?.foo * foo
Reason: Can't unify ?.foo with foo (Different type constructors)
Found near mine = yours
Static Errors
pyon% sbcl
This is SBCL 2.0.0, an implementation of ANSI Common Lisp.
More information about SBCL is available at <>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defclass foo () ())
* (defvar my-foo (make-instance 'foo))
* (defclass foo () ())
* (defvar your-foo (make-instance 'foo))
* (eq (class-of my-foo) (class-of your-foo))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment