Questions tagged [pie-lang]

The Pie language is a dependently-typed language vaguely similar to scheme. The language was designed to accompany the book "The Little Typer".

Further details can be found on the website for "The Little Typer". Its source code can be found at the GitHub Pie repository.

8 questions
6
votes
1 answer

Unknown variable +

In the Little Typer chapter 2 frame 100 gives the following definition: (claim pearwise+ (→ Pear Pear Pear)) (define pearwise+ (λ (anjou bosc) (elim-Pear anjou (λ (a1 d1) (elim-Pear bosc (λ (a2 d2) …
Mike Harris
  • 869
  • 9
  • 21
3
votes
1 answer

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…
Dess
  • 2,064
  • 19
  • 35
2
votes
1 answer

How to include another file into a Pie language file in racket?

When writing in the Pie language within racket (i.e., a file starting with #lang pie) is there a way to include another file into the current file? I.e., something like #include "common.pie".
banbh
  • 1,331
  • 1
  • 13
  • 31
2
votes
1 answer

The Little Typer

In "The Little Typer" book, I am just starting to use DrRacket. From a David Christiansen video, I inputted: (claim two-plus-two-is-four (= Nat (+ 2 2) 4)) which returned an error: claim : this function is not defined. Why?
1
vote
1 answer

The Little Typer. I don't understand the meaning of The Initial Second Commandment of λ

I have tried following examples, but no matter y occurred or not, The function f returns the same value as (λ(y)(f y)) after application. I would like to do is to define a function that is not the same (-> Y X) as (λ (y)(f y)) when y occurred in y…
Lyu Yao Ting
  • 121
  • 5
1
vote
3 answers

When is a list a list, and when is a list an application?

I am trying to learn a bit of type theory. This is being taught using a dialect of lisp the author wrote called pie. Let's say we have defined some function f that takes a single argument of type A and produces an output of type B and I have some a…
Grant
  • 438
  • 2
  • 13
0
votes
1 answer

Writing a type for which-Nat in pie-lang

After reading the documentation for which-Nat, copied here: (which-Nat target base step) → X target : Nat base : X step : (-> Nat X) which-Nat is a case operator on Nat. Examples: > (which-Nat 0 0 (λ (smaller) smaller)) …
Reb.Cabin
  • 5,426
  • 3
  • 35
  • 64
0
votes
1 answer

vec:: in The Little Typer

I am going through the Fifth Printing of The Little Typer with racket and pie-lang, and find the following conundrum. I have checked the errata but find no help, there. While the example in Frame 6-25, pg. 134 works as shown: (claim first-of-one …
Reb.Cabin
  • 5,426
  • 3
  • 35
  • 64