[GHC] #8150: Foreign export requires redundant type signature

#8150: Foreign export requires redundant type signature -------------------------+------------------------------------------------- Reporter: | Owner: evincarofautumn | Status: new Type: bug | Milestone: Priority: | Version: 7.6.3 normal | Operating System: Unknown/Multiple Component: | Type of failure: Incorrect warning at Compiler | compile-time Keywords: | Test Case: Architecture: | Blocking: Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- With a source file such as: {{{ module FFITest where foreign export ccall "function" function :: IO () function :: IO () function = putStrLn "Hello, world!" }}} The second `function :: IO ()` signature is required to satisfy `-fwarn- missing-signatures`, even though a signature is already present in the `foreign export` declaration, and the types are required to be the same. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8150 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8150: Foreign export requires redundant type signature -------------------------------------+------------------------------------- Reporter: evincarofautumn | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * type: bug => feature request -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8150#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8150: Foreign export requires redundant type signature -------------------------------------+------------------------------------- Reporter: evincarofautumn | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): The types aren't actually required to be the ''same'', though, as this is accepted too (even with `-Wall`): {{{ module FFITest where foreign export ccall "function" function :: IO () function :: IO a function = undefined }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8150#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC