-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #692 The standard permits a user to access a constructor from a type stored inside a record, but the Haskell implementation had a mistake which prevented this. Specifically, the Haskell implementation was not normalizing the union type as the standard specified before attempting to access the constructor, leading to an unexpected type error.
- Loading branch information
1 parent
8bc595b
commit bacb824
Showing
4 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Verify that users can use `.` to both access a record field and a union | ||
-- constructor within the same expression. This is a common idiom if a user | ||
-- provides a types package. | ||
|
||
let Scope = < Public : {} | Private : {} > | ||
let types = { Scope = Scope } | ||
in types.Scope.Public {=} |
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 @@ | ||
< Private : {} | Public : {} > |