I installed Adga with 'apt-get install agda-mode'. I've got a working 'Hello World' program written in Agda shown in the screenshot below
But when I go to Agda > Compile it asks me for a 'backend' shown in this second screenshot
I've tried typing in 'GHC' as my back end but it just says '/usr/share/libghc-agda-dev/MAlonzo/src: getDirectoryContents:openDirStream: does not exist (No such file or directory)'
Agda > Load seems to work. How do I get my Agda program to compile?
I personally recommend you to install agda via haskell's Cabal (you can have it by installing haskell-platform, and installing haskell will install ghc). The debian maintained package of agda is currently broken and has issues with the standard library.
cabal update
cabal install agda
you can install both standard library and agda-mode via apt install. After all that (keep in mind that cabal will compile agda, so it will take some time), add the standard library to agda's local settings. Open emacs and load the file to type-check it, or compile it if it has a executable code.
Related
I am building a Haskell library with Cabal that I would like to install to use in some other projects. I am using Windows PowerShell and new style Cabal commands. I have ghc 8.10.1 and Cabal 3.2.0.0 and used Chocolatey to install them. cabal new-install --lib builds and installs the library just fine and without warnings. From --verbose output I noticed that Cabal mentions folder C:\Users\Liisi\AppData\Roaming\cabal\store\ghc-8.10.1\package.db and it does contain my package.
However, when I try to compile a test project that consists of a single Haskell file that uses this library, ghc can't find the library. (The test project is not itself a Cabal project since I intend to use the library for tiny, mostly single-file projects.)
ghc Test.hs and ghc --make Test.hs both fail to find the library. ghc-pkg list does not list the name of my library. In another question (which was probably the wrong question to ask) I got the suggestion to try ghc -package-env=C:\Users\Liisi\.ghc\x86_64-mingw32-8.10.1\environments\default --make and this one does work - however, it would defeat the main purpose of making the library a Cabal project (convenience and usability).
I've also had an opportunity to test my package on OSX and everything worked as expected. So it's probably a Windows-specific issue.
Evince3 Source Code link = http://ftp.gnome.org/pub/GNOME/sources/evince/3.26/
I downloaded the Evince3 pdf reader program source code from the above link. and installed msys2 with gcc and gtk3 librares. Evince3 created using gtk3 module in C. but I don't know how to compile source code of Evince3 for using this program on Windows. Is it possible ?
Thanks.
I was curious to learn how to build Gtk apps on windows, so I did it myself, and it took me around one hour.
I followed this guide, https://blogs.gnome.org/nacho/2014/08/01/how-to-build-your-gtk-application-on-windows.
Note that the author used gedit as example. To install evince, you need to download three files from this directory(get 32 or 64 version of install file), https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-evince.
Modify pkgver to 3.26.0 and sha256sum to the hash value in evince-3.26.0.sha256sum in PKGBUILD file, and follow the rest of instructions.
Other way: It's also possible to install pre-built package from mysys2 repo with compiling the source code. Open the msys2 console and give the following command to install Evince.
pacman -S mingw-w64-x86_64-evince
please tell me how to install Aubit4gl using a source package in windows i.e. I'm looking for windows commands equivalent for ./configure and make install. I can install binary but I particularly want to install from a source package for certain purposes.
Compiling from source on windows is a particularly complicated process involving mingw and collecting all the dependencies etc.
You're much better off grabbing one of the pre-compiled binaries.
I'd be interested to know what the "certain purposes" are that make compiling from source (for windows) a requirement.
How do you update a pre-installed Haskell package (for example, the System.Directory package) on Windows? I've tried simply telling cabal to install it but it encountered an error while doing so.
The package has a '.configure' script. This requires a Unix compatibility toolchain such
as MinGW+MSYS or Cygwin.
cabal: Error: some packages failed to install:
directory-1.2.6.3 failed during the configure step. The exception was:
ExitFailure 1
I presume there is an easy way of doing this within cabal. Failing this, where do the various files in the .tar.gz available off Hackage for a pre-installed package go? Thanks in advance.
Current versions of ghc and the haskell platform ship with an msys distro. Adding a few lines (in the instructions) to the cabal config file allows cabal to take advantage of this, in after which you can build packages with custom configure scrips (such as network or old-time) just fine.
I am trying to use stackage on windows. I cloned the git repo, ran cabal install --only-dependencies, cabal configure, cabal build. Everything works
then dist\build\Stackage\stackage.exe select
Loading Haskell Platform
Loading package database
Narrowing package database
Printing build plan to build-plan.log
Checking for bad versions
authenticate-oauth-1.4.0.8 (FP Complete <michael#fpcomplete.com> #yesodweb) cannot use:
- RSA-2.0 -- ==1.2.*
threepenny-gui-0.4.1.0 (FP Complete <michael#fpcomplete.com>) cannot use:
- aeson-0.7.0.2 -- ==0.6.*
stackage.exe: Conflicting build plan, exiting
the readme mention *.sh scripts like ./patching/scripts/create-tarballs.sh. I tried but failed to run them with cygwin. Are they important?
How can I use stackage on windows?
edit I was able to run the ./patching/scripts/create-tarballs.sh script using msys. But now the error message is:
Loading Haskell Platform
Loading package database
stackage.exe: Missing cabal file "MFlow-0.3.3/MFlow.cabal" in tarball: "patching/tarballs\\MFlow-0.3.3.tar.gz"
I checked the archive: the cabal file is inside.
Windows users are not recommended to install stackage by Haskell Platform installer due to some limitation:
On Windows, it does not provide a complete environment (missing MSYS).
By placing a large number of packages in the global package database, Haskell Platform installations are more easily corrupted.
The choice of package versions conflicts with the needs of many commonly used packages.
Some of the package versions included with the platform have known and severe bugs, and cannot be reliably upgraded.
As for solution to overcome, uninstall the Haskell platform first, then install minghc for windows by the following link: https://github.com/fpco/minghc#readme
Open command prompt run cabal update and cabal install alex happy.
Finally, install stackage.
Update 2015
A new tool has been developed by Commercial Haskell group for project development -- Stack, it can be install along with the latest Haskell Platform (7.10.2).
Features include:
Installing GHC automatically, in an isolated location.
Installing packages needed for your project.
Building your project.
Testing your project.
Benchmarking your project.
I have tried it for haskell web project, it works smoothly.