rawhat / mist

gleam HTTP server. because it glistens on a web
Apache License 2.0
260 stars 11 forks source link

Gleam 1.0 is saying String instead of BitArray #38

Closed tankorsmash closed 4 months ago

tankorsmash commented 4 months ago

Hey there! I'm totally new to Gleam and Erlang, and trying to get the README example running.

This is the output of gleam build:

   ┌─ <snip>src/hello.gleam:53:15
   │
53 │     mist.Text(<<"ping":utf8>>) -> {
   │               ^^^^^^^^^^^^^^^

Expected type:

    String

Found type:

    BitArray

Changing all instances of bit arrays to strings ("ping") got it to compile, but I'm not sure if that's because it's now less safe or what. I'm new to Gleam so I'm probably missing something, but just in case. Thanks for making a neat package!

rawhat commented 4 months ago

Thanks for the issue! This was an oversight on my part when the API changed. I've updated the README and published it to hexdocs.

Please let me know if you run into anything else 😄 I hope you like Gleam!

tankorsmash commented 4 months ago

Thank you!