Skip to content

Compiler hang #6178

@Janiczek

Description

@Janiczek

I got this compiler hang when working on my solution for an Advent of Code puzzle.

roc --version
roc nightly pre-release, built from commit e65f14fa496 on Sat Dec  2 09:15:51 UTC 2023

Shrunk it down to this SSCCE.

app "hello"
    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br" }
    imports [pf.Stdout]
    provides [main] to pf

main = 
    Stdout.line "Hello, world!"

a : Str -> Set (Nat,Nat,Str)
a = \_ -> Set.empty {}

expect a "" == Set.fromList []

b : Set (Nat,Nat,Str) -> Set (Nat,Nat)
b = \_ -> Set.empty {}

expect b (Set.fromList []) == Set.fromList [(0,0,"")]

Try roc run or roc test or some other command, and the compiler gets stuck in some infinite loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions