Created
November 7, 2018 14:51
-
-
Save RyanGlScott/749ec7a8686ea6db352f7e097588106c to your computer and use it in GitHub Desktop.
Why doesn't this typecheck?
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
module Foo | |
%default total | |
interface C a where | |
T' : Type | |
T : (a : Type) -> C a => Type | |
T a = T' {a} | |
interface (C a, Show (T a)) => D a where | |
p : (x : T a) -> (show x = show x) | |
{- | |
Type checking ./Foo.idr | |
Foo.idr:10:11-34: | |
| | |
10 | interface (C a, Show (T a)) => D a where | |
| ~~~~~~~~~~~~~~~~~~~~~~~~ | |
When checking type of Foo.p: | |
When checking argument x to type constructor =: | |
Can't find implementation for Show (T a) | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment