This patch changes all remaining "import" to "import from".

The removed lines are mostly "import from Record(...)".

Should we also modify "parse_Import" from "s-parser.boot"
so that it gives error on "import XXX"?

- Qian

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/62790292-f360-4240-bf71-891f4d4840d5%40gmail.com.
diff --git a/src/algebra/computation.spad b/src/algebra/computation.spad
index ba9b0750..bcf58c28 100644
--- a/src/algebra/computation.spad
+++ b/src/algebra/computation.spad
@@ -2320,7 +2320,7 @@ compUtil(UT) : Exports == Implementation where
 
  Implementation ==> add
 
-  import OutputForm
+  import from OutputForm
 
   -- Keeps count of index number of variables created in Ski2Lambda.
   -- I am wary of defining a variable outside of a function but
diff --git a/src/algebra/efstruc.spad b/src/algebra/efstruc.spad
index 00edc1bb..613c8745 100644
--- a/src/algebra/efstruc.spad
+++ b/src/algebra/efstruc.spad
@@ -1115,7 +1115,6 @@ TrigonometricManipulations(R, F) : Exports == Implementation where
 -- returns f if it is certain that k is not a real kernel and k = f,
 -- "failed" otherwise
     kcomplex k ==
-      import Z
       op := operator k
       is?(k, 'nthRoot) =>
         arg := argument k
diff --git a/src/algebra/fortout.spad b/src/algebra/fortout.spad
index 10b08dbd..f4e19e93 100644
--- a/src/algebra/fortout.spad
+++ b/src/algebra/fortout.spad
@@ -886,7 +886,7 @@ FortranCodeTools : with
 FortranFormat : OutputFormatterCategory == add
     Rep := OutputForm
 
-    import OutputFormTools
+    import from OutputFormTools
 
     assignable_form?(o : OutputForm) : Boolean ==
         atom?(o) => true
@@ -902,7 +902,7 @@ FortranFormat : OutputFormatterCategory == add
         var := concat("R", convert(i)@String)::Symbol::OutputForm
         elt(outputForm("="::Symbol), [var, o])
 
-    import FortranCodeTools
+    import from FortranCodeTools
 
     display(x : %) : Void ==
         displayLines(fort_clean_lines(expression2Fortran(x::Rep)))
diff --git a/src/algebra/gnudraw.spad b/src/algebra/gnudraw.spad
index 80ed202c..2339a95b 100644
--- a/src/algebra/gnudraw.spad
+++ b/src/algebra/gnudraw.spad
@@ -29,8 +29,10 @@ GnuDraw(): with
   ++ \spad{gnuDraw} provides 3d surface plotting, default options
  == add
   -- 2-d plotting
+
+  import from TwoDimensionalViewport, GraphImage, TopLevelDrawFunctions EF
+
   gnuDraw(f:EF,segbind:SBF,filename:STR,opts:List DROP):Void ==
-    import TwoDimensionalViewport, GraphImage, TopLevelDrawFunctions EF
     f1:TextFile:=open(filename::FileName,"output")
     -- handle optional parameters
     writeLine!(f1,concat(["set title _"",title(opts,"")$DROP0,"_""]))
@@ -43,8 +45,10 @@ GnuDraw(): with
                               unparse(convert(p.2)@InputForm)]))
       writeLine!(f1); -- blank line need to mark a "branch"
     close! f1
+
+  import from TopLevelDrawFunctionsForPoints
+
   gnuDraw(l1:LDF,l2:LDF,filename:STR,opts:List DROP):Void ==
-    import TwoDimensionalViewport, GraphImage, TopLevelDrawFunctionsForPoints
     f1:TextFile:=open(filename::FileName,"output")
     -- handle optional parameters
     writeLine!(f1,concat(["set title _"",title(opts,"")$DROP0,"_""]))
@@ -65,8 +69,10 @@ GnuDraw(): with
     gnuDraw(l1,l2,filename,[title("")$DROP])
 
   -- 3-d plotting
+
+  import from ThreeSpace DoubleFloat
+
   gnuDraw(f:EF,segbind1:SBF, segbind2:SBF, filename:STR, opts:List DROP):Void ==
-    import ThreeSpace DoubleFloat, TopLevelDrawFunctions EF
     f1:TextFile:=open(filename::FileName,"output")
     -- process optional parameters
     writeLine!(f1,concat(["set title _"",title(opts,"")$DROP0,"_""]))
diff --git a/src/algebra/manip.spad b/src/algebra/manip.spad
index 3e6c163e..1e7a2d04 100644
--- a/src/algebra/manip.spad
+++ b/src/algebra/manip.spad
@@ -630,7 +630,7 @@ TranscendentalManipulations(R, F) : Exports == Implementation where
   Implementation ==> add
     import from FactoredFunctions(P)
     import from PolynomialCategoryLifting(IndexedExponents K, K, R, P, F)
-    import
+    import from
       PolynomialCategoryQuotientFunctions(IndexedExponents K, K, R, P, F)
 
     smpexp    : P -> F
diff --git a/src/algebra/special2.spad b/src/algebra/special2.spad
index 13f2b74a..fc857855 100644
--- a/src/algebra/special2.spad
+++ b/src/algebra/special2.spad
@@ -1658,7 +1658,7 @@ DoubleFloatSpecialFunctions2() : with
         res1
 
 
-    import FloatLiouvilianFunctions
+    import from FloatLiouvilianFunctions
 
     to_sf(x) ==>
         obits := bits()$Float
diff --git a/src/algebra/xlpoly.spad b/src/algebra/xlpoly.spad
index 7c174a30..c2771992 100644
--- a/src/algebra/xlpoly.spad
+++ b/src/algebra/xlpoly.spad
@@ -484,7 +484,6 @@ LiePolynomial(VarSet : OrderedSet, R : CommutativeRing) : Public == Private wher
         ++ \spad{construct(x, y)} returns the Lie bracket \spad{[x, y]}.
 
    Private ==  FreeModule(R, LWORD) add
-        import(TERM)
 
       --representation
         Rep :=  List TERM
@@ -805,7 +804,6 @@ XPBWPolynomial(VarSet : OrderedSet, R : CommutativeRing) : XDPcat == XDPdef wher
           ++ (truncated up to order \spad{n}).
 
   XDPdef == FreeModule(R, BASIS) add
-       import(TERM)
 
     -- Representation
        Rep := LTERMS
@@ -1055,7 +1053,6 @@ LieExponentials(VarSet, R, Order) : XDPcat == XDPdef where
        ident : (List TERM1, List TERM1) -> List EQ
 
        ident(l1, l2) ==
-         import(TERM1)
          empty?(l1) => [equation(0$R, t.c)$EQ for t in l2]
          empty?(l2) => [equation(t.c, 0$R)$EQ for t in l1]
          u1 : LWORD := l1.first.k; c1 : R := l1.first.c
diff --git a/src/algebra/xpoly.spad b/src/algebra/xpoly.spad
index 045cb1d3..ba904d09 100644
--- a/src/algebra/xpoly.spad
+++ b/src/algebra/xpoly.spad
@@ -318,7 +318,7 @@ XDistributedPolynomial(vl : OrderedSet, R : Ring) : XDPcat == XDPdef where
 
   XDPdef ==> XPolynomialRing(R, WORD) add
 
-       import( WORD, TERM)
+       import from WORD
 
     -- Representation
        Rep  :=  List TERM
@@ -449,7 +449,7 @@ XRecursivePolynomial(VarSet : OrderedSet, R : Ring) :  Xcat == Xdef where
          ++ as a list of terms.
 
   Xdef == add
-       import(VPOLY)
+       import from VPOLY
 
     -- representation, in VPOLY case p = c0 + \sum c_i*x_i where
     -- x_i is last letter of the word

Reply via email to