-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:flix/vscode-flix
- Loading branch information
Showing
13 changed files
with
97 additions
and
83 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
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
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
// Blank line | ||
eff DivByZero { | ||
pub def throw(): Void | ||
} | ||
|
||
trait Dividable[t] { | ||
type Aef: Eff | ||
pub def div(x: t, y: t): t \ Dividable.Aef[t] | ||
pub def div(x: t, y: t): t | ||
} | ||
|
||
instance Dividable[Int32] { | ||
type Aef = DivByZero | ||
pub def div(x: Int32, y: Int32): Int32 \ DivByZero = | ||
if (y == 0) do DivByZero.throw() else x / y | ||
pub def div(x: Int32, y: Int32): Int32 = | ||
x / y | ||
} |
2 changes: 2 additions & 0 deletions
2
...stWorkspaces/highlight/src/Dividable.flix → ...ces/findReferences/src/Dividable.flix.old
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
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,17 @@ | ||
// TODO: Use this file instead as soon as https://github.com/flix/flix/issues/8326 is fixed. | ||
|
||
// Blank line | ||
eff DivByZero { | ||
pub def throw(): Void | ||
} | ||
|
||
trait Dividable[t] { | ||
type Aef: Eff | ||
pub def div(x: t, y: t): t \ Dividable.Aef[t] | ||
} | ||
|
||
instance Dividable[Int32] { | ||
type Aef = DivByZero | ||
pub def div(x: Int32, y: Int32): Int32 \ DivByZero = | ||
if (y == 0) do DivByZero.throw() else x / y | ||
} |
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
// Blank line | ||
eff DivByZero { | ||
pub def throw(): Void | ||
} | ||
|
||
trait Dividable[t] { | ||
type Aef: Eff | ||
pub def div(x: t, y: t): t \ Dividable.Aef[t] | ||
pub def div(x: t, y: t): t | ||
} | ||
|
||
instance Dividable[Int32] { | ||
type Aef = DivByZero | ||
pub def div(x: Int32, y: Int32): Int32 \ DivByZero = | ||
if (y == 0) do DivByZero.throw() else x / y | ||
pub def div(x: Int32, y: Int32): Int32 = | ||
x / y | ||
} |
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,17 @@ | ||
// TODO: Use this file instead as soon as https://github.com/flix/flix/issues/8326 is fixed. | ||
|
||
// Blank line | ||
eff DivByZero { | ||
pub def throw(): Void | ||
} | ||
|
||
trait Dividable[t] { | ||
type Aef: Eff | ||
pub def div(x: t, y: t): t \ Dividable.Aef[t] | ||
} | ||
|
||
instance Dividable[Int32] { | ||
type Aef = DivByZero | ||
pub def div(x: Int32, y: Int32): Int32 \ DivByZero = | ||
if (y == 0) do DivByZero.throw() else x / y | ||
} |
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