diff --git a/lib/function.gi b/lib/function.gi index 3e5e8e73e68..6b7ca161b1e 100644 --- a/lib/function.gi +++ b/lib/function.gi @@ -63,6 +63,11 @@ function(func) return result; end); +InstallMethod(Display, "for a function", [IsFunction and IsInternalRep], +function(fun) + Print(fun, "\n"); +end); + InstallMethod(DisplayString, "for a function, using string stream", [IsFunction and IsInternalRep], function(fun) local s, stream; diff --git a/tst/testinstall/float.tst b/tst/testinstall/float.tst index d3d3c24d692..b28ef50bf54 100644 --- a/tst/testinstall/float.tst +++ b/tst/testinstall/float.tst @@ -426,31 +426,18 @@ gap> Display(f); function ( ) return 2.11111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 11111111111111111111_; end gap> f := {} -> 2.11111111111111111111111111111111111111111111111111111111111\ @@ -473,31 +460,18 @@ gap> Display(f); function ( ) return 2.11111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 11111111111111111111_l; end gap> f := {} -> 2.11111111111111111111111111111111111111111111111111111111111\ @@ -551,31 +525,18 @@ gap> Display(g); function ( ) return 2.11111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 11111111111111111111; end gap> g(); @@ -598,31 +559,18 @@ gap> Display(g); function ( ) return 2.11111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 111111111111111111111111111111111111111111111111111111111111111111111111111111\ -\ 11111111111111111111l; end gap> g();