Merge remote-tracking branch 'origin/trunk' into wip/codebase2 · JavaDerek/unison@d1ddcfe · GitHub
Skip to content

Commit d1ddcfe

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into wip/codebase2
# Conflicts: # parser-typechecker/src/Unison/Codebase.hs # parser-typechecker/src/Unison/Codebase/Branch.hs # parser-typechecker/src/Unison/Codebase/Editor/HandleCommand.hs # parser-typechecker/tests/Unison/Test/ANF.hs # parser-typechecker/unison-parser-typechecker.cabal # parser-typechecker/unison/Main.hs # stack.yaml
2 parents c77d7d6 + f941687 commit d1ddcfe

126 files changed

Lines changed: 4356 additions & 3030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CONTRIBUTORS.markdown‎

Lines changed: 2 additions & 0 deletions

‎codebase1/codebase/Unison/Codebase/V1/Serialization/V1.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ getTerm' getVar getA = getABT getVar getA go
270270
8 -> Term.Handle <$> getChild <*> getChild
271271
9 -> Term.App <$> getChild <*> getChild
272272
10 -> Term.Ann <$> getChild <*> getType' getVar getA
273-
11 -> Term.Sequence . Sequence.fromList <$> getList getChild
273+
11 -> Term.List . Sequence.fromList <$> getList getChild
274274
12 -> Term.If <$> getChild <*> getChild <*> getChild
275275
13 -> Term.And <$> getChild <*> getChild
276276
14 -> Term.Or <$> getChild <*> getChild

‎codebase1/codebase/Unison/Codebase/V1/Term.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ data F typeVar typeAnn a
5656
| Handle a a
5757
| App a a
5858
| Ann a (Type typeVar typeAnn)
59-
| Sequence (Seq a)
59+
| List (Seq a)
6060
| If a a a
6161
| And a a
6262
| Or a a
@@ -137,7 +137,7 @@ generalizedDependencies termRef typeRef literalType dataConstructor dataType eff
137137
f t@(Float _) = Writer.tell [literalType Type.floatRef] $> t
138138
f t@(Boolean _) = Writer.tell [literalType Type.booleanRef] $> t
139139
f t@(Text _) = Writer.tell [literalType Type.textRef] $> t
140-
f t@(Sequence _) = Writer.tell [literalType Type.vectorRef] $> t
140+
f t@(List _) = Writer.tell [literalType Type.listRef] $> t
141141
f t@(Constructor r cid) =
142142
Writer.tell [dataType r, dataConstructor r cid] $> t
143143
f t@(Request r cid) =

‎codebase1/codebase/Unison/Codebase/V1/Term/Pattern.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ generalizedDependencies literalType dataConstructor dataType effectConstructor e
8282
EffectPure _ -> [effectType Type.effectRef]
8383
EffectBind r cid _ _ ->
8484
[effectType Type.effectRef, effectType r, effectConstructor r cid]
85-
SequenceLiteral _ -> [literalType Type.vectorRef]
86-
SequenceOp {} -> [literalType Type.vectorRef]
85+
SequenceLiteral _ -> [literalType Type.listRef]
86+
SequenceOp {} -> [literalType Type.listRef]
8787
Boolean _ -> [literalType Type.booleanRef]
8888
Int _ -> [literalType Type.intRef]
8989
Nat _ -> [literalType Type.natRef]

‎codebase1/codebase/Unison/Codebase/V1/Type.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ dependencies t = Set.fromList . Writer.execWriter $ ABT.visit' f t
4141
f t@(Ref r) = Writer.tell [r] $> t
4242
f t = pure t
4343

44-
intRef, natRef, floatRef, booleanRef, textRef, charRef, vectorRef, bytesRef, effectRef, termLinkRef, typeLinkRef :: Reference
44+
intRef, natRef, floatRef, booleanRef, textRef, charRef, listRef, bytesRef, effectRef, termLinkRef, typeLinkRef :: Reference
4545
intRef = Reference.Builtin "Int"
4646
natRef = Reference.Builtin "Nat"
4747
floatRef = Reference.Builtin "Float"
4848
booleanRef = Reference.Builtin "Boolean"
4949
textRef = Reference.Builtin "Text"
5050
charRef = Reference.Builtin "Char"
51-
vectorRef = Reference.Builtin "Sequence"
51+
listRef = Reference.Builtin "Sequence"
5252
bytesRef = Reference.Builtin "Bytes"
5353
effectRef = Reference.Builtin "Effect"
5454
termLinkRef = Reference.Builtin "Link.Term"

‎codebase2/codebase-sqlite/U/Codebase/Sqlite/Operations.hs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ module U.Codebase.Sqlite.Operations where
1414

1515
import Control.Lens (Lens')
1616
import qualified Control.Lens as Lens
17-
import Control.Monad.Except (ExceptT, MonadError, runExceptT, throwError)
1817
import Control.Monad (MonadPlus (mzero), join, when, (<=<))
18+
import Control.Monad.Except (ExceptT, MonadError, runExceptT, throwError)
1919
import Control.Monad.State (MonadState, StateT, evalStateT)
2020
import Control.Monad.Trans (MonadTrans (lift))
2121
import Control.Monad.Trans.Maybe (MaybeT (MaybeT), runMaybeT)
@@ -46,6 +46,7 @@ import Data.Tuple.Extra (uncurry3)
4646
import qualified Data.Vector as Vector
4747
import Data.Word (Word64)
4848
import Debug.Trace
49+
import GHC.Stack (HasCallStack)
4950
import qualified U.Codebase.Branch as C.Branch
5051
import qualified U.Codebase.Causal as C
5152
import U.Codebase.Decl (ConstructorId)
@@ -121,7 +122,6 @@ import qualified U.Util.Type as TypeUtil
121122

122123
-- * Error handling
123124

124-
type Err m = MonadError Error m
125125
debug :: Bool
126126
debug = False
127127

@@ -498,7 +498,7 @@ c2xTerm saveText saveDefn tm tp =
498498
C.Term.Handle a a2 -> pure $ C.Term.Handle a a2
499499
C.Term.App a a2 -> pure $ C.Term.App a a2
500500
C.Term.Ann a typ -> C.Term.Ann a <$> ABT.transformM goType typ
501-
C.Term.Sequence as -> pure $ C.Term.Sequence as
501+
C.Term.List as -> pure $ C.Term.List as
502502
C.Term.If c t f -> pure $ C.Term.If c t f
503503
C.Term.And a a2 -> pure $ C.Term.And a a2
504504
C.Term.Or a a2 -> pure $ C.Term.Or a a2

‎codebase2/codebase-sqlite/U/Codebase/Sqlite/Serialization.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ putTerm t = putABT putSymbol putUnit putF t
202202
putWord8 9 *> putChild f *> putChild arg
203203
Term.Ann e t ->
204204
putWord8 10 *> putChild e *> putTType t
205-
Term.Sequence vs ->
205+
Term.List vs ->
206206
putWord8 11 *> putFoldable putChild vs
207207
Term.If cond t f ->
208208
putWord8 12 *> putChild cond *> putChild t *> putChild f
@@ -284,7 +284,7 @@ getTerm = getABT getSymbol getUnit getF
284284
8 -> Term.Handle <$> getChild <*> getChild
285285
9 -> Term.App <$> getChild <*> getChild
286286
10 -> Term.Ann <$> getChild <*> getType getReference
287-
11 -> Term.Sequence <$> getSequence getChild
287+
11 -> Term.List <$> getSequence getChild
288288
12 -> Term.If <$> getChild <*> getChild <*> getChild
289289
13 -> Term.And <$> getChild <*> getChild
290290
14 -> Term.Or <$> getChild <*> getChild

‎codebase2/codebase-sqlite/U/Codebase/Sqlite/Sync22.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ trySync ::
106106
Generation ->
107107
Entity ->
108108
m (TrySyncResult Entity)
109-
trySync tCache hCache oCache gc = \case
109+
trySync tCache hCache oCache _gc = \case
110110
-- for causals, we need to get the value_hash_id of the thingo
111111
-- - maybe enqueue their parents
112112
-- - enqueue the self_ and value_ hashes

‎codebase2/codebase/U/Codebase/Term.hs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ data F' text termRef typeRef termLink typeLink vt a
7575
| Handle a a
7676
| App a a
7777
| Ann a (TypeR typeRef vt)
78-
| Sequence (Seq a)
78+
| List (Seq a)
7979
| If a a a
8080
| And a a
8181
| Or a a
@@ -169,7 +169,7 @@ extraMap ftext ftermRef ftypeRef ftermLink ftypeLink fvt = go'
169169
Handle e h -> Handle e h
170170
App f a -> App f a
171171
Ann a typ -> Ann a (Type.rmap ftypeRef $ ABT.vmap fvt typ)
172-
Sequence s -> Sequence s
172+
List s -> List s
173173
If c t f -> If c t f
174174
And p q -> And p q
175175
Or p q -> Or p q
@@ -292,7 +292,7 @@ instance (Eq v, Show v) => H.Hashable1 (F v) where
292292
error "handled above, but GHC can't figure this out"
293293
App a a2 -> [tag 3, hashed (hash a), hashed (hash a2)]
294294
Ann a t -> [tag 4, hashed (hash a), hashed (ABT.hash t)]
295-
Sequence as ->
295+
List as ->
296296
tag 5 :
297297
varint (fromIntegral (length as)) :
298298
map

‎parser-typechecker/src/Unison/Builtin.hs‎

Lines changed: 51 additions & 55 deletions

0 commit comments

Comments
 (0)