Ticket #78 (closed defect: fixed)
Renamer problems in data type defs
| Reported by: | benl | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.1.3 |
| Component: | Source Parser | Version: | 0.1.2 |
| Keywords: | Cc: |
Description
Added by Jared
The following fails to compile.
data Foo = Foo data Bar = Foo
The same failure can also be triggered by redefining a constructor in the same type:
data Baz = Baz | Baz
Note that the following, which probably shouldn't compile, does:
data Foo = Foo data Foo = Bar
The error message for the failures is
FREAKOUT in Desugar.Slurp.Util
bindVtoT: var 'Test.Foo' is already bound
trying to bind Var {name = "Foo", nameModule = ModuleAbsolute
["Test"], nameSpace = NameValue,bind = XBind "vR" 368, info = [ISourcePos
(SourcePos ("./Test.ds",3,12)),IBoundBy (Var {name = "Foo", nameModule =
ModuleAbsolute ["Test"], nameSpace = NameValue, bind = XBind "vR" 368, info
= [ISourcePos (SourcePos ("./Test.ds",2,12))]})]}
conflicts with Var {name = "Foo", nameModule = ModuleNil,
nameSpace = NameType, bind = XBind "tTC" 593, info = [IValueVar (Var {name
= "Foo", nameModule = ModuleAbsolute ["Test"], nameSpace = NameValue, bind
= XBind "vR" 368, info = [ISourcePos (SourcePos
("./Test.ds",2,12)),IBoundBy (Var {name = "Foo", nameModule =
ModuleAbsolute ["Test"], nameSpace = NameValue, bind = XBind "vR" 368, info
= [ISourcePos (SourcePos ("./Test.ds",2,12))]})]})]}
Please report this bug to the maintainers at:
[URL and email address snipped]
ddc: Pattern match failure in do expression at
src/Desugar/Slurp/Slurp.hs:267:1-20
Change History
Note: See
TracTickets for help on using
tickets.
