I'd say the main reason to implement `append` in GHC would be to handle rules that can't be solved by evaluation (e.g., eliminate append [] on the right, some associativity rule, etc.).

The speed of evaluation shouldn't really be much different as it should be doing the same thing, more or less.

If there is a big performance hit for just straight evaluation, it might be better to work on that part of GHC, which would also benefit other functions, rather than adding more special cased functions. 

Cheers, 
Iavor

On Tue, Jul 2, 2024, 3:30 PM Hécate via ghc-devs <ghc-devs@haskell.org> wrote:
Hi GHC devs,

I was wondering recently, considering that type family evaluation is
notoriously slow, how one would implement type-level list concatenation
directly within GHC in a way that is much less expensive to run. So I am
looking for pointers, as this part of GHC is fairly unknown to me.

Thinking about it, I'm actually unsure where the tyfam evaluation is
happening.

Any advice would be appreciated.

Cheers,
Hécate

--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: https://glitchbra.in
RUN: BSD

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs