Skip to content

Commit 0c86e7f

Browse files
committed
Add tests for new type & class ref syntax
1 parent 5aa3b60 commit 0c86e7f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module Lib (class X, go) where
2+
3+
class X a where
4+
go :: a -> a
5+
6+
module Main where
7+
8+
import Lib (class X, go)
9+
10+
go' :: forall a. (X a) => a -> a
11+
go' = go
12+
13+
main = Control.Monad.Eff.Console.log "Done"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module Lib (X, Y) where
2+
3+
data X = X
4+
type Y = X
5+
6+
module Main where
7+
8+
import Lib (X, Y)
9+
10+
idX :: X -> X
11+
idX x = x
12+
13+
idY :: Y -> Y
14+
idY y = y
15+
16+
main = Control.Monad.Eff.Console.log "Done"

0 commit comments

Comments
 (0)