Traps in writing Hilde

Every trap met in writing the compiler, the standard library or an application built on them, in one list: the error code and what the compiler said, the wrong and the right code, and a rule in one sentence. The line Now says what the compiler does about it now: the trap is removed, or the message names it and suggests the fix, or nothing changed and why. The line Test names the test that holds it. New entries go at the end.

Language and compiler

1. A linear value consumed in a branch that returns

2. An integer literal is an Int32 where its place asks for another type

3. No operator precedence

4. A local named like a declaration of the module

5. A parameter named like an imported function

6. The interface imports what its contracts call

7. A typeclass in a constraint that the module does not import

8. An instance whose module is not imported

9. No valueOr in the language

10. A contract that reads a byte of a String

11. A field of a written reference, or a reborrow, used twice

12. A borrowed literal and the apostrophe

13. A reserved word as a name

14. An index on the result of a call

15. An index of a module constant

16. A path into a value instead of a reference

17. A binding of a case that takes a name bound before

18. A linear var assigned again, and None of a linear Option built early

19. A linear value in the branches of an if expression

20. A span of a borrow of a local bound with a region name

21. Two modules export the same name

22. \u{...} in a string literal

23. An imported C function inside @embed

24. None() as an argument of a parameter of type Option

Outside the compiler

25. Checks that name a generated C variable

26. SQLite and SQLCipher in one programme

27. A setting of DuckDB that says yes to anything

28. A commit of DuckDB after a failed statement

29. A data: URL in a URL attribute of a template

30. A function of a newer Hilde in an application built with an older one

31. An anchored pattern with a literal after its start

32. = between two spans

33. A reserved word as a name: is, skip and the others

34. An unknown module for a parse error elsewhere

35. A value made up to return after abort

36. A docstring between pragma Slot and its declaration

37. A write reference handed on where a read reference is asked

38. A field of a result borrowed in an ensures

39. A field of the result of a call