src/Pure/type_infer_context.ML
changeset 43278 1fbdcebb364b
parent 42405 13ecdb3057d8
child 45429 fd58cbf8cae3
equal deleted inserted replaced
43277:1fd31f859fc7 43278:1fbdcebb364b
   218 
   218 
   219     fun inf _ (Const (_, T)) tye_idx = (T, tye_idx)
   219     fun inf _ (Const (_, T)) tye_idx = (T, tye_idx)
   220       | inf _ (Free (_, T)) tye_idx = (T, tye_idx)
   220       | inf _ (Free (_, T)) tye_idx = (T, tye_idx)
   221       | inf _ (Var (_, T)) tye_idx = (T, tye_idx)
   221       | inf _ (Var (_, T)) tye_idx = (T, tye_idx)
   222       | inf bs (Bound i) tye_idx =
   222       | inf bs (Bound i) tye_idx =
   223           (snd (nth bs i handle Subscript => err_loose i), tye_idx)
   223           (snd (nth bs i handle General.Subscript => err_loose i), tye_idx)
   224       | inf bs (Abs (x, T, t)) tye_idx =
   224       | inf bs (Abs (x, T, t)) tye_idx =
   225           let val (U, tye_idx') = inf ((x, T) :: bs) t tye_idx
   225           let val (U, tye_idx') = inf ((x, T) :: bs) t tye_idx
   226           in (T --> U, tye_idx') end
   226           in (T --> U, tye_idx') end
   227       | inf bs (t $ u) tye_idx =
   227       | inf bs (t $ u) tye_idx =
   228           let
   228           let