Support an integer type annotation argument#267
Merged
Conversation
dahlia
requested changes
May 11, 2018
| v <- many digitChar | ||
| case readMaybe v of | ||
| Just i -> return $ AInt i | ||
| Nothing -> fail "digit expected" |
Member
There was a problem hiding this comment.
We could define a more general parser to take one or more digits and returns Integer, i.e., integer :: Parser Integer, and then make this annotationArgumentValue to utilize that.
|
|
||
| type AnnotationArgumentSet = M.Map Identifier T.Text | ||
| data AnnotationArgument = AText T.Text | ||
| | AInt Int |
Member
dahlia
previously approved these changes
May 12, 2018
e01f299 to
54224af
Compare
Checklist 🤔
|
dahlia
reviewed
May 12, 2018
| import iso (country as iso-country); | ||
| import types (country); | ||
| ~~~~~~~~ | ||
| - Support an integer type annotation argument. [[#178], [#267]] |
cdac2fa to
7941023
Compare
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
- Coverage 76.14% 76.08% -0.06%
==========================================
Files 33 33
Lines 2452 2467 +15
Branches 131 132 +1
==========================================
+ Hits 1867 1877 +10
- Misses 454 458 +4
- Partials 131 132 +1
Continue to review full report at Codecov.
|
7941023 to
e1498ef
Compare
dahlia
approved these changes
May 12, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support an integer type annotation argument which is one of the features that listed on #178. Since this is the blocker issue of #206, we can add constraints for integer types(
int32,int64,bigint) after merging this PR.However, I should create
fixture.datetime.datetime-service, because all types except for a method ofservicecouldn't compile the annotation. We have to compile the annotation of the unboxed type first to do #206.Review, please :) @dahlia @Kroisse @AiOO.