Ticket #187 (closed bug report: fixed)
Pattern fixities not resolved
| Reported by: | NeilMitchell2 | Owned by: | nibro |
|---|---|---|---|
| Priority: | major | Milestone: | Full document support |
| Component: | parser | Version: | 1.3.0 |
| Keywords: | Cc: |
Description
HSE doesn't resolve pattern fixities.
Prelude Language.Haskell.Exts> parseFileContents "a = case b of x:y:z -> c" Loading package haskell-src-exts-1.3.2 ... linking ... done. ParseOk? (Module (SrcLoc? {srcFilename = "<unknown>.hs", srcLine = 1, srcColumn = 1}) (ModuleName? "Main") [] Nothing (Just [EVar (UnQual? (Ident "main"))]) [] [Pat Bind (SrcLoc? {srcFilename = "<unknown>.hs", srcLine = 1, srcColumn = 1}) (PVar ( Ident "a")) Nothing (UnGuardedRhs? (Case (Var (UnQual? (Ident "b"))) [Alt (SrcLoc? {srcFilename = "<unknown>.hs", srcLine = 1, srcColumn = 15}) (PInfixApp (PInfixA pp (PVar (Ident "x")) (Special Cons) (PVar (Ident "y"))) (Special Cons) (PVar (I dent "z"))) (UnGuardedAlt? (Var (UnQual? (Ident "c")))) (BDecls [])])) (BDecls []) ])
The relevant bit is:
(PInfixApp (PInfixApp "x" (Special Cons) "y") (Special Cons) "z")
Note that it should be the x:(y:z), but HSE has given (x:y):z.
