Skip to content

Instantly share code, notes, and snippets.

@robbat2
Created August 14, 2021 23:18
Show Gist options
  • Save robbat2/a33182bf5f2587d1fe3ccd1caf30689d to your computer and use it in GitHub Desktop.
Save robbat2/a33182bf5f2587d1fe3ccd1caf30689d to your computer and use it in GitHub Desktop.
ganeti 3.0.1 compile failure
https://github.com/ganeti/ganeti/blob/master/src/Ganeti/THH/Types.hs#L118
-- | Generic 'curry' that constructs a curring function of a given arity.
curryN :: Int -> Q Exp
curryN 0 = [| ($ ()) |]
curryN 1 = [| (. OneTuple) |]
curryN n = do
f <- newName "f"
ps <- replicateM n (newName "x")
return $ LamE (VarP f : map VarP ps)
(AppE (VarE f) (TupE $ map VarE ps))
src/Ganeti/THH/Types.hs:126:37: error:
• Couldn't match type ‘Exp’ with ‘Maybe Exp’
Expected type: [Maybe Exp]
Actual type: [Exp]
• In the second argument of ‘($)’, namely ‘map VarE ps’
In the second argument of ‘AppE’, namely ‘(TupE $ map VarE ps)’
In the second argument of ‘LamE’, namely
‘(AppE (VarE f) (TupE $ map VarE ps))’
|
126 | (AppE (VarE f) (TupE $ map VarE ps))
| ^^^^^^^^^^^
make: *** [Makefile:4359: src/Ganeti/THH/Types.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment