-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Description
Things like this happen when compiling with aeson 2:
src/Test/WebDriver/JSON.hs:64:34: error:
• Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
with: HM.HashMap k0 v0
Expected: HM.HashMap k0 v0
Actual: Object
• In the first argument of ‘HM.null’, namely ‘o’
In the expression: HM.null o
In a stmt of a pattern guard for
an equation for ‘parseJSON’:
HM.null o
|
64 | parseJSON (Object o) | HM.null o = return NoReturn
| ^
src/Test/WebDriver/JSON.hs:79:22: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘a’
In the expression: a .= x
In the first argument of ‘object’, namely ‘[a .= x]’
|
79 | single a x = object [a .= x]
| ^
src/Test/WebDriver/JSON.hs:84:28: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘a’
In the expression: a .= x
In the first argument of ‘object’, namely ‘[a .= x, b .= y]’
|
84 | pair (a,b) (x,y) = object [a .= x, b .= y]
| ^
src/Test/WebDriver/JSON.hs:84:36: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘b’
In the expression: b .= y
In the first argument of ‘object’, namely ‘[a .= x, b .= y]’
|
84 | pair (a,b) (x,y) = object [a .= x, b .= y]
| ^
src/Test/WebDriver/JSON.hs:90:34: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘a’
In the expression: a .= x
In the first argument of ‘object’, namely
‘[a .= x, b .= y, c .= z]’
|
90 | triple (a,b,c) (x,y,z) = object [a .= x, b.= y, c .= z]
| ^
src/Test/WebDriver/JSON.hs:90:42: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘b’
In the expression: b .= y
In the first argument of ‘object’, namely
‘[a .= x, b .= y, c .= z]’
|
90 | triple (a,b,c) (x,y,z) = object [a .= x, b.= y, c .= z]
| ^
src/Test/WebDriver/JSON.hs:90:49: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the first argument of ‘(.=)’, namely ‘c’
In the expression: c .= z
In the first argument of ‘object’, namely
‘[a .= x, b .= y, c .= z]’
|
90 | triple (a,b,c) (x,y,z) = object [a .= x, b.= y, c .= z]
| ^
src/Test/WebDriver/JSON.hs:104:38: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the expression: k
In the first argument of ‘parse’, namely ‘(.: k)’
In the second argument of ‘($)’, namely ‘parse (.: k) o’
|
104 | o !: k = aesonResultToWD $ parse (.: k) o
| ^
src/Test/WebDriver/JSON.hs:109:29: error:
• Couldn't match expected type ‘Key’ with actual type ‘Text’
• In the second argument of ‘(.:?)’, namely ‘k’
In the second argument of ‘fmap’, namely ‘(o .:? k)’
In the expression: fmap join (o .:? k)
|
109 | o .:?? k = fmap join (o .:? k)
I'm not quite sure what can be done to fix it.
Metadata
Metadata
Assignees
Labels
No labels