1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Implement Break and Continue

This commit is contained in:
joshvera 2018-12-04 19:22:29 -05:00
parent 5deda2a033
commit 5b198eb919

View File

@ -256,7 +256,7 @@ instance Ord1 Break where liftCompare = genericLiftCompare
instance Show1 Break where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Break where
eval _ (Break _) = undefined -- Rval <$> (eval x >>= address >>= throwBreak)
eval eval (Break x) = eval x >>= throwBreak
newtype Continue a = Continue { value :: a }
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Ord, Show, ToJSONFields1, Traversable, Named1, Message1, NFData1)
@ -266,7 +266,7 @@ instance Ord1 Continue where liftCompare = genericLiftCompare
instance Show1 Continue where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Continue where
eval _ (Continue _) = undefined -- Rval <$> (eval x >>= address >>= throwContinue)
eval eval (Continue x) = eval x >>= throwContinue
newtype Retry a = Retry { value :: a }
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Ord, Show, ToJSONFields1, Traversable, Named1, Message1, NFData1)