diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /docs/examples/typeinf.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'docs/examples/typeinf.scala')
-rw-r--r-- | docs/examples/typeinf.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/typeinf.scala b/docs/examples/typeinf.scala index 80980ebc9a..d4bc8bf3e1 100644 --- a/docs/examples/typeinf.scala +++ b/docs/examples/typeinf.scala @@ -69,14 +69,14 @@ object typeInfer { case Tycon(k, ts) => (List[Tyvar]() /: ts) ((tvs, t) => tvs union tyvars(t)) } - def tyvars(ts: TypeScheme): List[Tyvar] = + def tyvars(ts: TypeScheme): List[Tyvar] = tyvars(ts.tpe) diff ts.tyvars; def tyvars(env: Env): List[Tyvar] = (List[Tyvar]() /: env) ((tvs, nt) => tvs union tyvars(nt._2)) def mgu(t: Type, u: Type, s: Subst): Subst = Pair(s(t), s(u)) match { - case Pair(Tyvar(a), Tyvar(b)) if (a == b) => + case Pair(Tyvar(a), Tyvar(b)) if (a == b) => s case Pair(Tyvar(a), _) if !(tyvars(u) contains a) => s.extend(Tyvar(a), u) @@ -181,7 +181,7 @@ object typeInfer { yield Lam(x, t): Term ) ||| ( for ( - letid <- id if letid == "let"; + letid <- id if letid == "let"; x <- ident; _ <- wschr('='); t <- term; |