mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Prettier Evaluatable instance for floats.
This commit is contained in:
parent
c7536b6c18
commit
925df74da1
@ -59,8 +59,8 @@ instance Show1 Data.Syntax.Literal.Float where liftShowsPrec = genericLiftShowsP
|
||||
|
||||
instance Evaluatable Data.Syntax.Literal.Float where
|
||||
eval (Float s) =
|
||||
float =<< case parseScientific s of
|
||||
Right num -> pure num
|
||||
case parseScientific s of
|
||||
Right num -> float num
|
||||
Left err -> fail ("Parse error: " <> err)
|
||||
|
||||
-- Rational literals e.g. `2/3r`
|
||||
|
Loading…
Reference in New Issue
Block a user