Sebastian Graf
fixpt.de
Sebastian Graf
@fixpt.de
Likes Lean, Haskell, static analysis, PL design and theory, general CS, and his trumpet
Would at least need syntax like `case x of (PSyn 42 |) -> ...`, where `|` delimits the "parameters" (visible version of "required constraints") from the "match variables" (visible versions of "provided constraints")
October 11, 2025 at 7:59 AM
At least in Haskell, there's a semantic difference, though. You can't "parameterize" a pattern synonym. So `case x of ((==) 42 -> True) -> ...` where 42 is supposed to be a parameter of the pattern synonym is not really expressible in Haskell.
October 11, 2025 at 7:57 AM
How about pair syntax? Or a more general record destructing syntax (that's how it works in Lean)
October 8, 2025 at 4:05 PM
I would make that depends on whether macro expansion (_) happens before ANFisation in your language. Is there some precedent? It would be important to decide coherently.

In Lean, it would be A), I think.
August 25, 2025 at 4:34 PM
As to <<loop>>: this is just the runtime detecting that a thunk that is already under evaluation is evaluated again. The first eval overwrites the thunk tag with a special tag for a "black hole". Evaluating a black hole crashes with the panic.
August 20, 2025 at 1:06 PM
A classic... I keep losing hours to this as well. Solution is to implement a linter as described here: github.com/ghc-proposal...
RecursiveLet by ocharles · Pull Request #401 · ghc-proposals/ghc-proposals
This is a proposal to allow Haskell developers to distinguish bindings that are self-referentially recursive from non-recursive bindings through the new RecursiveLet/NoRecursiveLet language extensi...
github.com
August 20, 2025 at 1:04 PM
Apparently they do support first class functions since 2022: effekt-lang.org/evolution
Effekt Language: Language Evolution
A language with lexical effect handlers and lightweight effect polymorphism
effekt-lang.org
August 15, 2025 at 10:17 PM
You might enjoy effekt-lang.org#intro-polymo.... I think their notion of implicit effect polymorphism is pretty usable
Effekt Language: Home
A language with lexical effect handlers and lightweight effect polymorphism
effekt-lang.org
August 15, 2025 at 2:18 PM
Have you tried Lean's InfoView? :)
July 13, 2025 at 10:07 AM
(Even after stack alloc it will be far slower to call an unknown function in tailRec than to jump to it's address directly, so I'm not sure whether this idea is practical)
July 11, 2025 at 11:51 AM
If it really is primitive (so can't inline it), then the compiler needs special support for the closure passed to tailRec. It will never escape and hence its fvs can be allocated on the stack.

But how do you mutually recursive tail calls with tailRec?
July 11, 2025 at 11:49 AM
I had assumed that the goal here is to implement tail call opt for this one special case. If you inline it, how can you still detect the special case? Or do you mean that your compiler can still spot tail recursion after inlining tailRec? In that case, what is so primitive about tailRec?
July 11, 2025 at 11:47 AM
But it's not really efficient unless the compiler inlines it for you
July 9, 2025 at 5:41 PM
Your contributions to the community are amazing. Badly socialized people will always be assholes 🤷🏻 Though I suspect your point is rather that we should call out this behaviour for the health of our community. Fair point...
June 2, 2025 at 10:27 PM
I would very much like to be liked or loathed like this
May 29, 2025 at 10:31 PM