Skip to content

Commit

Permalink
Merge pull request #226 from EpitechPromo2027/revert-225-224-support-…
Browse files Browse the repository at this point in the history
…df-suffix-for-explicit-doublefloat-value

Float constants now use `FF.Single`
  • Loading branch information
oriollinan authored Jan 17, 2025
2 parents a31e72f + 31b6209 commit acfc574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Codegen/ExprGen/Variable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ generateConstant lit loc = case lit of
AT.LChar c -> return $ C.Int 8 (fromIntegral $ fromEnum c)
AT.LBool b -> return $ C.Int 1 (if b then 1 else 0)
AT.LNull -> return $ C.Null T.i8
AT.LFloat f -> pure $ C.Float (FF.Double (realToFrac f))
AT.LFloat f -> pure $ C.Float (FF.Single (realToFrac f))
AT.LDouble f -> pure $ C.Float (FF.Double (realToFrac f))
AT.LArray elems -> do
let (headElem, _) = M.fromJust $ L.uncons elems
Expand Down

0 comments on commit acfc574

Please # to comment.