@@ -101,10 +101,11 @@ this = \"still a string\"
101
101
102
102
(ert-deftest docs-bar-comment-different-spacings ()
103
103
(purescript-test-ranges
104
- " -- | Docs comment 1 space
104
+ " --| Docs comment 0 space
105
+ -- | Docs comment 1 space
105
106
-- | Docs comment many spaces
106
107
"
107
- '((1 57 font-lock-doc-face ))))
108
+ '((1 85 font-lock-doc-face ))))
108
109
109
110
(ert-deftest docs-bar-comment-continuation ()
110
111
" Acc. to
@@ -248,3 +249,57 @@ mkMyComponent = do
248
249
(186 192 nil )
249
250
(193 194 font-lock-type-face )
250
251
(195 195 nil ))))
252
+
253
+ (ert-deftest instance-miscellaneous ()
254
+ " A diverse code snippet using `instance' (from Data.List module)"
255
+ (purescript-test-ranges
256
+ " instance extendNonEmptyList :: Extend NonEmptyList where
257
+ extend f w@(NonEmptyList (_ :| as)) =
258
+ NonEmptyList (f w :| (foldr go { val: Nil, acc: Nil } as).val)
259
+ where
260
+ go a { val, acc } = { val: f (NonEmptyList (a :| acc)) : val, acc: a : acc }
261
+ instance semigroupNonEmptyList :: Semigroup (NonEmptyList a) where
262
+ append (NonEmptyList (a :| as)) as' =
263
+ NonEmptyList (a :| as <> toList as')
264
+ derive newtype instance foldableNonEmptyList :: Foldable NonEmptyList
265
+ "
266
+ '((1 8 font-lock-keyword-face ) (9 28 nil )
267
+ (29 30 font-lock-variable-name-face ) (31 31 nil )
268
+ (32 37 font-lock-type-face ) (38 38 nil )
269
+ (39 50 font-lock-type-face ) (51 51 nil )
270
+ (52 56 font-lock-keyword-face ) (57 69 nil )
271
+ (70 70 font-lock-variable-name-face ) (71 71 nil )
272
+ (72 83 font-lock-type-face ) (84 85 nil )
273
+ (86 86 font-lock-keyword-face ) (87 87 nil )
274
+ (88 89 font-lock-type-face ) (90 95 nil )
275
+ (96 96 font-lock-variable-name-face ) (97 101 nil )
276
+ (102 113 font-lock-type-face ) (114 119 nil )
277
+ (120 121 font-lock-type-face ) (122 137 nil )
278
+ (138 138 font-lock-type-face ) (139 139 nil )
279
+ (140 142 font-lock-type-face ) (143 147 nil )
280
+ (148 148 font-lock-type-face ) (149 149 nil )
281
+ (150 152 font-lock-type-face ) (153 158 nil )
282
+ (159 159 font-lock-variable-name-face ) (160 168 nil )
283
+ (169 173 font-lock-keyword-face ) (174 196 nil )
284
+ (197 197 font-lock-variable-name-face ) (198 203 nil )
285
+ (204 204 font-lock-type-face ) (205 208 nil )
286
+ (209 220 font-lock-type-face ) (221 224 nil )
287
+ (225 226 font-lock-type-face ) (227 233 nil )
288
+ (234 234 font-lock-type-face ) (235 243 nil )
289
+ (244 244 font-lock-type-face ) (245 247 nil )
290
+ (248 248 font-lock-type-face ) (249 255 nil )
291
+ (256 263 font-lock-keyword-face ) (264 286 nil )
292
+ (287 288 font-lock-variable-name-face ) (289 289 nil )
293
+ (290 298 font-lock-type-face ) (299 300 nil )
294
+ (301 312 font-lock-type-face ) (313 316 nil )
295
+ (317 321 font-lock-keyword-face ) (322 332 nil )
296
+ (333 344 font-lock-type-face ) (345 348 nil )
297
+ (349 350 font-lock-type-face ) (351 360 nil )
298
+ (361 361 font-lock-variable-name-face ) (362 366 nil )
299
+ (367 378 font-lock-type-face ) (379 382 nil )
300
+ (383 384 font-lock-type-face ) (385 388 nil )
301
+ (389 390 font-lock-variable-name-face ) (391 403 nil )
302
+ (404 409 font-lock-keyword-face ) (410 448 nil )
303
+ (449 450 font-lock-variable-name-face ) (451 451 nil )
304
+ (452 459 font-lock-type-face ) (460 460 nil )
305
+ (461 472 font-lock-type-face ) (473 473 nil ))))
0 commit comments