unison
unison copied to clipboard
Bring back `namespace` blocks and allow them to contain type decls, term defs, etc
Namespace blocks have some weird limitations:
- Can't have type declarations in them
- Doesn't parse to have
use
at the top of a namespace block - I think if you say
namespace Optional where ...
, you still have touse Optional None Some
.
Related: #380
We determined that by adding some extra stuff to ParsingEnv
, we could make it so namespace blocks can have type decls, term decls, use
statements...
Also, if it's easy: support namespace .bar where ...
, allow absolute names for namespaces, so easy to declare definitions in paths that aren't under current namespace.
Also related #1299
Also @Stew mentioned they should contain project names too, which made sense until I started to write it down. Will need to ask him for clarification. What do you do with multiple blocks for different projects in the same scratch file on save?