dsCImport (CLabel): drop foralls when checking for FunPtr
authorSimon Marlow <marlowsd@gmail.com>
Wed, 4 Jan 2012 13:29:14 +0000 (13:29 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 4 Jan 2012 14:28:56 +0000 (14:28 +0000)
commit0545b5500c19b7266046447c1352e936a9ee7c99
treecde6a265c3fe3e25cbf55b016d5ae01b1134a60f
parent71963675263e5e66fe80c2fba4fa2bbe6c0bed73
dsCImport (CLabel): drop foralls when checking for FunPtr

We were mislabelling some foreign imports as IsData rather than
IsFunction, because the type was forall a. FunPtr (... a ...).

Eventually this gave rise to these obscure error when compiling
unregisterised:

libraries/base/Foreign/Marshal/Alloc.hc:473:0:
     warning: built-in function ‘free’ declared as non-function

libraries/base/Foreign/Marshal/Alloc.hc:1004:0:
     error: ‘free’ redeclared as different kind of symbol
compiler/deSugar/DsForeign.lhs