[GHC] #9877: ForeignImport coercion evaluated before typechecking

GHC ghc-devs at haskell.org
Wed Dec 10 22:48:25 UTC 2014


#9877: ForeignImport coercion evaluated before typechecking
-------------------------------------+-------------------------------------
              Reporter:  varosi      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:  Windows     |     Architecture:  x86_64 (amd64)
       Type of failure:  Compile-    |       Difficulty:  Unknown
  time crash                         |       Blocked By:
             Test Case:              |  Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Description changed by varosi:

Old description:

> Under Windows 8.1 x64 with Haskell Platform 2014.02 and EclipseFP I got:
> buildwrapper.exe: panic! (the 'impossible' happened)
>   (GHC version 7.8.3 for x86_64-unknown-mingw32):
> ForeignImport coercion evaluated before typechecking
> on the first line of file that has:
> {{{
> #!div style="font-size: 80%"
> Code highlighting:
>   {{{#!haskell
> {-# LANGUAGE ForeignFunctionInterface, RankNTypes, OverloadedStrings,
> ScopedTypeVariables #-}
> module Persist( persistWrite, persistRead ) where
>
> import System.Win32.Types
> import Graphics.Win32.GDI.Types
> import Foreign.C.String
> import Foreign.Marshal.Array
> import Control.Exception
>
> foreign import ccall unsafe "SHGetFolderPathW"
>     cSHGetFolderPathW :: HWND -> INT -> HANDLE -> DWORD -> CWString -> IO
> LONG
>   }}}
> }}}

New description:

 Under Windows 8.1 x64 with Haskell Platform 2014.02 and EclipseFP I got:
 {{{
 buildwrapper.exe: panic! (the 'impossible' happened)
   (GHC version 7.8.3 for x86_64-unknown-mingw32):
 ForeignImport coercion evaluated before typechecking
 }}}
 on the first line of file that has:
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!haskell
 {-# LANGUAGE ForeignFunctionInterface, RankNTypes, OverloadedStrings,
 ScopedTypeVariables #-}
 module Persist( persistWrite, persistRead ) where

 import System.Win32.Types
 import Graphics.Win32.GDI.Types
 import Foreign.C.String
 import Foreign.Marshal.Array
 import Control.Exception

 foreign import ccall unsafe "SHGetFolderPathW"
     cSHGetFolderPathW :: HWND -> INT -> HANDLE -> DWORD -> CWString -> IO
 LONG
   }}}
 }}}

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9877#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list