toContract :: Type -> Contract
{-toContract (TFunc (this:reqargs) maybeVararg result _) =
  FunctionContract noPos (map toContract reqargs) varargCtc (toContract result)
    where varargCtc = case maybeVararg of
                        Nothing -> Nothing
                        Just vararg -> Just (toContract vararg)-}
toContract (TId id) = 
  error $ "unbound identifier (" ++ show id ++ ") at " ++ show pos ++
          " while converting a type to a contract"
toContract :: Type -> Contract
toContract (TId id) = 
  error $ "unbound identifier (" ++ show id ++ ") at " ++ show pos ++
          " while converting a type to a contract"
toContract (TId id) = 
  error $ "unbound identifier (" ++ show id ++ ") at " ++ show pos ++
          " while converting a type to a contract"