typecheck :: Checkable a => a -> Either (Seq Err) Type
typecheck c =
    let (t, state) = runCheckM (check c)
        errs = state ^. checkStateErrs
    in
      if Seq.null errs
        then Right t
        else Left errs
typecheck :: Checkable a => a -> Either (Seq Err) Type
typecheck c =
    let (t, state) = runCheckM (check c)
        errs = state ^. checkStateErrs
    in
      if Seq.null errs
        then Right t
        else Left errs
typecheck c =
    let (t, state) = runCheckM (check c)
        errs = state ^. checkStateErrs
    in
      if Seq.null errs
        then Right t
        else Left errs