Changeset 3740 for src/Pugs/Monads.hs

Show
Ignore:
Timestamp:
05/23/05 16:57:32 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
5329
Message:

* move enterEvalContext to Monads.hs so Prim can use it.
* introduce the maybeM abstraction that lifts fmapM into monads.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Monads.hs

    r3724 r3740  
    4040enterContext :: Cxt -> Eval a -> Eval a 
    4141enterContext cxt = local (\e -> e{ envContext = cxt }) 
     42 
     43{-| 
     44Evaluate the specified wxpression in the specified (Perl6) context ('Cxt'). 
     45 
     46(Subsequent chained 'Eval's do /not/ see this new scope.) 
     47-} 
     48enterEvalContext :: Cxt -> Exp -> Eval Val 
     49enterEvalContext cxt = enterContext cxt . evalExp 
    4250 
    4351{-|