Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/tests/nofib/real/veritas/Tacticals.hs

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


module Tacticals where

import Core_datatype
import Kernel
import Lookup
import X_interface

import Tactics

import Goals
import Globals		-- partain
import Tags		-- partain

import Tree

import Edlib

import Type_defs

import Vtslib



infixr 5 `orelse`

infixr 4 `andthen`



orelse f1 f2 trst 
	= f1 trst
	  `handle` 
	  ( \ _ -> f2 trst )



andthen f1 f2 trst 
	= f1 trst     /./
	  subtrst f2 


repeat_tac f trst 
	= f trst /./
	  ( \ trst' -> subtrst (repeat_tac f) trst' 
	               `handle` 
	               ( \ _ -> reTurn trst ))



for' 0 f trst = reTurn trst

for' i f trst 
	= f trst                  /./
	  subtrst (for' (i-1) f) 



subtrst f trst@(TreeSt (Tree _ trL _ _ _) _ _) 
	= subtrst' 0 (length trL) f trst


subtrst' i j f trst 
	| i >= j    = reTurn trst
	| otherwise = tree_down i trst   /./
                      f                  /./
                      tree_up            /./
		      subtrst' (i+1) j f

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.