;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Robert Vollmert ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages elm) #:use-module (gnu packages) #:use-module (gnu packages haskell) #:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-crypto) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages haskell-web) #:use-module (guix build-system haskell) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) ;; The full elm build calls out to itself via Template Haskell to ;; compile the elm reactor web app. elm reactor isn't required to ;; compile elm applications, so we take this part out of this ;; bootstrap package. (define-public elm-compiler (package (name "elm-compiler") (version "0.19.0") (source (origin (method git-fetch) (file-name (git-file-name name version)) (uri (git-reference (url "https://github.com/elm/compiler/") (commit version))) (sha256 (base32 "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy")) (patches (search-patches "elm-compiler-disable-reactor.patch" "elm-compiler-fix-map-key.patch")))) (build-system haskell-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'update-constraints (lambda _ (substitute* "elm.cabal" (("(ansi-terminal|containers|network|http-client|language-glsl)\\s+[^,]+" all dep) dep))))))) (inputs (list ghc-ansi-terminal ghc-ansi-wl-pprint ghc-edit-distance ghc-file-embed ghc-http ghc-http-client ghc-http-client-tls ghc-http-types ghc-language-glsl ghc-logict ghc-network ghc-raw-strings-qq ghc-scientific ghc-sha ghc-snap-core ghc-snap-server ghc-unordered-containers ghc-utf8-string ghc-vector ghc-zip-archive)) (home-page "https://elm-lang.org") (synopsis "Programming language for Web applications") (description "This package provides Elm, a statically-typed functional programming language for the browser. It includes commands for developers such as @command{elm make} and @command{elm repl}.") (license license:bsd-3))) b'>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 233e254bbe44f70ca899a506b3706af489228fda Mon Sep 17 00:00:00 2001
From: aagon <aymeric.agon@hotmail.fr>
Date: Thu, 10 Aug 2023 20:03:52 +0200
Subject: [PATCH] Repair helpful--display-implementations test for emacs 29.1

---
 test/helpful-unit-test.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
index 0f5177b..0716b0d 100644
--- a/test/helpful-unit-test.el
+++ b/test/helpful-unit-test.el
@@ -1089,8 +1089,12 @@ find the source code."
   (require 'xref)
   (helpful-function 'xref-location-marker)
   (should (s-contains-p "Implementations" (buffer-string)))
-  (should (s-contains-p "((l xref-file-location))" (buffer-string)))
-  (should (s-contains-p "((l xref-buffer-location))" (buffer-string))))
+  (should (if (version< emacs-version "29.1")
+	      (s-contains-p "((l xref-file-location))" (buffer-string))
+	    (s-contains-p "(xref-location-marker (L xref-file-location))" (buffer-string))))
+  (should (if (version< emacs-version "29.1")
+	      (s-contains-p "((l xref-buffer-location))" (buffer-string))
+	    (s-contains-p "(xref-location-marker (L xref-buffer-location))" (buffer-string)))))
 
 (defun helpful--boring-advice (orig-fn &rest args)
   (apply orig-fn args))