HigherOrderCO / Kind

A modern proof language
https://higherorderco.com
MIT License
3.59k stars 142 forks source link

F64 #595

Closed Lorenzobattistela closed 1 month ago

Lorenzobattistela commented 1 month ago

Adding support to F64 literals and operators. Below there is an example of the use of floats:

main : F64
= (+ 1.0 1.0)

@VictorTaelin I have doubts about error reporting in the operator case. For example, consider the following:

a : String
a = ""

main : F64
= (+ a a)

This will report error as the print below: image But this is not really clear and kinda ugly, so i wanted to know the preferences. Also, in the following case:

main : F64
= (+ 1 1.0)

It will report as: image

Because it checks that the first operator type should be the same as the second, and then it checks that the reduction is of the type of main.