markokoleznik / agda-writer Goto Github PK
View Code? Open in Web Editor NEWA simple GUI for Agda
License: Other
A simple GUI for Agda
License: Other
Error messages and normalize results should end with \n
.
Parse \
as '`, that is in Agda the backslash is an ordinary charater (actually, it stands for lambda).
The project is called "Agda Writer" but the application icon says "Agda Wrapper". Which will it be?
User can add libraries when interacting with Agda. Libraries can be included in Preferences.
It would be nice to hhighlight the goal in the upper-right when the cursor is inside the corresponding {! ... !}
. Also, I tend to use spaces, so {! blah !}
instead of {!blah!}
, but I do not know if there is an adopted standard.
I set Path to Agda in preferences, closed the window. Opened it again, and nothing's there.
I tried working around this by editing the defaults.plist file, but after that I started getting:
*Error*
only one input file allowed
The part of the plist:
<key>agdaLaunchPath</key>
<string>/usr/local/Cellar/agda/2.5.3_1/bin/agda</string>
Suppose I have the following text:
g : Set -> Set
g x = x
and I place the cursor just after the =
sign. Then autocomplete shows up an offers that I change =
to ⇒
. This is slightly annoying but ok. Then if I press Esc
to cancel the suggestion, it shows up again and it seems hard to get rid of it. Also, it is annoying that any movement (say right arrow key) confirms the suggestion.
I would rather see auto-complete mini-windows disabled than showing up like this in annoying ways. Even if it is a user-defined preference, auto-complete shouldn't be popping up quite so eagerly.
Reasonable places to look:
~/.cabal/bin/agda
~/Library/Haskell/bin/agda
/Library/Haskell/bin/agda
The procedure:
agda
found in PATH
then use that (but do not set in preferences).agda
.agda
found in one of the reasonable places above (but user must confirm this choice, and has the ability to change).I set my Agda executable in preferences to /Users/andrej/.cabal/bin/agda
and as far as I can tell this is correct. However, this seems insufficient to launch Agda. How can I perform further tests to see what actually died? The output window shows that the launch response was empty.
The input method changes --
to –, so it's kind of hard to write comments. See "smart dashes" setting in Interface Builder.
When I try to open AgdaWriter.xcodeproj
Xcode says:
Project /Users/andrej/Documents/agda-writer/AgdaWriter.xcodeproj
cannot be opened because it is missing its project.pbxproj file.
Now what?
User should be able to write unicode characters in goals popup window, not just in main text window.
unicode tranformation works, but it would be nice to see autocompletion dialog as well when normalizing, for example.
In the "normalize" input dialog, how do I cancel it? Esc
does not seem to work.
I'm sending wrong indexes to Agda, that's why error messages shows wrong range of an error.
The automatic translation to unicode should work also when user presses Enter and Tab, (
or )
, not just Space. It should consider (
and )
as delimiters -- they are not part of the words. For instance, if I type:
g : (N -> N) -> N
g _ = zero
then all three N
s should become ℕ (I am not really sure about this particular translation).
After creating a NSTableView with appropriate delegate and datasource, it gets drawn on the screen, but ARC (automatic reference counting) immediately sets self.table to nil.
If you click or scroll (any interaction with table), exception with EXC_BAD_ACCESS is thrown.
There are no line numbers and there is no way to move automagically to the error reported by Agda, so this leaves the user in a hopeless situation. Two possible solutions would be to:
Strangley, it seems to look into given directory but still "throws" an error.
Perhaps how many spaces to insert can be a configurable setting.
If you press esc
in any of text input, words completions pops up. That's annoying :)
On Load in the following code sup ?
disappears:
module Foo where
data bool : Set where
false : bool
true : bool
or : bool -> bool -> bool
or false y = y
or true _ = true
data N : Set where
zero : N
succ : N -> N
data Ordinal : Set where
zer : Ordinal
suc : Ordinal -> Ordinal
sup : (N -> Ordinal) -> Ordinal
sum : Ordinal -> Ordinal -> Ordinal
sum zer y = y
sum (suc x) y = suc (sum x y)
sum (sup xs) y = {! sup ? !}
Since the version 2.5
Agda uses new package management.
Now, the error is thrown when loading a file:
Error: Only one input file allowed
The easiest way (I think) is to check the Agda version and decide what execution command to perform but that is a rather ugly one. Any suggestions?
@banacorn How did you solve this? Also by "hacking" ? :)
Really excited about this project!
Compiled myself using Xcode and tried to typecheck:
*Error*
/Users/nikita/Library/Developer/Xcode/DerivedData/Agda_Writer-bkhyhfeszfmmsyclqnrcntveamnu/Build/Products/Debug/Agda
Writer.app/Contents/Resources/Agda-2.4.2.2/lib/prim/Agda/Primitive.agda:
openFile: does not exist (No such file or directory)
How do I configure it? I just ran it from the command line from the DerivedData
directory.
Can you modify it so it compiles on linux?
module Foo where
data bool : Set where
false : bool
true : bool
or : bool -> bool -> bool
or false y = y
or true _ = true
f : bool -> bool
f x = {!!}
g : bool -> bool
g y = f {!? y!}
Commit version 07db2f0
When pasting code from somewhere else, style is also applied on that string (bold, color, background color...)
Implement undo, redo.
I was surprised that it didn't reload after a case split.
The Agda license allows that the Agda executable be packaged with another piece of software. It would be a complete win if we could package Agda with agda-writer and bring the cost of installation down to zero: just get it from the AppStore and viola!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.