Changeset 14209
- Timestamp:
- 10/11/06 05:36:27 (2 years ago)
- Location:
- src/Pugs
- Files:
-
- 2 modified
-
AST/Internals.hs (modified) (4 diffs)
-
Monads.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/AST/Internals.hs
r14197 r14209 21 21 VOpaque(..), -- uses Value 22 22 VControl(..), -- uses Env, Eval, Val 23 ControlLoop(..), Control Given(..), Frame(..),23 ControlLoop(..), ControlWhen(..), Frame(..), 24 24 VScalar, -- uses Val 25 25 VPair, -- uses Val … … 807 807 | ControlEnv !Env 808 808 | ControlLoop !ControlLoop 809 | Control Given !ControlGiven809 | ControlWhen !ControlWhen 810 810 | ControlLeave 811 811 { leaveType :: !(SubType -> Bool) … … 822 822 deriving (Show, Eq, Ord, Typeable) -- don't derive YAML for now 823 823 824 data Control Given825 = GivenContinue826 | GivenBreak824 data ControlWhen 825 = WhenContinue 826 | WhenBreak 827 827 deriving (Show, Eq, Ord, Typeable) -- don't derive YAML for now 828 828 … … 1278 1278 data Frame 1279 1279 = FrameLoop 1280 | Frame Given1280 | FrameWhen 1281 1281 | FrameGather 1282 1282 | FrameRoutine -
src/Pugs/Monads.hs
r14204 r14209 123 123 enterGather = enterFrame FrameGather 124 124 enterLoop = enterFrame FrameLoop 125 enterGiven = enterFrame FrameGiven125 enterGiven = id 126 126 127 127 assertFrame :: Frame -> Eval a -> Eval a … … 144 144 -> Eval Val 145 145 enterWhen action = do 146 rv <- action146 rv <- enterFrame FrameWhen action 147 147 case rv of 148 VControl (Control Given GivenContinue) -> retEmpty149 VControl (Control Given GivenBreak) -> retShiftEmpty150 _ -> retShift rv148 VControl (ControlWhen WhenContinue) -> retEmpty 149 VControl (ControlWhen WhenBreak) -> retShiftEmpty 150 _ -> retShift rv 151 151 152 152 {-|
