Connect GetListElem to outer input list
This commit is contained in:
		
							parent
							
								
									8184160035
								
							
						
					
					
						commit
						8c7e311338
					
				| @ -12,7 +12,7 @@ data TypedRun a b where | |||||||
|   Function :: IsFunction f a b => f -> TypedRun a b |   Function :: IsFunction f a b => f -> TypedRun a b | ||||||
|   FunctionIO :: IsFunctionIO f a b => f -> TypedRun a b |   FunctionIO :: IsFunctionIO f a b => f -> TypedRun a b | ||||||
|   Inject :: b -> TypedRun () b |   Inject :: b -> TypedRun () b | ||||||
|   GetListElem :: TypedRun () b |   GetListElem :: TypedRun [b] b | ||||||
|   SetListElem :: TypedRun a () |   SetListElem :: TypedRun a () | ||||||
|   MapComp :: [DependencyUntyped] -> TypedRun [a] [b] |   MapComp :: [DependencyUntyped] -> TypedRun [a] [b] | ||||||
| 
 | 
 | ||||||
| @ -57,8 +57,8 @@ genDependency g = do | |||||||
| inject :: Show a => a -> ComputationM a | inject :: Show a => a -> ComputationM a | ||||||
| inject x = genDependency (Dependency NoToken (Inject x)) | inject x = genDependency (Dependency NoToken (Inject x)) | ||||||
| 
 | 
 | ||||||
| getListElem :: Show a => ComputationM a | getListElem :: Show a => Token [a] -> ComputationM a | ||||||
| getListElem = genDependency (Dependency NoToken GetListElem) | getListElem outer = genDependency (Dependency outer GetListElem) | ||||||
| 
 | 
 | ||||||
| setListElem :: Show a => Token a -> ComputationM () | setListElem :: Show a => Token a -> ComputationM () | ||||||
| setListElem a = genDependency (Dependency a SetListElem) | setListElem a = genDependency (Dependency a SetListElem) | ||||||
| @ -86,6 +86,6 @@ mapComputationM f input = do | |||||||
|   genDependency (Dependency input (MapComp res)) |   genDependency (Dependency input (MapComp res)) | ||||||
|   where m :: ComputationM () |   where m :: ComputationM () | ||||||
|         m = do |         m = do | ||||||
|           inp <- getListElem |           inp <- getListElem input | ||||||
|           outp <- f inp |           outp <- f inp | ||||||
|           setListElem outp |           setListElem outp | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user