compiler friends: is there a good name for a "lowered abstract syntax tree" that captures a program in terms of the semantics of the target platform, but doesn't go as far as e.g. bytecode? this would be a step between a more typical AST and code generation.
Conversation
Idris and Haskell have something called a "core language", for simplified representation of their type theories. I'm not sure if it's what you're looking for, but it's probably relevant.
docs.idris-lang.org/en/latest/refe
hackage.haskell.org/package/idris-
stephendiehl.com/posts/ghc_03.h
1
3
Yeah, I call this 'core' syntax as distinct from the 'concrete' syntax. I think others call the latter the 'surface' syntax too.
1
1
Yeah, surface vs core language.
1
oh yeah, super interesting. I've been thinking about a "normalized" form for my syntax trees after desugaring and all names have been expanded. surface and core are great ways to think about it.
1
1
This Tweet was deleted by the Tweet author. Learn more
I think this just ends up being the same process as normalisation though. I could be wrong however!
1
They are synonyms.
1
1
Handy to know this - it’s not always obvious to people! I remember being super amazed when implementing dependent types for the first time that the ‘simplification’ of types ended up being just the same as regular normalisation!
Yeah, I think it seems mystifying when you’re not really sure what dependent types are, but once you do, I think it makes sense, because they contain programs.
1



