|
[GHC] #663: Confusion about types: msg#00134lang.haskell.glasgow.bugs
#663: Confusion about types ----------------------------------------+----------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 6.4.1 Severity: normal | Keywords: Os: Unknown | Difficulty: Unknown Architecture: Unknown | ----------------------------------------+----------------------------------- In GHC 6.0.1 the following data type definition (for a binary search tree) seems to be invalid. I know I've used this kind of thing before, so whats up. This is the entire file, by the way: data BST a = Ord a => Leaf | Node a (BST a) (BST a) Gives an error message : All of the type variables in the constraint `Ord a' are already in scope (at least one must be universally quantified here) When checking the existential context of constructor `Leaf' In the data type declaration for `BST' I'm confused - where would I put a universal quantification? Does Leaf now need a type declaration and if so what would it be? -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/663> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #632: Make a 'fast' subset of the testsuite, GHC |
|---|---|
| Next by Date: | Re: [GHC] #663: Confusion about types, GHC |
| Previous by Thread: | Re: [GHC] #632: Make a 'fast' subset of the testsuite, GHC |
| Next by Thread: | Re: [GHC] #663: Confusion about types, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |