Package frege.runtime

Examples of frege.runtime.Lambda


      if (TSymbolT.M.has$env(sym))  visit(g, TSymbolT.M.env(sym), false);
      else if (TSymbolT.M.has$expr(sym)) {
        final TMaybe mbex       = TSymbolT.M.expr(sym);
        final TMaybe.DJust just = mbex._Just();
        if (just != null) {
          Lambda lam = Delayed.<Lambda>forced(just.mem1);
          final TExprT expr = Delayed.<TExprT>forced(State.evalState(lam, g));
          visit(g, expr);
        }
      }
      popSubItem();
View Full Code Here


  /**
   * run a {@link frege.prelude.PreludeBase.TState} action and return the new TGlobal state
   * @return the new state
   */
  public static TGlobal runSTG(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // State (g -> (a, g))
    TTuple2 r = TState.run(stg, g).<TTuple2>forced();
    return Delayed.<TGlobal>forced( r.mem2 );
  }
View Full Code Here

   * Run a {@link frege.prelude.PreludeBase.TState} action and return the result.
   * The state must not be changed by the action.
   * @return the result
   */
  public static Object funSTG(Lazy action, TGlobal g) {
    Lambda stg = action.<Lambda>forced();        // State (g -> (a, g))
    TTuple2 r = TState.run(stg, g).<TTuple2>forced();
    return r.mem1;
  }
View Full Code Here

  /**
   * run a {@link frege.prelude.PreludeBase.TStateT TGlobal IO} action and return the new TGlobal state
   * @return the new state
   */
  public static TGlobal runSTIO(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // StateT (g -> IO (a, g))
    Lambda r   = Delayed.<Lambda>forced( TStateT.run(stg, g));
    TTuple2 t  = r.apply(42).result().<TTuple2>forced();
    return Delayed.<TGlobal>forced(t.mem2);
  }
View Full Code Here

   * Run a {@link frege.prelude.PreludeBase.TState} action and return the result.
   * The state must not be changed by the action.
   * @return the result
   */
  public static Object funSTIO(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // StateT (g -> IO (a, g))
    Lambda r   = Delayed.<Lambda>forced( TStateT.run(stg, g));
    TTuple2 t  = r.apply(42).result().<TTuple2>forced();
    return t.mem1;
  }
View Full Code Here

   
   
      msgHandler.clearMessages();
   
      final IProgressMonitor myMonitor = monitor;
      Lambda cancel = new Fun1<Boolean>() {     
        public Boolean eval(Object realworld) {
          return myMonitor.isCanceled()
        }
      };
   
View Full Code Here

TOP

Related Classes of frege.runtime.Lambda

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.