-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polymorphic kind inference off, turn on (off) with LANGUAGE pragma (N…
…o)PolyKinds
- Loading branch information
1 parent
b733f30
commit 3f09d19
Showing
10 changed files
with
153 additions
and
39 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
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,18 @@ | ||
{- ---------------------------------------------------------------------------------------- | ||
what : poly kind inference | ||
expected: ok | ||
---------------------------------------------------------------------------------------- -} | ||
|
||
{-# LANGUAGE PolyKinds #-} | ||
|
||
module PolyKinds1 where | ||
|
||
data Proxy t = Proxy | ||
|
||
class Foo t where | ||
bar :: Proxy t -> Int | ||
|
||
instance Foo Int where bar _ = 0 | ||
instance Foo [] where bar _ = 0 | ||
|
||
main = return () |
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,18 @@ | ||
{- ---------------------------------------------------------------------------------------- | ||
what : poly kind inference | ||
expected: not ok, because of NoPolyKinds | ||
---------------------------------------------------------------------------------------- -} | ||
|
||
{-# LANGUAGE NoPolyKinds #-} | ||
|
||
module PolyKinds2 where | ||
|
||
data Proxy t = Proxy | ||
|
||
class Foo t where | ||
bar :: Proxy t -> Int | ||
|
||
instance Foo Int where bar _ = 0 | ||
instance Foo [] where bar _ = 0 | ||
|
||
main = return () |
Oops, something went wrong.