definition: |
matchSort :: Sort -> Sort -> Maybe TPSubst matchSort s1@(SComb sn1 ss1) s2@(SComb sn2 ss2) | isAnonymousType s2 = Just emptyTPSubst | isTypeParameter s1 = Just $ if s1 == s2 then emptyTPSubst else FM.insert (head (typeParamsOfSort s1)) s2 emptyTPSubst | otherwise = if sn1 == sn2 then matchSorts ss1 ss2 else Nothing |
demand: |
arguments 1 2 |
deterministic: |
deterministic operation |
documentation: |
------------------------------------------------------------------------- Compute sort matching, i.e., if `matchSort t1 t2 = s`, then `t2 = s(t1)`. |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{({SComb},{SComb}) |-> _} |
name: |
matchSort |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
Sort -> Sort -> Prelude.Maybe (Data.Map.Map String Sort) |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |