1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Correct the type signature for specialize.

This commit is contained in:
Rob Rix 2018-04-25 18:48:22 -04:00
parent 7ea0a8e898
commit f3e6a7fca3

View File

@ -287,7 +287,7 @@ instance ( Monad (m effects)
tentative x i j = attemptUnsafeArithmetic (x i j)
-- Dispatch whatever's contained inside a 'Number.SomeNumber' to its appropriate 'MonadValue' ctor
specialize :: (Member (Resumable (ValueError location value)) effects, MonadEvaluatable location term value effects m) => Either ArithException Number.SomeNumber -> m effects value
specialize :: Either ArithException Number.SomeNumber -> m effects (Value location)
specialize (Left exc) = throwValueError (ArithmeticError exc)
specialize (Right (Number.SomeNumber (Number.Integer i))) = integer i
specialize (Right (Number.SomeNumber (Number.Ratio r))) = rational r