mirror of
https://github.com/GaloisInc/what4.git
synced 2024-12-01 20:23:10 +03:00
Define Opt instance for BaseRealType to allow setting/getting via Rational.
This commit is contained in:
parent
bdcc394836
commit
2a6573713b
@ -983,6 +983,10 @@ instance Opt BaseBoolType Bool where
|
||||
getMaybeOpt x = fmap fromConcreteBool <$> getOption x
|
||||
trySetOpt x v = setOption x (ConcreteBool v)
|
||||
|
||||
instance Opt BaseRealType Rational where
|
||||
getMaybeOpt x = fmap fromConcreteReal <$> getOption x
|
||||
trySetOpt x v = setOption x (ConcreteReal v)
|
||||
|
||||
-- | Given a unicode text value, set the named option to that value or
|
||||
-- generate an OptSetFailure exception if the option is not a unicode
|
||||
-- text valued option.
|
||||
|
Loading…
Reference in New Issue
Block a user