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

Agda Auto fails for multiline code #201

Open
CSchank opened this issue Nov 21, 2024 · 1 comment
Open

Agda Auto fails for multiline code #201

CSchank opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working unreproducible please provide more info

Comments

@CSchank
Copy link

CSchank commented Nov 21, 2024

When a multiline thing is generated using C-c C-a, newlines are printed instead of used as newlines:

_ : Normal (twoᶜ {∅})
_ = ƛ\n(ƛ\n (′\n  (` count (toWitness Agda.Builtin.Unit.tt)) ·\n  (′\n   (` count (toWitness Agda.Builtin.Unit.tt)) ·\n   (′ (` count (toWitness Agda.Builtin.Unit.tt))))))
@banacorn banacorn added the bug Something isn't working label Nov 23, 2024
@banacorn
Copy link
Owner

Sorry, can you provide a complete Agda file for reproduction?


I tried to reproduce this issue with the following file:

module Issue201 where

data N : Set where 
    S : N -> N
    Z : N

data Vec (A : Set) : N -> Set where
    [] : Vec A Z
    _::::::::::::::::::::::::::::::::::::::::::::::::::::::::::_ : {n : N} -> A -> Vec A n -> Vec A (S n)

example : Vec N (S (S (S (S (S (S (S (S (S Z)))))))))
example = {!   !}

I'd expect C-c C-a on the hole for example to give me a multiline result, and it did, with expected result:

example : Vec N (S (S (S (S (S (S (S (S (S Z)))))))))
example = Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
       (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
         (Z ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          []))))))))

The example above was generated with Agda-2.6.4, tried to ask Agda-2.7.0 to generate a solution but the new solver cannot find a solution somehow :|

@banacorn banacorn added the unreproducible please provide more info label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible please provide more info
Projects
None yet
Development

No branches or pull requests

2 participants