Cure - a new language compiled to BEAM

  1. Make make test working
  2. Reduce noise in compiler output
  3. Fix compiler errors locations
    module Playground do
      export [main/0]
    
      def main(): Int =
        1 + def()
    end
    
    Outputs Error: Parsing failed: {parse_error,{unexpected_token_in_expression,def},0,0}
  4. Fix and test the very very basics of your language
    module Playground do
      export [main/0]
    
      def main(): Int =
        1 + f()
    
      def f(): Int =
        3
    end
    
    Outputs
    Error: Type Checking failed: {type_check_failed,
         [{typecheck_error,"Failed to infer function body type",
         {location,4,3,undefined},
         {inference_failed,
             {constraint_solving_failed,
                 {unification_failed,
                     {primitive_type,'Int'},
                     {function_type,[],{primitive_type,'Int'}}}}}}]}
    

I’ve been looking at the project since it’s release and it looks like most of it was generated without any testing. I’ve pulled it 3 times and make test never worked while make all worked just once, a week after it’s initial post on the forum. I would consider fixing bugs, creating CI and all of that before implementing new features

3 Likes