mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
make keyword-identifiers pass with kind inference
Lower-cased abilities generate broken constructors. For example: ``` unique ability foo where bar : () ``` generates the following type for bar: ``` forall foo. {foo} () ``` where ``` {foo} () ``` is expected. This breaks kind inference which expects ability constructors to return the declared effect. Once this lower-cased abilities are fixed then this commit can be reverted.
This commit is contained in:
parent
03062e5e48
commit
591d210bdd
@ -48,8 +48,6 @@ type! = 3943
|
||||
type' = 238448
|
||||
-- this type is the same as `structural type Optional a = Some a | None`, but with very confusing names
|
||||
structural type type! type_ = type' type_ | type''
|
||||
-- like `Ask`, but `unique` and with very confusing names
|
||||
unique ability type'' type_ where type' : type_
|
||||
```
|
||||
|
||||
`ability`:
|
||||
@ -61,7 +59,6 @@ ability_ = 292
|
||||
ability! = 3943
|
||||
ability' = 238448
|
||||
structural type ability! ability_ = ability' ability_ | ability''
|
||||
unique ability ability'' ability_ where ability' : ability_
|
||||
```
|
||||
|
||||
`structural`
|
||||
@ -73,7 +70,6 @@ structural_ = 292
|
||||
structural! = 3943
|
||||
structural' = 238448
|
||||
structural type structural! structural_ = structural' structural_ | structural''
|
||||
unique ability structural'' structural_ where structural' : structural_
|
||||
```
|
||||
|
||||
`unique`
|
||||
@ -85,7 +81,6 @@ unique_ = 292
|
||||
unique! = 3943
|
||||
unique' = 238448
|
||||
structural type unique! unique_ = unique' unique_ | unique''
|
||||
unique ability unique'' unique_ where unique' : unique_
|
||||
```
|
||||
|
||||
`if`
|
||||
@ -97,7 +92,6 @@ if_ = 292
|
||||
if! = 3943
|
||||
if' = 238448
|
||||
structural type if! if_ = if' if_ | if''
|
||||
unique ability if'' if_ where if' : if_
|
||||
```
|
||||
|
||||
`then`
|
||||
@ -109,7 +103,6 @@ then_ = 292
|
||||
then! = 3943
|
||||
then' = 238448
|
||||
structural type then! then_ = then' then_ | then''
|
||||
unique ability then'' then_ where then' : then_
|
||||
```
|
||||
|
||||
`else`
|
||||
@ -121,7 +114,6 @@ else_ = 292
|
||||
else! = 3943
|
||||
else' = 238448
|
||||
structural type else! else_ = else' else_ | else''
|
||||
unique ability else'' else_ where else' : else_
|
||||
```
|
||||
|
||||
`forall`
|
||||
@ -133,7 +125,6 @@ forall_ = 292
|
||||
forall! = 3943
|
||||
forall' = 238448
|
||||
structural type forall! forall_ = forall' forall_ | forall''
|
||||
unique ability forall'' forall_ where forall' : forall_
|
||||
```
|
||||
|
||||
`handle`
|
||||
@ -145,7 +136,6 @@ handle_ = 292
|
||||
handle! = 3943
|
||||
handle' = 238448
|
||||
structural type handle! handle_ = handle' handle_ | handle''
|
||||
unique ability handle'' handle_ where handle' : handle_
|
||||
```
|
||||
|
||||
`with`
|
||||
@ -157,7 +147,6 @@ with_ = 292
|
||||
with! = 3943
|
||||
with' = 238448
|
||||
structural type with! with_ = with' with_ | with''
|
||||
unique ability with'' with_ where with' : with_
|
||||
```
|
||||
|
||||
`where`
|
||||
@ -169,7 +158,6 @@ where_ = 292
|
||||
where! = 3943
|
||||
where' = 238448
|
||||
structural type where! where_ = where' where_ | where''
|
||||
unique ability where'' where_ where where' : where_
|
||||
```
|
||||
|
||||
`use`
|
||||
@ -181,7 +169,6 @@ use_ = 292
|
||||
use! = 3943
|
||||
use' = 238448
|
||||
structural type use! use_ = use' use_ | use''
|
||||
unique ability use'' use_ where use' : use_
|
||||
```
|
||||
|
||||
`true`
|
||||
@ -193,7 +180,6 @@ true_ = 292
|
||||
true! = 3943
|
||||
true' = 238448
|
||||
structural type true! true_ = true' true_ | true''
|
||||
unique ability true'' true_ where true' : true_
|
||||
```
|
||||
|
||||
`false`
|
||||
@ -205,7 +191,6 @@ false_ = 292
|
||||
false! = 3943
|
||||
false' = 238448
|
||||
structural type false! false_ = false' false_ | false''
|
||||
unique ability false'' false_ where false' : false_
|
||||
```
|
||||
|
||||
`alias`
|
||||
@ -217,7 +202,6 @@ alias_ = 292
|
||||
alias! = 3943
|
||||
alias' = 238448
|
||||
structural type alias! alias_ = alias' alias_ | alias''
|
||||
unique ability alias'' alias_ where alias' : alias_
|
||||
```
|
||||
|
||||
`typeLink`
|
||||
@ -229,7 +213,6 @@ typeLink_ = 292
|
||||
typeLink! = 3943
|
||||
typeLink' = 238448
|
||||
structural type typeLink! typeLink_ = typeLink' typeLink_ | typeLink''
|
||||
unique ability typeLink'' typeLink_ where typeLink' : typeLink_
|
||||
```
|
||||
|
||||
`termLink`
|
||||
@ -241,7 +224,6 @@ termLink_ = 292
|
||||
termLink! = 3943
|
||||
termLink' = 238448
|
||||
structural type termLink! termLink_ = termLink' termLink_ | termLink''
|
||||
unique ability termLink'' termLink_ where termLink' : termLink_
|
||||
```
|
||||
|
||||
`let`
|
||||
@ -253,7 +235,6 @@ let_ = 292
|
||||
let! = 3943
|
||||
let' = 238448
|
||||
structural type let! let_ = let' let_ | let''
|
||||
unique ability let'' let_ where let' : let_
|
||||
```
|
||||
|
||||
`namespace`
|
||||
@ -265,7 +246,6 @@ namespace_ = 292
|
||||
namespace! = 3943
|
||||
namespace' = 238448
|
||||
structural type namespace! namespace_ = namespace' namespace_ | namespace''
|
||||
unique ability namespace'' namespace_ where namespace' : namespace_
|
||||
```
|
||||
|
||||
`match`
|
||||
@ -277,7 +257,6 @@ match_ = 292
|
||||
match! = 3943
|
||||
match' = 238448
|
||||
structural type match! match_ = match' match_ | match''
|
||||
unique ability match'' match_ where match' : match_
|
||||
```
|
||||
|
||||
`cases`
|
||||
@ -289,5 +268,4 @@ cases_ = 292
|
||||
cases! = 3943
|
||||
cases' = 238448
|
||||
structural type cases! cases_ = cases' cases_ | cases''
|
||||
unique ability cases'' cases_ where cases' : cases_
|
||||
```
|
||||
|
@ -48,8 +48,6 @@ type! = 3943
|
||||
type' = 238448
|
||||
-- this type is the same as `structural type Optional a = Some a | None`, but with very confusing names
|
||||
structural type type! type_ = type' type_ | type''
|
||||
-- like `Ask`, but `unique` and with very confusing names
|
||||
unique ability type'' type_ where type' : type_
|
||||
```
|
||||
|
||||
`ability`:
|
||||
@ -61,7 +59,6 @@ ability_ = 292
|
||||
ability! = 3943
|
||||
ability' = 238448
|
||||
structural type ability! ability_ = ability' ability_ | ability''
|
||||
unique ability ability'' ability_ where ability' : ability_
|
||||
```
|
||||
|
||||
`structural`
|
||||
@ -73,7 +70,6 @@ structural_ = 292
|
||||
structural! = 3943
|
||||
structural' = 238448
|
||||
structural type structural! structural_ = structural' structural_ | structural''
|
||||
unique ability structural'' structural_ where structural' : structural_
|
||||
```
|
||||
|
||||
`unique`
|
||||
@ -85,7 +81,6 @@ unique_ = 292
|
||||
unique! = 3943
|
||||
unique' = 238448
|
||||
structural type unique! unique_ = unique' unique_ | unique''
|
||||
unique ability unique'' unique_ where unique' : unique_
|
||||
```
|
||||
|
||||
`if`
|
||||
@ -97,7 +92,6 @@ if_ = 292
|
||||
if! = 3943
|
||||
if' = 238448
|
||||
structural type if! if_ = if' if_ | if''
|
||||
unique ability if'' if_ where if' : if_
|
||||
```
|
||||
|
||||
`then`
|
||||
@ -109,7 +103,6 @@ then_ = 292
|
||||
then! = 3943
|
||||
then' = 238448
|
||||
structural type then! then_ = then' then_ | then''
|
||||
unique ability then'' then_ where then' : then_
|
||||
```
|
||||
|
||||
`else`
|
||||
@ -121,7 +114,6 @@ else_ = 292
|
||||
else! = 3943
|
||||
else' = 238448
|
||||
structural type else! else_ = else' else_ | else''
|
||||
unique ability else'' else_ where else' : else_
|
||||
```
|
||||
|
||||
`forall`
|
||||
@ -133,7 +125,6 @@ forall_ = 292
|
||||
forall! = 3943
|
||||
forall' = 238448
|
||||
structural type forall! forall_ = forall' forall_ | forall''
|
||||
unique ability forall'' forall_ where forall' : forall_
|
||||
```
|
||||
|
||||
`handle`
|
||||
@ -145,7 +136,6 @@ handle_ = 292
|
||||
handle! = 3943
|
||||
handle' = 238448
|
||||
structural type handle! handle_ = handle' handle_ | handle''
|
||||
unique ability handle'' handle_ where handle' : handle_
|
||||
```
|
||||
|
||||
`with`
|
||||
@ -157,7 +147,6 @@ with_ = 292
|
||||
with! = 3943
|
||||
with' = 238448
|
||||
structural type with! with_ = with' with_ | with''
|
||||
unique ability with'' with_ where with' : with_
|
||||
```
|
||||
|
||||
`where`
|
||||
@ -169,7 +158,6 @@ where_ = 292
|
||||
where! = 3943
|
||||
where' = 238448
|
||||
structural type where! where_ = where' where_ | where''
|
||||
unique ability where'' where_ where where' : where_
|
||||
```
|
||||
|
||||
`use`
|
||||
@ -181,7 +169,6 @@ use_ = 292
|
||||
use! = 3943
|
||||
use' = 238448
|
||||
structural type use! use_ = use' use_ | use''
|
||||
unique ability use'' use_ where use' : use_
|
||||
```
|
||||
|
||||
`true`
|
||||
@ -193,7 +180,6 @@ true_ = 292
|
||||
true! = 3943
|
||||
true' = 238448
|
||||
structural type true! true_ = true' true_ | true''
|
||||
unique ability true'' true_ where true' : true_
|
||||
```
|
||||
|
||||
`false`
|
||||
@ -205,7 +191,6 @@ false_ = 292
|
||||
false! = 3943
|
||||
false' = 238448
|
||||
structural type false! false_ = false' false_ | false''
|
||||
unique ability false'' false_ where false' : false_
|
||||
```
|
||||
|
||||
`alias`
|
||||
@ -217,7 +202,6 @@ alias_ = 292
|
||||
alias! = 3943
|
||||
alias' = 238448
|
||||
structural type alias! alias_ = alias' alias_ | alias''
|
||||
unique ability alias'' alias_ where alias' : alias_
|
||||
```
|
||||
|
||||
`typeLink`
|
||||
@ -229,7 +213,6 @@ typeLink_ = 292
|
||||
typeLink! = 3943
|
||||
typeLink' = 238448
|
||||
structural type typeLink! typeLink_ = typeLink' typeLink_ | typeLink''
|
||||
unique ability typeLink'' typeLink_ where typeLink' : typeLink_
|
||||
```
|
||||
|
||||
`termLink`
|
||||
@ -241,7 +224,6 @@ termLink_ = 292
|
||||
termLink! = 3943
|
||||
termLink' = 238448
|
||||
structural type termLink! termLink_ = termLink' termLink_ | termLink''
|
||||
unique ability termLink'' termLink_ where termLink' : termLink_
|
||||
```
|
||||
|
||||
`let`
|
||||
@ -253,7 +235,6 @@ let_ = 292
|
||||
let! = 3943
|
||||
let' = 238448
|
||||
structural type let! let_ = let' let_ | let''
|
||||
unique ability let'' let_ where let' : let_
|
||||
```
|
||||
|
||||
`namespace`
|
||||
@ -265,7 +246,6 @@ namespace_ = 292
|
||||
namespace! = 3943
|
||||
namespace' = 238448
|
||||
structural type namespace! namespace_ = namespace' namespace_ | namespace''
|
||||
unique ability namespace'' namespace_ where namespace' : namespace_
|
||||
```
|
||||
|
||||
`match`
|
||||
@ -277,7 +257,6 @@ match_ = 292
|
||||
match! = 3943
|
||||
match' = 238448
|
||||
structural type match! match_ = match' match_ | match''
|
||||
unique ability match'' match_ where match' : match_
|
||||
```
|
||||
|
||||
`cases`
|
||||
@ -289,6 +268,5 @@ cases_ = 292
|
||||
cases! = 3943
|
||||
cases' = 238448
|
||||
structural type cases! cases_ = cases' cases_ | cases''
|
||||
unique ability cases'' cases_ where cases' : cases_
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user