From c198bda419a4266b1ba5e052d19f7df2d13f532d Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Fri, 5 May 2023 14:04:36 +0200 Subject: [PATCH] float's can't start with just exponents --- src/Nixfmt/Parser/Float.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Nixfmt/Parser/Float.hs b/src/Nixfmt/Parser/Float.hs index df50efe1..c5360b55 100644 --- a/src/Nixfmt/Parser/Float.hs +++ b/src/Nixfmt/Parser/Float.hs @@ -27,6 +27,7 @@ data SP = SP !Integer {-# UNPACK #-} !Int floatParse :: (MonadParsec e s m, Token s ~ Char, RealFloat a) => m a floatParse = do notFollowedBy $ (char '0') >> digitChar + notFollowedBy $ (char' 'e') c' <- (decimal "decimal") <|> return 0 toRealFloat <$> (( do