License | BSD3 |
---|---|
Maintainer | The Idris Community. |
Safe Haskell | None |
Language | Haskell2010 |
Given a pattern clause and a variable n
, elaborate the clause and find the
type of n
.
Make new pattern clauses by replacing n
with all the possibly constructors
applied to '_', and replacing all other variables with '_' in order to
resolve other dependencies.
Finally, merge the generated patterns with the original, by matching. Always take the "more specific" argument when there is a discrepancy, i.e. names over '_', patterns over names, etc.