Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Smallstep + Types + STLC + StlcProp #50

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

jutaro
Copy link

@jutaro jutaro commented Sep 5, 2018

This pull request is just to make you aware that I try to port the Smallstep chapter. Help welcome and needed.

@clayrat
Copy link
Collaborator

clayrat commented Sep 23, 2018

Hey, thanks for the help! I'll try to review in the next few days.

@clayrat clayrat changed the title WIP Smallstep. WIP Smallstep + Types Sep 23, 2018
@clayrat
Copy link
Collaborator

clayrat commented Sep 23, 2018

I see you have added the Types chapter, so I changed the name on this PR :)

@jutaro
Copy link
Author

jutaro commented Sep 26, 2018

Hi Alex,
I will now start to work on the STLC chapter. It would be nice if you find some time to
give feedback and help with my work. I will go to vacations middle of next week.

Here some remarks:

Namespaces:
I see you and Eric did translate modules to namespaces. Actually Idris namespaces seem to me not of
much use: If I understand it right they just make a new name, but you can't say that some namespace
shall not be used or imported. So the compiler always complain and you have to use qualified names,
which is ugly. So I used new names and symbols instead of namespaces, which is ugly as well.

(This caused me problems as well when doing the first chapter exercises, which I couldn't resolve
completely).

Syntax:
I prefered to use operators instead of syntax wherever possible. I used syntax just for Has_type,
(|- a . T), but I can't use it at many positions, because otherwise the compiler complains.
(E.g it reads now: Has_type (Tsucc t) TNat -> |- t . TNat, instead of |- Tsucc t . TNat -> |- t . TNat)

Big versus Small letters:
I tried to use Big Letters for types and constructors but leave everything else as it is. I'm not happy
with the mixture of camelcase and Big and Little letters in use. (E.g. in the Typing chapter:
ttrue is the Term Constructor, which became Ttrue in my translation and T_True is the type assignment constructor.

Implicit aruments:
I'm not shure when to add implicit arguments and when to name them, and things get worse for me for data constructors and type level functions. See for example Multi definition from Smallstep.

Proofs:
I'm currently stuck with the progress proof from types chapter, which is an exercise, so that the difficult part is not visible, if you agree I can send you/show you what I have so far. What I basically don't understand here is to proof, that "x is not a value" so this case is not possible.

Documentation generation:
I managed to install the documentation generation toolchain (Exercise: 5 stars ;)).
I used the most up to date versions of the packages and the following changes become necessary:

In the Makefile PANDOC_FLAGS
--pdf-engine=xelatex instead of --latex-engine=xelatex

As well I would like to add --strip-comments to the PANDOC_FLAGS, because this gives the opportunity to
hide parts with simple HTML comment syntax. (E.g. I skipped the Imp part of Smallstep chapter)

As well I had to take out this two lines from book.tex to make it work:

  • \let\RequirePackage\original@RequirePackage
  • \let\usepackage\RequirePackage

Can I check the changes in my pull request, or should I do a seperate pull request?

As well sillyfun1_odd from Tactics is not working for minted, and latex can't recover from this. I found some problems with prooftrees in Imp.lidr.

Can I check in the current pdf in my pull request to become already useful for interested learners?

Suggestion:
Link to the pdf/project from the Idris documentation side, as I consider it already the best ressource to learn more about Idris (at least for me it was, and it is difficult to find). Shall I care about this?

Best regards
Jürgen

@jutaro jutaro changed the title WIP Smallstep + Types WIP Smallstep + Types + STLC Sep 26, 2018
@yurrriq
Copy link
Collaborator

yurrriq commented Sep 26, 2018

Thanks for this. I’ll try to check it out sometime between tonight and Monday.

@clayrat
Copy link
Collaborator

clayrat commented Oct 18, 2018

So, just to let you know, I've started reviewing Smallstep at last, got almost halfway through it.

@jutaro
Copy link
Author

jutaro commented Oct 18, 2018

That fits well, as I start with one more chapter.

@clayrat clayrat changed the title WIP Smallstep + Types + STLC WIP Smallstep + Types + STLC + StlcProp Oct 19, 2018
@clayrat
Copy link
Collaborator

clayrat commented Nov 7, 2018

@jutaro I've pushed my WIP post-review fixes for Smallstep directly on this PR, hope you don't mind?

@jutaro
Copy link
Author

jutaro commented Nov 8, 2018

I scanned your changes, and see that I made some errors with exercises and that the complicated proofs now looks much nicer! I have one problem when compiling, and get the following error, which I don't understand. But I have idris 1.3.0, so maybe I shall upgrade to 1.3.1?

Smallstep.lidr:278:3-65:
|
278 | > step_deterministic ST_PlusConstConst' ST_PlusConstConst' = Refl
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clauses have differing numbers of arguments

@clayrat
Copy link
Collaborator

clayrat commented Nov 8, 2018

Oops, pushed an update.

@jutaro
Copy link
Author

jutaro commented Nov 8, 2018

Now it compiles, you are working on the imperative part. Cool

@clayrat
Copy link
Collaborator

clayrat commented Nov 28, 2018

Ok I think I'm done with Smallstep, gonna start with Types next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants