Merge pull request #2138 from unisonweb/topic/render-synthetic-vars

fix #2053 by using Var.rawName to produce text for synthetic vars
This commit is contained in:
Paul Chiusano 2021-06-29 07:27:45 -05:00 committed by GitHub
commit 05eef2e8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

View File

@ -242,8 +242,7 @@ symbol2to1 :: V2.Symbol -> V1.Symbol
symbol2to1 (V2.Symbol i t) = V1.Symbol i (Var.User t)
symbol1to2 :: V1.Symbol -> V2.Symbol
symbol1to2 (V1.Symbol i (Var.User t)) = V2.Symbol i t
symbol1to2 x = error $ "unimplemented: symbol1to2 " ++ show x
symbol1to2 (V1.Symbol i varType) = V2.Symbol i (Var.rawName varType)
shortHashSuffix1to2 :: Text -> V1.Reference.Pos
shortHashSuffix1to2 =

View File

@ -0,0 +1,7 @@
```ucm:hide
.> builtins.mergeio
```
```ucm
.> display List.map
```

View File

@ -0,0 +1,13 @@
```ucm
.> display List.map
go f i as acc =
_pattern = List.at i as
match _pattern with
None -> acc
Some _pattern1 ->
use Nat +
go f (i + 1) as (acc :+ f _pattern)
f a -> go f 0 a []
```