Skip to content

Instantly share code, notes, and snippets.

@chadaustin
Created January 26, 2016 01:11
Show Gist options
  • Save chadaustin/d4af273dabeff85ec2fd to your computer and use it in GitHub Desktop.
Save chadaustin/d4af273dabeff85ec2fd to your computer and use it in GitHub Desktop.
/Users/ca/projects/datagraph/src/Main.hs:168:3:
Couldn't match type ‘HashMap k0 v0’
with ‘GenHaxl () (HashMap Text ResponseValue)’
Expected type: (AST.Selection
-> GenHaxl () (AST.Name, ResponseValue))
-> TheMonad (HashMap Text ResponseValue)
Actual type: (AST.Selection -> [b0]) -> HashMap k0 v0
The first argument of ($) takes one argument,
its type is ‘f0 b1’,
it is specialized to ‘(AST.Selection -> [b0]) -> HashMap k0 v0’
In a stmt of a 'do' block:
HashMap.fromList <$> forM selectionSet
$ \case {
AST.SelectionField (AST.Field alias
name
arguments
directives
innerSelectionSet)
-> do { let ...;
let ...;
.... }
_ -> fail "unsupported selection" }
In the expression:
do { HashMap.fromList <$> forM selectionSet
$ \case {
AST.SelectionField (AST.Field alias
name
arguments
directives
innerSelectionSet)
-> do { ... }
_ -> fail "unsupported selection" } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment