File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ isClassName q = getConstInfo' q >>= \case
173
173
ClassPragma _ -> True
174
174
ExistingClassPragma -> True
175
175
_ -> False
176
+ Right Defn {defName = r, theDef = Axiom {}} -> processPragma r <&> (ExistingClassPragma == )
176
177
_ -> return False
177
178
178
179
-- | Check if the given type corresponds to a class constraint in Haskell.
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ import CustomTuples
92
92
import ProjectionLike
93
93
import FunCon
94
94
import Issue308
95
+ import Issue373
95
96
96
97
{-# FOREIGN AGDA2HS
97
98
import Issue14
@@ -181,4 +182,5 @@ import CustomTuples
181
182
import ProjectionLike
182
183
import FunCon
183
184
import Issue308
185
+ import Issue373
184
186
#-}
Original file line number Diff line number Diff line change
1
+ module Issue373 where
2
+
3
+ open import Haskell.Prelude
4
+
5
+ {-# FOREIGN AGDA2HS
6
+
7
+ class MyShow a where
8
+ myshow :: a -> String
9
+
10
+ #-}
11
+
12
+ postulate
13
+ MyShow : Set → Set
14
+ myshow : {{ MyShow a }} → a → String
15
+
16
+ {-# COMPILE AGDA2HS MyShow existing-class #-}
17
+
18
+ anothershow : {{ MyShow a }} → a → String
19
+ anothershow = myshow
20
+
21
+ {-# COMPILE AGDA2HS anothershow #-}
Original file line number Diff line number Diff line change
1
+ module Issue373 where
2
+
3
+ class MyShow a where
4
+ myshow :: a -> String
5
+
6
+ anothershow :: MyShow a => a -> String
7
+ anothershow = myshow
8
+
You can’t perform that action at this time.
0 commit comments