SSCCE
module Try exposing (..)
f x =
let
g : (a -> ()) -> ()
g h =
h x
in
x
main : Platform.Program () () ()
main =
Platform.worker
{ init = \_ -> ( (), Cmd.none )
, update = \_ _ -> ( (), Cmd.none )
, subscriptions = \_ -> Sub.none
}
When compiling this with guida make, the compiler appears to infinite loop. The main is just there so you can compile this as an application.
Removing the type annotation on g it will run fine.
Add the type annotation f : a -> a it will also run fine.
The problem is potentially around introducing a new type variable in a let..in that affects the overall type of the outer function?
On the elm compiler, the compiler crashes with rank = 2: elm#2301
SSCCE
When compiling this with
guida make, the compiler appears to infinite loop. Themainis just there so you can compile this as an application.Removing the type annotation on
git will run fine.Add the type annotation
f : a -> ait will also run fine.The problem is potentially around introducing a new type variable in a let..in that affects the overall type of the outer function?
On the elm compiler, the compiler crashes with rank = 2: elm#2301