1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Interpret in runBooleanType.

This commit is contained in:
Rob Rix 2018-05-24 10:42:42 -04:00
parent a9041e0002
commit 13366d65c0

View File

@ -280,12 +280,10 @@ runUnitType :: (Unit Type \\ effects) effects'
-> Eval location Type opaque effects' a
runUnitType = interpretAny (\ Unit -> pure (Product []))
runBooleanType :: ( Member NonDet effects'
, (Boolean Type \\ effects) effects'
)
=> Eval location Type opaque effects a
-> Eval location Type opaque effects' a
runBooleanType = interpretAny (\ eff -> case eff of
runBooleanType :: Member NonDet effects
=> Eval location Type opaque (Boolean Type ': effects) a
-> Eval location Type opaque effects a
runBooleanType = interpret (\ eff -> case eff of
Bool _ -> pure BoolT
AsBool BoolT -> pure True <|> pure False)