X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsPat.lhs;h=aa1568d27fe1066cb8dd5ffe1699b471e779cbd4;hb=8053aac536c96dabdc06e9f068852f5481474a29;hp=ee21ee3bfa7698e1112998cd47ef8e39721a2c28;hpb=58d200ac9cb51faa5c94e7919217f170b35b8441;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsPat.lhs b/compiler/hsSyn/HsPat.lhs index ee21ee3..aa1568d 100644 --- a/compiler/hsSyn/HsPat.lhs +++ b/compiler/hsSyn/HsPat.lhs @@ -122,14 +122,16 @@ data Pat id ------------ Dictionary patterns (translation only) --------------- | DictPat -- Used when destructing Dictionaries with an explicit case - [id] -- superclass dicts - [id] -- methods + [id] -- Superclass dicts + [id] -- Methods ------------ Pattern coercions (translation only) --------------- | CoPat ExprCoFn -- If co::t1 -> t2, p::t2, -- then (CoPat co p) :: t1 - (Pat id) -- No nested location reqd - Type + (Pat id) -- Why not LPat? Ans: existing locn will do + Type + -- During desugaring a (CoPat co pat) turns into a cast with 'co' on + -- the scrutinee, followed by a match on 'pat' \end{code} HsConDetails is use both for patterns and for data type declarations