Skip to content

Instantly share code, notes, and snippets.

@co-dan
Created August 27, 2013 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save co-dan/6356964 to your computer and use it in GitHub Desktop.
Save co-dan/6356964 to your computer and use it in GitHub Desktop.
> modifyMatch :: LMatch RdrName (LHsExpr RdrName)
> -> LMatch RdrName (LHsExpr RdrName)
> modifyMatch (L l1 (Match lpat lty rs@(GRHSs{..}))) =
> let f (L l1 (GRHS guards body)) =
> L l1 (GRHS guards (modifyExpr body))
> in L l1 (Match lpat lty (rs
> { grhssGRHSs = map f grhssGRHSs }))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment