Skip to content

Commit

Permalink
two compilation fixes and some whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Arya Irani committed Nov 8, 2023
1 parent 95c1328 commit 01f0be5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import Unison.Term (Term)
import Unison.Type (Type)
import Unison.UnisonFile qualified as UF
import Unison.UnisonFile.Names qualified as UF
import Unison.UnisonFile.Summary qualified as Summary
import Unison.UnisonFile.Type (TypecheckedUnisonFile, UnisonFile)
import Unison.Util.Pretty (Pretty)
import Unison.Util.Pretty qualified as Pretty
Expand Down
1 change: 0 additions & 1 deletion unison-cli/src/Unison/Codebase/Editor/SlurpResult.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ pretty isPast ppe sr =
Just (UpdateAliases oldNames newNames) ->
let oldMessage =
let (shown, rest) = splitAt aliasesToShow $ toList oldNames
sz = length oldNames
in P.indentN
2
( P.wrap $
Expand Down
40 changes: 20 additions & 20 deletions unison-src/transcripts/update-type-delete-record-field.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ unique type Foo = { bar : Nat, baz : Int }
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
unique type Foo
Foo.bar : Foo -> Nat
Foo.bar.modify : (Nat ->{g} Nat) -> Foo ->{g} Foo
Expand All @@ -23,7 +23,7 @@ unique type Foo = { bar : Nat, baz : Int }
.> add
⍟ I've added these definitions:
unique type Foo
Foo.bar : Foo -> Nat
Foo.bar.modify : (Nat ->{g} Nat) -> Foo ->{g} Foo
Expand All @@ -42,10 +42,10 @@ unique type Foo = { bar : Nat }
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These names already exist. You can `update` them to your
new definition:
unique type Foo
Foo.bar : Foo -> Nat
Foo.bar.modify : (Nat ->{g} Nat) -> Foo ->{g} Foo
Expand All @@ -59,19 +59,19 @@ We want the field accessors to go away; but for now they are here, causing the u
Foo.baz : Foo -> Int
Foo.baz = cases Foo _ baz -> baz
Foo.baz.set : Int -> Foo -> Foo
Foo.baz.set baz1 = cases Foo bar _ -> Foo bar baz1
Foo.baz.modify : (Int ->{g} Int) -> Foo ->{g} Foo
Foo.baz.modify f = cases Foo bar baz -> Foo bar (f baz)
unique type Foo = { bar : Nat }
Foo.bar.modify f = cases Foo bar -> Foo (f bar)
Foo.bar.set bar1 = cases Foo _ -> Foo bar1
Foo.bar = cases Foo bar -> bar
Typechecking failed when propagating the update to all the dependents.
Expand All @@ -84,28 +84,28 @@ We want the field accessors to go away; but for now they are here, causing the u
1. -- #05gh1dur4778dauh9slaofprc5356n47qpove0c1jl0birt2fcu301js8auu5vfr5bjfga9j8ikuk07ll9fu1gj3ehrp3basguhsd58
unique type Foo
2. -- #77mi33dv8ac2s90852khi35km5gsamhnpada8mai0k36obbttgg17qld719ospcs1ht9ctolg3pjsqs6qjnl3hfmu493rgsher73sc0
Foo.bar : Foo -> Nat
3. -- #7m1n2178r5u12jdnb6crcmanu2gm961kdvbjul5m6hta1s57avibsvk6p5g9efut8sennpgstbb8kf97eujbbuiplsoloa4cael7t90
Foo.bar.modify : (Nat ->{g} Nat) -> Foo ->{g} Foo
4. -- #ghuqoel4pao6v8e7un238i3e86vv7a7pnvgaq8m9s32edm1upgv35gri2iu32ipn9r4poli56r5kr3vtjfrltem696grfl75al4jkgg
Foo.bar.set : Nat -> Foo -> Foo
5. -- #p8emkm2s09n3nsd8ne5f6fro0vsldk8pn7n6rcf417anuvvun43qrk1ioofs6pdq4537eosao17c7ibvktktr3lfqglmj26gmbulmj0
Foo.baz : Foo -> Int
6. -- #0il9pl29jpe3fh6vp3qeqai73915k3qffhf4bgttrgsj000b9fgs3bqoj8ugjop6kdr04acc34m1bj7lf417tslfeva7dmmoqdu5hug
Foo.baz.modify : (Int ->{g} Int) -> Foo ->{g} Foo
7. -- #87rjeqltvvd4adffsheqae62eefoge8p78pvnjdkc9q1stq20lhubvtpos0io4v3vhnol8nn2uollup97l4orq1fh2h12b0imeuuc58
Foo.baz.set : Int -> Foo -> Foo
8. -- #05gh1dur4778dauh9slaofprc5356n47qpove0c1jl0birt2fcu301js8auu5vfr5bjfga9j8ikuk07ll9fu1gj3ehrp3basguhsd58#0
Foo.Foo : Nat -> Int -> Foo
```

0 comments on commit 01f0be5

Please sign in to comment.