Skip to content

Commit a49146f

Browse files
committed
Merge branch 'trunk' into cp/defn-search-sync
2 parents cdab05d + b12baa4 commit a49146f

File tree

126 files changed

+902
-936
lines changed

Some content is hidden

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

126 files changed

+902
-936
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ indent_style = space
99
insert_final_newline = true
1010
max_line_length = 120
1111
trim_trailing_whitespace = true
12+
13+
[*.u]
14+
max_line_length = off

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ jobs:
388388
write-mode: overwrite
389389
contents: |
390390
```ucm
391-
.> project.create-empty jit-setup
391+
scratch/main> project.create-empty jit-setup
392392
jit-setup/main> lib.install ${{ env.jit_version }}
393393
```
394394
```unison

.ormolu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
infixl 8 ^?
2+
infixr 4 %%~, %~
3+
infixl 3 <|>
4+
infixl 1 &, <&>

codebase2/codebase-sqlite-hashing-v2/src/U/Codebase/Branch/Hashing.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import U.Codebase.HashTags
1010
import Unison.Hashing.V2 qualified as Hashing
1111
import Unison.Hashing.V2.Convert2 (convertBranchV3, v2ToH2Branch)
1212

13-
hashBranch :: forall m. Monad m => Branch m -> m BranchHash
13+
hashBranch :: forall m. (Monad m) => Branch m -> m BranchHash
1414
hashBranch branch =
1515
BranchHash . Hashing.contentHash <$> v2ToH2Branch branch
1616

codebase2/codebase-sqlite-hashing-v2/src/Unison/Hashing/V2/Convert2.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ v2ToH2Referent = \case
100100
V2Referent.Ref r -> H2.ReferentRef (v2ToH2Reference r)
101101
V2Referent.Con r cid -> H2.ReferentCon (v2ToH2Reference r) cid
102102

103-
v2ToH2Branch :: Monad m => V2.Branch m -> m H2.Branch
103+
v2ToH2Branch :: (Monad m) => V2.Branch m -> m H2.Branch
104104
v2ToH2Branch V2.Branch {terms, types, patches, children} = do
105105
hterms <-
106106
traverse sequenceA terms
@@ -166,7 +166,7 @@ hashPatchFormatToH2Patch Memory.PatchFull.Patch {termEdits, typeEdits} =
166166
V2Referent.Con typeRef conId -> do
167167
(H2.ReferentCon (v2ToH2Reference $ second unComponentHash typeRef) conId)
168168

169-
v2ToH2Term :: forall v. Ord v => V2.Term.HashableTerm v -> H2.Term v ()
169+
v2ToH2Term :: forall v. (Ord v) => V2.Term.HashableTerm v -> H2.Term v ()
170170
v2ToH2Term = ABT.transform convertF
171171
where
172172
convertF :: V2.Term.F' Text V2.Term.HashableTermRef V2.Term.TypeRef V2.Term.HashableTermLink V2.Term.TypeLink v a1 -> H2.TermF v () () a1

codebase2/codebase-sqlite/U/Codebase/Sqlite/Decode.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ decodeWatchResultFormat =
173173
------------------------------------------------------------------------------------------------------------------------
174174
-- unsyncs
175175

176-
unsyncTermComponent :: HasCallStack => TermFormat.SyncLocallyIndexedComponent' t d -> Either DecodeError (TermFormat.LocallyIndexedComponent' t d)
176+
unsyncTermComponent :: (HasCallStack) => TermFormat.SyncLocallyIndexedComponent' t d -> Either DecodeError (TermFormat.LocallyIndexedComponent' t d)
177177
unsyncTermComponent (TermFormat.SyncLocallyIndexedComponent terms) = do
178178
let phi (localIds, bs) = do
179179
(a, b) <- decodeSyncTermAndType bs

codebase2/codebase-sqlite/U/Codebase/Sqlite/HashHandle.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ data HashHandle = HashHandle
3939
toReferenceDecl :: Hash -> C.Type.TypeD Symbol -> C.Reference,
4040
-- | Hash decl's mentions
4141
toReferenceDeclMentions :: Hash -> C.Type.TypeD Symbol -> Set C.Reference,
42-
hashBranch :: forall m. Monad m => Branch m -> m BranchHash,
42+
hashBranch :: forall m. (Monad m) => Branch m -> m BranchHash,
4343
hashBranchV3 :: forall m. BranchV3 m -> BranchHash,
4444
hashCausal ::
4545
-- The causal's namespace hash

codebase2/codebase-sqlite/U/Codebase/Sqlite/LocalizeObject.hs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,23 @@ localizePatchG (Patch termEdits typeEdits) =
109109
-- General-purpose localization
110110

111111
-- Contains references to branch objects.
112-
class Ord c => ContainsBranches c s where
112+
class (Ord c) => ContainsBranches c s where
113113
branches_ :: Lens' s (Map c LocalBranchChildId)
114114

115115
-- Contains references to definition objects i.e. term/decl component objects.
116-
class Ord d => ContainsDefns d s where
116+
class (Ord d) => ContainsDefns d s where
117117
defns_ :: Lens' s (Map d LocalDefnId)
118118

119119
-- Contains references to objects by their hash.
120-
class Ord h => ContainsHashes h s where
120+
class (Ord h) => ContainsHashes h s where
121121
hashes_ :: Lens' s (Map h LocalHashId)
122122

123123
-- Contains references to patch objects.
124-
class Ord p => ContainsPatches p s where
124+
class (Ord p) => ContainsPatches p s where
125125
patches_ :: Lens' s (Map p LocalPatchObjectId)
126126

127127
-- Contains text.
128-
class Ord t => ContainsText t s where
128+
class (Ord t) => ContainsText t s where
129129
texts_ :: Lens' s (Map t LocalTextId)
130130

131131
-- The inner state of the localization of a branch object.
@@ -137,16 +137,16 @@ data LocalizeBranchState t d p c = LocalizeBranchState
137137
}
138138
deriving (Show, Generic)
139139

140-
instance Ord t => ContainsText t (LocalizeBranchState t d p c) where
140+
instance (Ord t) => ContainsText t (LocalizeBranchState t d p c) where
141141
texts_ = field @"texts"
142142

143-
instance Ord d => ContainsDefns d (LocalizeBranchState t d p c) where
143+
instance (Ord d) => ContainsDefns d (LocalizeBranchState t d p c) where
144144
defns_ = field @"defns"
145145

146-
instance Ord p => ContainsPatches p (LocalizeBranchState t d p c) where
146+
instance (Ord p) => ContainsPatches p (LocalizeBranchState t d p c) where
147147
patches_ = field @"patches"
148148

149-
instance Ord c => ContainsBranches c (LocalizeBranchState t d p c) where
149+
instance (Ord c) => ContainsBranches c (LocalizeBranchState t d p c) where
150150
branches_ = field @"branches"
151151

152152
-- | Run a computation that localizes a branch object, returning the local ids recorded within.
@@ -171,13 +171,13 @@ data LocalizePatchState t h d = LocalizePatchState
171171
}
172172
deriving (Show, Generic)
173173

174-
instance Ord t => ContainsText t (LocalizePatchState t h d) where
174+
instance (Ord t) => ContainsText t (LocalizePatchState t h d) where
175175
texts_ = field @"texts"
176176

177-
instance Ord h => ContainsHashes h (LocalizePatchState t h d) where
177+
instance (Ord h) => ContainsHashes h (LocalizePatchState t h d) where
178178
hashes_ = field @"hashes"
179179

180-
instance Ord d => ContainsDefns d (LocalizePatchState t h d) where
180+
instance (Ord d) => ContainsDefns d (LocalizePatchState t h d) where
181181
defns_ = field @"defns"
182182

183183
-- Run a computation that localizes a patch object, returning the local ids recorded within.

codebase2/codebase-sqlite/U/Codebase/Sqlite/NamedRef.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ instance (FromRow ref) => FromRow (NamedRef ref) where
5858
newtype ScopedRow ref
5959
= ScopedRow (NamedRef ref)
6060

61-
instance ToRow ref => ToRow (ScopedRow ref) where
61+
instance (ToRow ref) => ToRow (ScopedRow ref) where
6262
toRow (ScopedRow (NamedRef {reversedSegments = revSegments, ref})) =
6363
SQLText reversedName : SQLText namespace : SQLText lastNameSegment : toRow ref
6464
where

codebase2/codebase-sqlite/U/Codebase/Sqlite/Patch/Full.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ patchT_ f Patch {termEdits, typeEdits} = do
5555
newTypeEdits <- traverseOf (Map.bitraversed (Reference.t_) (Set.traverse . traverseFirst)) f typeEdits
5656
pure Patch {termEdits = newTermEdits, typeEdits = newTypeEdits}
5757
where
58-
traverseFirst :: Bitraversable b => Traversal (b a c) (b a' c) a a'
58+
traverseFirst :: (Bitraversable b) => Traversal (b a c) (b a' c) a a'
5959
traverseFirst f = bitraverse f pure
6060

6161
patchH_ :: (Ord t, Ord h') => Traversal (Patch' t h o) (Patch' t h' o) h h'

0 commit comments

Comments
 (0)