#1724: Type family and GADT error
--------------------------------------+-------------------------------------
  Reporter:  Chris Kuklewicz          |          Owner:         
      Type:  bug                      |         Status:  new    
  Priority:  high                     |      Milestone:         
 Component:  Compiler (Type checker)  |        Version:  6.9    
  Severity:  major                    |       Keywords:         
Difficulty:  Unknown                  |             Os:  Unknown
  Testcase:                           |   Architecture:  Unknown
--------------------------------------+-------------------------------------
This bug was posted to [EMAIL PROTECTED] by Roberto
 Zunino, archived at http://www.haskell.org/pipermail/glasgow-haskell-users
 /2007-September/013149.html
 I am copying the post with the bug into trac:

 Here's unsafeCoerce:

 > type family Const a
 > type instance Const a = ()
 >
 > data T a where T :: a -> T (Const a)
 >
 > coerce :: forall a b . a -> b
 > coerce x = case T x :: T (Const b) of
 >            T y -> y

 And this indeed "works"... Here's the result with the latest RC:

 *TypeFam> coerce () 2
 <interactive>: internal error: stg_ap_v_ret
     (GHC version 6.9.20070918 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 Aborted

 Regards,
 Zun.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1724>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to