Skip to content

Minor race condition in line order of compiler error output #352

@aramiscd

Description

@aramiscd

I'm using Gren 0.6.3.

I have some code here that outputs the following error message:

Compiling (3)-- TYPE MISMATCH ---------------------------------------------- src/App/Cmd.gren

Something is off with the body of the `printLine` definition:

20|     Stream.write toStream
        ^^^^^^^^^^^^^^^^^^^^^
This `write` call produces:

    Stream.Writable (Stream.Writable Bytes)
    -> Task.Task Stream.Error (Stream.Writable (Stream.Writable Bytes))

But the type annotation on `printLine` says it should be:

    Cmd Msg

Detected problems in 1 module.

But when I repeatedly attempt the compilation, the message sometimes looks like this:

Compiling (3)-- TYPE MISMATCH ---------------------------------------------- src/App/Cmd.gren

Something is off with the body of the `printLine` definition:

20|     Stream.write toStream
        ^^^^^^^^^^^^^^^^^^^^^
This `write` call produces:

    Stream.Writable (Stream.Writable Bytes)
    -> Task.Task Stream.Error (Stream.Writable (Stream.Writable Bytes))

Detected problems in 1 module.
 the type annotation on `printLine` says it should be:

    Cmd Msg

The "Detected problems ..." line is out of place. No big deal, but I thought I'd mention it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions