HigherOrderCO / Kind

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

Following instructions in documentation doesn't work #42

Closed masaeedu closed 4 years ago

masaeedu commented 4 years ago

Hello there. I was following along with DOCUMENTATION.md, and tried putting the following into a file hello.fm:

import Base#

main : Output
  print("Hello, world!")

Then ran:

➜  helloworld fm hello/main
[PARSE-ERROR]
Attempted to re-define 'main', which is already defined as:
- Parse#x39s/main

I noticed the problem on line 4, col 24, file hello.fm:

   1| import Base#
   2|
   3| main : Output
   4|   print("Hello, world!")
   5|

But it could have happened a little earlier.
My parse-robot brain isn't perfect, sorry.

This produces the error message shown above. Is the documentation out of date?

johnchandlerburnham commented 4 years ago

This issue is due to overlapping definitions of main in Parse.fm. Fixed in https://github.com/moonad/Base.fm/commit/17ccf0fdfd36f63e6208817642426479213d8fb5