id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
48,record patterns fail on newtypes,ross,nobody,"Given the declaration
{{{
newtype T = C { f :: String }
}}}
Hugs exhibits the following misbehaviour:
{{{
Newtype> case C ""abc"" of C { f = v } -> v
""bc""
Newtype> case undefined of C {} -> True

Program error: Prelude.undefined
}}}
The non-record versions are fine:
{{{
Newtype> case C ""abc"" of C v -> v
""abc""
Newtype> case undefined of C _ -> True
True
}}}
The internal representation of `newtype`s elides the data constructor, but the record pattern-matching code treats them like `data` types (see also #46).",defect,new,major,,hugs,200609,,,
