Changeset 3291

Show
Ignore:
Timestamp:
05/16/05 14:58:37 (4 years ago)
Author:
scook0
svk:copy_cache_prev:
4878
Message:

Revised Haddocks for Monads.hs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Monads.hs

    r3249 r3291  
    1919import Pugs.Types 
    2020 
    21 -- |Perform the specified evaluation in a lexical scope that has been 
    22 -- augmented by the given list of lexical 'Pad' transformers. Subsequent 
    23 -- chained 'Eval's do /not/ see this new scope. 
     21{-| 
     22Create a new lexical scope by applying the list of 'Pad'-transformers 
     23(which install new bindings), then perform the specified evaluation in that 
     24new scope. 
     25 
     26(Subsequent chained 'Eval's do /not/ see this new scope.) 
     27-} 
    2428enterLex :: [Pad -> Pad] -- ^ Transformations on current 'Pad' to produce the 
    2529                         --     new 'Pad'. 
     
    2933enterLex newSyms = local (\e -> e{ envLexical = combine newSyms (envLexical e) }) 
    3034 
    31 -- |Perform the specified evaluation in the specified context ('Cxt'). 
    32 -- Subsequent chained 'Eval's do /not/ see this new scope. 
     35{-| 
     36Perform the specified evaluation in the specified (Perl6) context ('Cxt'). 
     37 
     38(Subsequent chained 'Eval's do /not/ see this new scope.) 
     39-} 
    3340enterContext :: Cxt -> Eval a -> Eval a 
    3441enterContext cxt = local (\e -> e{ envContext = cxt }) 
    3542 
    36 -- |Bind @\$_@ to the given topic value in a new lexical scope, then perform 
    37 -- the given evaluation in that scope. Used by "Pugs.Eval"'s implementation 
    38 -- of 'Pugs.Eval.reduce' for @\"given\"@. 
     43{-| 
     44Bind @\$_@ to the given topic value in a new lexical scope, then perform 
     45the specified evaluation in that scope. 
     46 
     47Used by "Pugs.Eval"'s implementation of 'Pugs.Eval.reduce' for @\"given\"@. 
     48-} 
    3949enterGiven :: VRef   -- ^ Reference to the value to topicalise 
    4050           -> Eval a -- ^ Action to perform within the new scope