- User Since
- Jun 3 2018, 3:24 PM (16 w, 1 d)
- Rebase new master
It should be fine now. Thank you for all your help @sgraf !
- Add warning to standard warnings
Sat, Sep 22
- review changes
Fri, Sep 21
- Add stderr
- PR changes
Thu, Sep 20
- Add one more user doc line
- Add a warning
- Move checkIfBang function
- Separate test cases
- Add a function to match a bang
Wed, Sep 19
- Add another warning message
Tue, Sep 18
@sgraf I just realized we never check if we actually deal with ! just if infix expression is followed immediately by var. I think it makes sense to add that and also warn about defining infix expression without proper spacing. What is your take ?
Also in your example I don't understand how would this compile without errors:
f4 :: [a] -> Int -> a f4 ! x = f4 !! x
Aren't you writing a type signature for f4 and then defining infix operator ! so f4 lacks its implementation ?
- Add new warning message
- Remove passing test record
- Add one more test case
- Check for space and move tests
¯\_(ツ)_/¯ maybe I should move it even further into the parser and find a place where we still have whitespace knowledge
- Move check to infixexp_top
Fri, Sep 14
@sgraf I am kinda lost here and I am not sure if I need to try to add this check somewhere else. @bgamari mentioned that I need to find a place where we still have whitespace knowledge in order to check if ! comes right before param.
I printed out the types and values of things in scope just because it may help out but as I see there is already space around ! from where I am printing this.
testsuite/tests/printer/T13600.hs line looks like this: f4 !x = return (sum x) these are the printed things in scope from https://github.com/ghc/ghc/blob/master/compiler/parser/Parser.y#L2313
Mon, Sep 10
Thanks for your help @sgraf ! I will play around with those functions you added in the last edit and hopefully manage to add that check.
Fri, Sep 7
Yes, either suggesting enabling BangPatterns or adding space behind !.
I am not sure that this is the right place to hint BangPatterns but the test I added goes trough this part of the parser https://github.com/v0d1ch/ghc/blob/master/compiler/parser/Parser.y#L2312
Thu, Sep 6
Return all to previous state
Aug 24 2018
Aug 10 2018
Aug 9 2018
This now yields:
- Check if RdrName matches a bang
Aug 8 2018
- Detect ! and warn if no bangpatterns
Aug 6 2018
Oh I see now what is the summary, just the top title in bold that you can't miss 😄
@bgamari Is there a way to mark the diff as WIP so nobody wastes precious time reviewing ?
Aug 4 2018
Aug 3 2018
- Very bad solution
Jul 29 2018
- Remove previous attempt
Jul 18 2018
Jul 17 2018
Jul 11 2018
- Revert changes and start from scratch
Jul 10 2018
arc diff <other usual stuff> -update D4943
Fix number of lines warn in TcErrors.hs