Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pie language: Manual vs Real life

For the new scheme-like, dependently-typed language 'Pie', I purchased the language's companion book: The Little Typer (http://thelittletyper.com/)

I'm trying to follow along with the code using DrRacket, but I'm getting on errors when I type the code in the book.

(cons 'ratatouille 'baguette)

I get this error: "Can't determine a type"

Since both of the symbols are Atoms, shouldn't that call to cons work?

Also, the '+' function is undefined, even for numbers. Does Pie have prelude that can be imported to provide such basic things.

like image 269
Dess Avatar asked Oct 18 '25 11:10

Dess


1 Answers

Try

#lang pie
(the (Pair Atom Atom)
  (cons 'foo 'foo))
like image 186
soegaard Avatar answered Oct 22 '25 05:10

soegaard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!