Hi

I've attached 3 separate bugs in the Hugs compiler, they are all a bit
perplexing, and all seem to ruffle similar areas. I suspect there is
an underlying memory bug, such as overwriting areas of memory or
something.

* Silly fails to derive something that should be obvious, as sent in a
previous mail to hugs-users@

* Nonterm generates:

hugs Nonterm.hs -98

ERROR "Nonterm.hs":56 - Unresolved top-level overloading
*** Binding             : test
*** Outstanding context : (Play b, Typeable b, Play ((bad type) ((bad type) ((ba
d type) ((bad type) (bad type)))) ((bad type) ((bad type) ((bad type) ((bad type
) ((bad type) ((bad type) ((bad type) (bad type)))) ((bad type) ((bad type) ((ba

Running with WinHugs causes an immediate shutdown.


* Segfault generates:

hugs Segfault.hs -98

Unexpected signal

With WinHugs I get an immediate shutdown.

Thanks

Neil
test :: T1 -> T1
test = test2

test2 :: C3 (T2 a) a => a -> a
test2 = undefined

data T1 = C1 deriving Show
data T2 a = T2 a deriving Show

class C1 a where
class C2 a where
class C3 a b where

instance C1 T1 where
instance C1 a => C1 (T2 a) where
instance (C1 a, C2 a) => C3 T1 a where
instance (C3 a (T2 a)) => C2 (T2 a) where
instance (C2 (T2 a)) => C3 (T2 a) b where
import Data.Typeable

import Data.Maybe



class Play on where




-- | Children are defined as the top-most items of type to
--   /starting at the root/.
class (Typeable from, Play to) => PlayEx from to where


-- | Children are defined as the top-most items of type to
--   /starting beneath the root/.
class (Typeable from, Typeable to, Play to) => PlayAll from to where


instance PlayAll a b => PlayEx a b where




-- * The Operations


everythingEx :: PlayEx from to => from -> [to]
everythingEx = undefined



data Expr  =  Val  Int         -- a literal value

           deriving (Eq, Show)


typename_Expr = mkTyCon "Expr"
instance Typeable Expr where




instance Play Expr where

instance (Typeable a, Play a) => PlayAll Expr a where
    
data Foo a = Foo a


instance Typeable1 Foo where
instance Typeable a => Typeable (Foo a) where 

test = everythingEx (Foo (Val 1))


instance (PlayAll a (Foo a)) => Play (Foo a) where


instance (Typeable b, Play (Foo a), PlayAll a b) => PlayAll (Foo a) b where

import Data.Typeable

import Data.Maybe



class Play on where




-- | Children are defined as the top-most items of type to
--   /starting at the root/.
class (Typeable from, Typeable to, Play to) => PlayEx from to where


-- | Children are defined as the top-most items of type to
--   /starting beneath the root/.
class (Typeable from, Typeable to, Play to) => PlayAll from to where


instance PlayAll a b => PlayEx a b where




-- * The Operations


everythingEx :: PlayEx from to => from -> [to]
everythingEx = undefined



data Expr  =  Val  Int         -- a literal value

           deriving (Eq, Show)


typename_Expr = mkTyCon "Expr"
instance Typeable Expr where




instance Play Expr where

instance (Typeable a, Play a) => PlayAll Expr a where
    
data Foo a = Foo a


instance Typeable1 Foo where
instance Typeable a => Typeable (Foo a) where 

test = everythingEx (Foo (Val 1))


instance (PlayAll a (Foo a)) => Play (Foo a) where


instance (Typeable b, Play (Foo a), PlayAll a b) => PlayAll (Foo a) b where

_______________________________________________
Hugs-Bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to