Skip to content

Instantly share code, notes, and snippets.

@hasufell
Created October 23, 2021 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasufell/95ddd1ca14760e6d3a68e1bc5fd2d7cd to your computer and use it in GitHub Desktop.
Save hasufell/95ddd1ca14760e6d3a68e1bc5fd2d7cd to your computer and use it in GitHub Desktop.
bench/GHCupTypes.hs:176:1: error:
• Couldn't match type ‘Relative’ with ‘Absolute’
Expected type: Text.ParserCombinators.ReadPrec.ReadPrec
(URIRef Absolute)
Actual type: Text.ParserCombinators.ReadPrec.ReadPrec
(URIRef Relative)
• In the second argument of ‘(Text.ParserCombinators.ReadPrec.+++)’, namely
‘Text.ParserCombinators.ReadPrec.prec
11
(do GHC.Read.expectP (Text.Read.Lex.Ident "RelativeRef")
GHC.Read.expectP (Text.Read.Lex.Punc "{")
a1 <- GHC.Read.readField
"rrAuthority"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
GHC.Read.expectP (Text.Read.Lex.Punc ",")
a2 <- GHC.Read.readField
"rrPath" (Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
....)’
In the first argument of ‘GHC.Read.parens’, namely
‘(Text.ParserCombinators.ReadPrec.prec
11
(do GHC.Read.expectP (Text.Read.Lex.Ident "URI")
GHC.Read.expectP (Text.Read.Lex.Punc "{")
a1 <- GHC.Read.readField
"uriScheme"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
GHC.Read.expectP (Text.Read.Lex.Punc ",")
a2 <- GHC.Read.readField
"uriAuthority"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
....)
Text.ParserCombinators.ReadPrec.+++
Text.ParserCombinators.ReadPrec.prec
11
(do GHC.Read.expectP (Text.Read.Lex.Ident "RelativeRef")
GHC.Read.expectP (Text.Read.Lex.Punc "{")
a1 <- GHC.Read.readField
"rrAuthority"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
GHC.Read.expectP (Text.Read.Lex.Punc ",")
a2 <- GHC.Read.readField
"rrPath" (Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
....))’
In the expression:
GHC.Read.parens
(Text.ParserCombinators.ReadPrec.prec
11
(do GHC.Read.expectP (Text.Read.Lex.Ident "URI")
GHC.Read.expectP (Text.Read.Lex.Punc "{")
a1 <- GHC.Read.readField
"uriScheme"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
GHC.Read.expectP (Text.Read.Lex.Punc ",")
a2 <- GHC.Read.readField
"uriAuthority"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
....)
Text.ParserCombinators.ReadPrec.+++
Text.ParserCombinators.ReadPrec.prec
11
(do GHC.Read.expectP (Text.Read.Lex.Ident "RelativeRef")
GHC.Read.expectP (Text.Read.Lex.Punc "{")
a1 <- GHC.Read.readField
"rrAuthority"
(Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
GHC.Read.expectP (Text.Read.Lex.Punc ",")
a2 <- GHC.Read.readField
"rrPath" (Text.ParserCombinators.ReadPrec.reset GHC.Read.readPrec)
....))
When typechecking the code for ‘GHC.Read.readPrec’
in a derived instance for ‘Read (URIRef a)’:
To see the code I am typechecking, use -ddump-deriv
|
176 | deriving instance Read (URIRef a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment