Error occurred while testing Pattern Structure

I encountered this error while studying pattern structure because I wanted to test various scenarios of how patterns work. I'm wondering if I entered the code incorrectly. If you know the solution, please let me know! For your information, I'm using the vim-tidal plugin. I tried searching on Google, but it's hard to find the answer, maybe because I missed something.

If anyone knows a solution, please provide a response.
Thank you!

ghci is basically not able to figure out the type of your expression on it's own, since it doesn't really know as what to interpret the string literals (".."). you can fix it by annotating the type you would like to have: Pattern Int, so you should be able to evaluate

("2 3" + "3") :: Pattern Int

Thanks to you, it's resolved. Thank you!

1 Like