-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…nctions
- Loading branch information
1 parent
3037b1a
commit ffc9fc4
Showing
7 changed files
with
56 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
open import Agda.Builtin.Bool | ||
|
||
record RecordTest : Set where | ||
constructor MkRecord | ||
field | ||
aBool : Bool | ||
|
||
aBoolAsAFunction : Bool | ||
aBoolAsAFunction = aBool | ||
open RecordTest public | ||
{-# COMPILE AGDA2HS RecordTest newtype #-} | ||
{-# COMPILE AGDA2HS aBoolAsAFunction #-} | ||
|
||
test : Bool | ||
test = aBoolAsAFunction (MkRecord true) | ||
{-# COMPILE AGDA2HS test #-} |
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 |
---|---|---|
|
@@ -57,4 +57,5 @@ import IOFile | |
import IOInput | ||
import Issue200 | ||
import Issue169 | ||
import Issue185 | ||
|
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,10 @@ | ||
module Issue185 where | ||
|
||
newtype RecordTest = MkRecord{aBool :: Bool} | ||
|
||
aBoolAsAFunction :: RecordTest -> Bool | ||
aBoolAsAFunction r = aBool r | ||
|
||
test :: Bool | ||
test = aBoolAsAFunction (MkRecord True) | ||
|