#13649: RebindableSyntax causes type errors when 'fail' is not defined, even if not used. -------------------------------------+------------------------------------- Reporter: AaronFriel | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.2.1-rc1 Resolution: | Keywords: | RebindableSyntax Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"2fcb5c5c3f6c5a5936eeb5dc07b476e5737f12ad/ghc" 2fcb5c5c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2fcb5c5c3f6c5a5936eeb5dc07b476e5737f12ad" compiler: Do not look up fail in RnExpr if bind pattern is irrefutible. Adds a check in `rnStmt`, in sub-expr `getFailFunction`, to determine if the pattern of a bind statement is irrefutible. If so, skip looking up the `fail` name. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13649 Differential Revision: https://phabricator.haskell.org/D3553 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13649#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler