From c7997544ec30befa6b4611ee1f5ceec960e14f22 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 May 2026 13:52:02 +0200 Subject: [PATCH] Restore compatibility with the matgrp package ... via a crude hack. Thing is, the arguments for BindRecogMethod, as well as the inputs and outputs of recognition methods have changed. Luckily the method in matgrp does nothing very useful, so we can replicate an updated version here. --- gap/base/methods.gi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gap/base/methods.gi b/gap/base/methods.gi index 998354b4b..d533f9e4e 100644 --- a/gap/base/methods.gi +++ b/gap/base/methods.gi @@ -86,7 +86,22 @@ end); InstallGlobalFunction(BindRecogMethod, function(rname, arg...) local r, name; - r := ValueGlobal(rname); + if IsString(rname) then + r := ValueGlobal(rname); + elif rname = FindHomMethodsMatrix and arg[1] = "Nonfield" and EndsWith(INPUT_FILENAME(), "recograt.gi") then + # FIXME/HACK: backwards compatibility for the matgrp package + rname := "FindHomMethodsMatrix"; + r := FindHomMethodsMatrix; + arg[Length(arg)] := + function(ri) + if IsBound(ri!.ring) and not IsBound(ri!.field) then + Error("hereIAm"); + fi; + return NeverApplicable; + end; + else + Error(" must be the name of a global variable containing a record"); + fi; r.(arg[1]) := CallFuncList(RecogMethod, arg); name := Concatenation(rname, ".", arg[1]); SetNameFunction(r.(arg[1])!.func, name);