Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/tests/nofib/real/bspt/Prog.lhs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\begin{code}
module Prog(prog) where


-- Program module - defines the program expression
 
import Interface (modeller)
import Init (initialiseMouse,initialiseScreen)
import Interpret (Command,interpret, Operation(..), Operations(..))
import Input (operationsBatch)
import BSPT (BSPT,Point,buildBSPT)
import Euclid (Face, Faces(..))



-- Main program -----------------------------

--	prog - initialises the Geometric Modeller System 
--		with an initial (null) object and with 
--		interpretation (lazy) of users requirements.
--	
--		Operations can be predefined in the file 
--		Input.hs, with the modeller being supplied
--		batchOperations (as opposed to operations)
--		as the second argument.
 
prog ::  String -> String
prog rawinp =
  initialise ++ modeller (buildBSPT []) operations
 where 	
  initialise = initialiseMouse ++ initialiseScreen
  lined@(head:rest) = lines rawinp
  operations =
    if (head=="batch") then operationsBatch else interpret lined
\end{code}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].