1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages agda)
20 #:use-module (gnu packages haskell)
21 #:use-module (gnu packages haskell-check)
22 #:use-module (gnu packages haskell-web)
23 #:use-module (guix build-system emacs)
24 #:use-module (guix build-system haskell)
25 #:use-module (guix build-system trivial)
26 #:use-module (guix download)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages))
38 "https://hackage.haskell.org/package/Agda/Agda-"
42 "0r80vw7vnvbgq47y50v050malv7zvv2p2kg6f47i04r0b2ix855a"))))
43 (build-system haskell-build-system)
46 ("ghc-alex" ,ghc-alex)
47 ("ghc-async" ,ghc-async)
48 ("ghc-blaze-html" ,ghc-blaze-html)
49 ("ghc-boxes" ,ghc-boxes)
50 ("ghc-data-hash" ,ghc-data-hash)
51 ("ghc-edisoncore" ,ghc-edisoncore)
52 ("ghc-edit-distance" ,ghc-edit-distance)
53 ("ghc-equivalence" ,ghc-equivalence)
54 ("ghc-geniplate-mirror" ,ghc-geniplate-mirror)
55 ("ghc-gitrev" ,ghc-gitrev)
56 ("ghc-happy" ,ghc-happy)
57 ("ghc-hashable" ,ghc-hashable)
58 ("ghc-hashtables" ,ghc-hashtables)
59 ("ghc-ieee754" ,ghc-ieee754)
60 ("ghc-monadplus" ,ghc-monadplus)
62 ("ghc-murmur-hash" ,ghc-murmur-hash)
63 ("ghc-uri-encode" ,ghc-uri-encode)
64 ("ghc-parallel" ,ghc-parallel)
65 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
67 ("ghc-strict" ,ghc-strict)
68 ("ghc-text" ,ghc-text)
69 ("ghc-unordered-containers" ,ghc-unordered-containers)
70 ("ghc-zlib" ,ghc-zlib)))
72 `(#:modules ((guix build haskell-build-system)
76 (modify-phases %standard-phases
77 (add-after 'compile 'agda-compile
78 (lambda* (#:key outputs #:allow-other-keys)
79 (let* ((out (assoc-ref outputs "out"))
80 (agda-compiler (string-append out "/bin/agda")))
81 (for-each (cut invoke agda-compiler <>)
82 (find-files (string-append out "/share") "\\.agda$"))
84 (home-page "http://wiki.portal.chalmers.se/agda/")
86 "Dependently typed functional programming language and proof assistant")
88 "Agda is a dependently typed functional programming language: it has
89 inductive families, which are similar to Haskell's GADTs, but they can be
90 indexed by values and not just types. It also has parameterised modules,
91 mixfix operators, Unicode characters, and an interactive Emacs interface (the
92 type checker can assist in the development of your code). Agda is also a
93 proof assistant: it is an interactive system for writing and checking proofs.
94 Agda is based on intuitionistic type theory, a foundational system for
95 constructive mathematics developed by the Swedish logician Per Martin-Löf. It
96 has many similarities with other proof assistants based on dependent types,
97 such as Coq, Epigram and NuPRL.")
98 ;; Agda is distributed under the MIT license, and a couple of
99 ;; source files are BSD-3. See LICENSE for details.
100 (license (list license:expat license:bsd-3))))
102 (define-public emacs-agda2-mode
105 (name "emacs-agda2-mode")
106 (build-system emacs-build-system)
110 (modify-phases %standard-phases
111 (add-after 'unpack 'enter-elisp-dir
112 (lambda _ (chdir "src/data/emacs-mode") #t)))))
113 (home-page "https://agda.readthedocs.io/en/latest/tools/emacs-mode.html")
114 (synopsis "Emacs mode for Agda")
115 (description "This Emacs mode enables interactive development with
116 Agda. It also aids the input of Unicode characters.")))