Help us understand the problem. What is going on with this article?

Elm 0.19でExtensible Recordの使い方によってはコンパイラが壊れる

コンパイラのバグだが、こんな感じのエラーがでることがある

Dependencies loaded from local cache.
Dependencies ready!                
[==================================                ] - 18 / 26elm: Used toAnnotation on a type that is not well-formed
CallStack (from HasCallStack):
  error, called at compiler/src/Type/Type.hs:414:21 in main:Type.Type
[==============================================    ] - 24 / 26elm: thread blocked indefinitely in an MVar operation

これはelm-stuffを消しても治らない。

発現条件は、以下のようなExtensible Recordの使い方

type alias Hogeable a =
    { hoge : String }


hogehoge : Hogeable () -> String
hogehoge { hoge } =
    hoge

つまり、上のコードは下のように書き直せばよい

 type alias Hogeable a =
     { hoge : String }


+hogehoge : Hogeable a -> String
 hogehoge { hoge } =
     hoge

参考: https://github.com/elm/compiler/issues/1785

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away