-
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.
[ #308 ] Already fixed by new canonicity check, adding test case
- Loading branch information
1 parent
770f209
commit a5552b6
Showing
4 changed files
with
36 additions
and
0 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,22 @@ | ||
open import Haskell.Prelude | ||
|
||
record Class (a : Set) : Set where | ||
field | ||
foo : a → a | ||
open Class {{...}} public | ||
{-# COMPILE AGDA2HS Class class #-} | ||
|
||
module M1 (@0 X : Set) where | ||
|
||
instance | ||
ClassInt : Class Int | ||
ClassInt .foo = _+ 1 | ||
{-# COMPILE AGDA2HS ClassInt #-} | ||
|
||
module M2 (@0 X : Set) where | ||
|
||
open M1 X | ||
|
||
tester : Int | ||
tester = foo 41 | ||
{-# COMPILE AGDA2HS tester #-} |
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 |
---|---|---|
|
@@ -86,4 +86,5 @@ import ErasedPatternLambda | |
import CustomTuples | ||
import ProjectionLike | ||
import FunCon | ||
import Issue308 | ||
|
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,11 @@ | ||
module Issue308 where | ||
|
||
class Class a where | ||
foo :: a -> a | ||
|
||
instance Class Int where | ||
foo = (+ 1) | ||
|
||
tester :: Int | ||
tester = foo 41 | ||
|