-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3401 from buzden/fixity-in-do
[ fix ] Fix ability to declare fixities in `do`
- Loading branch information
Showing
4 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
f : Nat | ||
f = | ||
let (%^%) : Nat -> Nat -> Nat | ||
(%^%) = (+) | ||
private infixl 1 %^% | ||
in 1 %^% 2 | ||
|
||
g : Nat | ||
g = do | ||
let (%^%%) : Nat -> Nat -> Nat | ||
(%^%%) = (+) | ||
private infixl 1 %^%% | ||
1 %^%% 2 | ||
|
||
crazy1 : Nat | ||
crazy1 = do | ||
let (%^%%%) : Nat -> Nat -> Nat | ||
(%^%%%) = (+) | ||
rewrite let private infixl 1 %^%%% in the (Nat = Nat) Refl | ||
1 %^%%% 2 | ||
|
||
crazy2 : List Nat | ||
crazy2 = do | ||
let (%^%%%%) : Nat -> Nat -> Nat | ||
(%^%%%%) = (+) | ||
x : (let private infixl 1 %^%%%% in Nat) <- [1] | ||
pure $ x %^%%%% 2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1/1: Building Y (Y.idr) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
. ../../../testutils.sh | ||
|
||
check Y.idr |