Skip to content

Commit

Permalink
Use Double instead of Float
Browse files Browse the repository at this point in the history
  • Loading branch information
joewatt95 committed Feb 2, 2024
1 parent 4f4b3c2 commit 3838e4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/L4/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ data TokenKind
| TokenStringLit String

| TokenInteger Integer
| TokenFloat Float
| TokenFloat Double
| TokenSym String
| TokenString String
deriving (Eq,Show)
Expand Down
2 changes: 1 addition & 1 deletion src/L4/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ instance HasAnnot ClassDecl where
data Val
= BoolV Bool
| IntV Integer
| FloatV Float
| FloatV Double
| StringV String
-- TODO: instead of RecordV, introduce RecordE in type Expr
-- | RecordV ClassName [(FieldName, Val)]
Expand Down
2 changes: 1 addition & 1 deletion src/L4/SyntaxManipulation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ globalVarsOfProgram prg = varDeclsOfProgram prg ++ map varDefnToVarDecl (varDefn
mkIntConst :: Integer -> Expr (Tp())
mkIntConst f = ValE IntegerT (IntV f)

mkFloatConst :: Float -> Expr (Tp())
mkFloatConst :: Double -> Expr (Tp())
mkFloatConst f = ValE FloatT (FloatV f)

mkVarE :: Var t -> Expr t
Expand Down

0 comments on commit 3838e4a

Please sign in to comment.