valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 115 forks source link

hastec: panic! (the 'impossible' happened) #381

Open roper79 opened 8 years ago

roper79 commented 8 years ago
hastec: hastec: panic! (the 'impossible' happened) (GHC version 7.10.3 for x86_64-unknown-linux): ModOrigin: hidden module redefined
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

code:

ModuleX.hs:
{-# LANGUAGE OverloadedStrings #-}

module ModuleX where

import Haste.Foreign
import Haste.DOM (Elem)

jsOp :: IO Elem
jsOp = ffi "..."

Main.hs:
import ModuleX

main :: IO ()
main = do
  x <- jsOp 
  let y = zip x x -- also other operations violating the type [a] ~ Elem
  return ()

files.tar.gz

valderman commented 8 years ago

I'm unable to reproduce this on my end, I get a type error as expected. Which version of Haste are you using, and did you install from Hackage or using the binaries from haste-lang.org? Is the issue still present in the latest git head?

roper79 commented 8 years ago

It is the binary 0.5.4.2 from haste-lang.org, which I took because of #380.