1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
Commit Graph

94 Commits

Author SHA1 Message Date
Rob Rix
4d25c23618 🔥 offsetRange. 2016-03-09 01:52:45 -05:00
Rob Rix
2b231edab4 🔥 substring. 2016-03-09 01:52:20 -05:00
Rob Rix
471449985a 🔥 sublist. 2016-03-09 01:51:39 -05:00
Rob Rix
67fd5c3da4 Generalize totalRange to arbitrary Foldables. 2016-03-09 01:43:22 -05:00
Rob Rix
78aeffde06 Remove the Functor constraint from unionRanges. 2016-03-04 20:10:45 -05:00
Rob Rix
9529d3aab0 Revert "Add a maybeUnionRanges function."
This reverts commit 183d77173ea6a9250092710996c066d3af19d816.
2016-03-04 20:08:10 -05:00
Rob Rix
e1ea26206a Revert "Document maybeUnionRanges."
This reverts commit 25dc580212e0c8f6964208b828771fba767933b9.
2016-03-04 20:08:07 -05:00
Rob Rix
650663c83f Revert "Simplify maybeUnionRanges."
This reverts commit 62e79ec5206aa8d07984927f60c0367f3e7aac13.
2016-03-04 20:08:04 -05:00
Rob Rix
d9e74e1f55 Revert "Define maybeUnionRanges as a specialization of maybeConcat."
This reverts commit 3210ab6fe6e660106c3c2e1ae92af733ed27c5b0.
2016-03-04 20:07:59 -05:00
Rob Rix
8325042643 Define unionRangesFrom with maybeConcat. 2016-03-04 20:07:52 -05:00
Rob Rix
2ca378db0d Define maybeUnionRanges as a specialization of maybeConcat. 2016-03-04 20:07:04 -05:00
Rob Rix
6b17c3c1ff Simplify maybeUnionRanges. 2016-03-04 20:03:37 -05:00
Rob Rix
aea8e3e200 Document maybeUnionRanges. 2016-03-04 20:00:01 -05:00
Rob Rix
34e798cb09 Add a maybeUnionRanges function. 2016-03-04 19:59:31 -05:00
Rob Rix
3716048394 Define unionRanges in terms of unionRangesFrom. 2016-03-03 16:00:07 -05:00
Rob Rix
8637d6d384 Add a unionRangesFrom function taking a default Range. 2016-03-03 15:59:40 -05:00
Rob Rix
cf8673b14f Correct the docs of unionRanges. 2016-03-03 15:58:48 -05:00
Rob Rix
9981e98a77 Revert "Move safeRange into the Range module."
This reverts commit 781f940cad93db3954ddb9f2ddd9de23c432a68f.
2016-03-03 10:42:03 -05:00
Rob Rix
e630169833 Move safeRange into the Range module. 2016-03-02 18:54:12 -05:00
Rob Rix
9108b56e4f Add a rangeAt function to construct a Range at an index. 2016-02-29 10:00:02 -05:00
Rob Rix
c033182e5f Replace the Semigroup instance with a Monoid instance over Data.Option. 2016-02-26 19:55:14 -05:00
Matt Diephouse
5eb6ea0996 Document the declarations in Range.hs 2016-01-13 14:38:57 -05:00
Matt Diephouse
75e4f2b7bd Merge match, parse, and recurse into a single function 2016-01-13 14:06:59 -05:00
Matt Diephouse
52a8661390 Swap parameter order and eta reduce 2016-01-13 14:00:57 -05:00
Matt Diephouse
6f882be685 Extract the recursion into a function 2016-01-13 13:57:28 -05:00
Matt Diephouse
bc95741b0d Swap parameter order and eta reduce 2016-01-13 13:55:09 -05:00
Matt Diephouse
58b4e8a985 Extract saving of a word 2016-01-13 13:54:49 -05:00
Matt Diephouse
d7001befc6 Add a parse function to handle recursing 2016-01-13 13:52:07 -05:00
Matt Diephouse
8acdaaf1f5 Call it match instead of parse 2016-01-13 13:25:54 -05:00
Matt Diephouse
cc5a1b7736 Let the transform take 2 arguments 2016-01-13 13:03:11 -05:00
Matt Diephouse
09bdf89982 Make parse handle the fmap 2016-01-13 12:53:31 -05:00
Matt Diephouse
c478e19af6 Don't pass in string 2016-01-13 12:44:22 -05:00
Matt Diephouse
b5b00505cc Make take and skip take predicates 2016-01-13 12:39:52 -05:00
Matt Diephouse
06468b59de Negate isWordOrSpace and call it isPunctuation 2016-01-13 12:18:19 -05:00
Matt Diephouse
205f733132 Call these take and skip 2016-01-13 12:12:52 -05:00
Matt Diephouse
9d90206367 Use option instead of fromMaybe 2016-01-13 10:04:27 -05:00
Matt Diephouse
fd1305acd1 Move unionRange to be by unionRanges 2016-01-13 10:04:27 -05:00
Matt Diephouse
473866cb6a Use Option instead of creating a Union type 2016-01-13 10:04:26 -05:00
Matt Diephouse
f1cd77c9c3 Create a new type for unioning Range with a Monoid
The existing Monoid Range violated the Monoid identity law.
2016-01-13 10:04:26 -05:00
Matt Diephouse
1ebe7bb5ed Add a function to compute a range's length 2016-01-12 11:52:38 -05:00
Rob Rix
09459a3421 Merge branch 'master' into patch 2015-12-30 18:55:42 -05:00
Rob Rix
27a877e861 Generalize unionRanges to Foldable Functors.
We use `Foldable` and `Functor`, and not `Traversable`, because the
latter is not automatically implied by the former. I.e. we use the
minimum necessary set of constraints.
2015-12-30 13:45:04 -05:00
joshvera
c69cd164cd Merge remote-tracking branch 'origin/master' into use-text 2015-12-30 12:07:52 -05:00
Rob Rix
bb5a7f6218 Remove isEmpty. 2015-12-30 10:06:16 -05:00
Rob Rix
941d4d5ddb Add a unionRanges function to Range. 2015-12-30 10:05:31 -05:00
joshvera
a3051c531d Merge remote-tracking branch 'origin/master' into use-text 2015-12-29 15:13:57 -05:00
Rob Rix
989ef074df Add an isEmpty predicate on Range. 2015-12-28 13:03:26 -05:00
Rob Rix
7e2e40028f Add a Monoid instance for Range. 2015-12-28 12:35:43 -05:00
Rob Rix
4d368b0180 substring is a synonym for sublist. 2015-12-23 21:39:50 -05:00
Rob Rix
653acdc30f Add a sublist function. 2015-12-23 21:39:35 -05:00