forked from elm/compiler
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed