-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
This is a regression compared to Elm, introduced in #27. (We noticed the same regression in Elm as we tried to port those changes.)
module Main exposing (main)
import Html
åäö = "hello"
main = Html.text åäö
-- WEIRD DECLARATION --------------------------------------------- src/Main.gren
I am trying to parse a declaration, but I am getting stuck here:
5| åäö = "hello"
^
When a line has no spaces at the beginning, I expect it to be a declaration like
one of these:
greet : String -> String
greet name =
"Hello " ++ name ++ "!"
type User = Anonymous | LoggedIn String
Try to make your declaration look like one of those? Or if this is not supposed
to be a declaration, try adding some spaces before it?
It is occasionally useful to use letters from the language of the country your program is used in, even if the code is in English, for proper names in the language of the country that don’t translate easily to English. For example, in Sweden you might have special cases for “Försäkringskassan” and “Skåne“ and want to use those in variable names, or you work with “öre” (the equivalent to cents). Just removing the dots and the circle makes them read weird, and causes them to be marked as spelling errors in the IDE. Another example is making a union type of all the Swedish municipalities: Then we have both “Habo” and “Håbo”.