Git Product home page Git Product logo

agda-kernel's Introduction

agda-kernel's People

Contributors

lclem avatar zampino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

agda-kernel's Issues

Kernel seems to install correctly, but only produces "cell must be evaluated first..."

I recently installed the kernel, together with the Jupyter notebook extensions (agda-extension). All seems well, the kernel starts as it should on a new notebook, but every time I press Sfift-Enter on a cell, all I get is "cell needs to be evaluated first...". This happens even with commands like "%autosave 300", that execute in any other kernel. I tried in vain to find a fix for this on the net.

wrong hole order in the presence of where clauses

The holes in the following fragment

module code.hole-test where

f : ∀ {A : Set} → A → A
f a = ? where
    g : ∀ {B : Set} → B → B
    g b = ?

are reported by Agda as

?0 : B
?1 : A

while the kernel expects them the other way around. Fixing this requires analysing the nesting structure of the where clauses.

Completion Issues (Give instead of Case Split)

@lclem let me first thank you for your work on the kernel, we're trying to use it at nextjournal to get Agda running.

Using the kernel I've encountered some issues with Tab completions:

  1. Give command is always accepted if the provided expression type-checks alright, but we might want to trigger a case split instead (as meantioned in the README) like in this case:

missing-case-split

  1. suggestions from agsy involving chains of eq-reasoning are split erroneously

Screenshot 2019-10-22 at 18 50 46

From logs I understand it's a matter of splitting response lines from agsy:

[IPKernelApp] ERROR | result is: Listing solution(s) 0-9
0  cong suc (+-assoc m n p)
1  begin
suc (m + n + p) ≡⟨ cong suc (+-assoc m n p) ⟩
suc (m + (n + p)) ≡⟨
sym (cong (λ _ → suc (m + (n + p))) (+-assoc m p p)) ⟩
suc (m + (n + p)) ∎
2  begin
suc (m + n + p) ≡⟨ cong suc (+-assoc m n p) ⟩
suc (m + (n + p)) ≡⟨
sym (cong (λ _ → suc (m + (n + p))) (+-assoc m p n)) ⟩
suc (m + (n + p)) ∎
3  begin
suc (m + n + p) ≡⟨ cong suc (+-assoc m n p) ⟩
suc (m + (n + p)) ≡⟨
sym (cong (λ _ → suc (m + (n + p))) (+-assoc m p m)) ⟩
suc (m + (n + p)) ∎
4  begin .....

Given it is hard to map the whole agda-mode onto just two commands (Tab and Shift+Tab) do you have suggestions on how to solve 1. (while for 2. I probably can open a pull request for a fix). Would it make sense to always prefer AGDA_CMD_MAKE_CASE command in case the expression in the hole isn't empty and the case command succeeds? (Returning both the result of give and case split might mess up cursor start/end for substitution in the client).

Do you think we could handle case split over agsy? Do you know if it's possible to pass agsy options directly into the hole? Something like {! -c m !} in the context of the first example above to trigger case split.

You can remix this nextjournal notebook to reproduce the issues above.

Supported Agda versions

What versions of Agda does the kernel support? It seems that it doesn't work with the current release candidate.

incremental output

when a cell takes very long to evaluate, it may be convenient to do incremental output to show the user that the kernel is doing something. cf. here.

support for OPTIONS pragma

Currently a code cell is restricted to start with a module xxx where line,
which effectively prevents the use of OPTIONS pragmas such as {-# OPTIONS --cubical #-}.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.