Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@IzumiSy

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

More than 1 year has passed since last update.

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

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

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  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
IzumiSy
Elmエンジニャー / https://dev.to/izumisy
fringe81
Fringeは、最新のテクノロジーとプロフェッショナルによるサービスにより、社会課題に仮説を立てて市場に広げていくことで、数十年という長期的なスパンで価値を生み出し続け、より良い世界を創る集団です。 既存の領域に限らず、時流を読み、仮説を生み出し、テクノロジーの力で優れたサービスを生み出し続けます。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?