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:
parent
a9041e0002
commit
13366d65c0
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user