#5642: Deriving Generic of a big type takes a long time and lots of space
---------------------------------+------------------------------------------
    Reporter:  basvandijk        |       Owner:                              
        Type:  bug               |      Status:  new                         
    Priority:  normal            |   Component:  Compiler                    
     Version:  7.2.1             |    Keywords:                              
    Testcase:                    |   Blockedby:                              
          Os:  Unknown/Multiple  |    Blocking:                              
Architecture:  Unknown/Multiple  |     Failure:  Compile-time performance bug
---------------------------------+------------------------------------------

Comment(by clintm):

 Came to report this sort of thing too.  I can't actually get this code to
 completely run as my machine runs out of memory (12g) almost immediately.

 {{{
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE UndecidableInstances #-}

 module Main where

 import GHC.Generics

 data User = User { name :: String
                  , password :: String }
             deriving Generic

 instance (Show User) => Show (User)

 main :: IO ()
 main = do
   let a = User "gurn" "secret"
   putStrLn $ show a
   return ()
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5642#comment:2>
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