00001 #ifndef TYPEINFERCOMMON_HXX 00002 #define TYPEINFERCOMMON_HXX 00003 /************************************************************************** 00004 * 00005 * Copyright (C) 2006, Johns Hopkins University. 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or 00009 * without modification, are permitted provided that the following 00010 * conditions are met: 00011 * 00012 * - Redistributions of source code must contain the above 00013 * copyright notice, this list of conditions, and the following 00014 * disclaimer. 00015 * 00016 * - Redistributions in binary form must reproduce the above 00017 * copyright notice, this list of conditions, and the following 00018 * disclaimer in the documentation and/or other materials 00019 * provided with the distribution. 00020 * 00021 * - Neither the names of the copyright holders nor the names of any 00022 * of any contributors may be used to endorse or promote products 00023 * derived from this software without specific prior written 00024 * permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00027 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00028 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00029 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00030 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00031 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00032 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00033 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00034 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00035 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00036 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 **************************************************************************/ 00039 00040 #include "UocInfo.hxx" 00041 #include "Options.hxx" 00042 #include "AST.hxx" 00043 #include "Type.hxx" 00044 #include "TypeScheme.hxx" 00045 #include "Typeclass.hxx" 00046 00047 GCPtr<Type> 00048 obtainFullUnionType(GCPtr<Type> t); 00049 00050 bool 00051 initGamma(std::ostream& errStream, 00052 GCPtr<Environment<TypeScheme> > gamma, 00053 GCPtr<Environment< CVector<GCPtr<Instance> > > > instEnv, 00054 const GCPtr<AST> ast, unsigned long uflags); 00055 bool 00056 checkImpreciseTypes(std::ostream& errStream, 00057 const GCPtr<Environment<TypeScheme> > gamma, 00058 GCPtr<CVector<GCPtr<Type> > > impTypes); 00059 void 00060 useIFGamma(const std::string& idName, 00061 GCPtr<Environment<TypeScheme> > fromEnv, 00062 GCPtr<Environment<TypeScheme> > toEnv); 00063 00064 bool 00065 useIFInsts(std::ostream &errStream, 00066 LexLoc &errLoc, 00067 GCPtr<Environment< CVector<GCPtr<Instance> > > >fromEnv, 00068 GCPtr<Environment< CVector<GCPtr<Instance> > > >toEnv, 00069 unsigned long uflags); 00070 00071 bool 00072 initGamma(std::ostream& errStream, 00073 GCPtr<Environment<TypeScheme> > gamma, 00074 GCPtr<Environment< CVector<GCPtr<Instance> > > > instEnv, 00075 const GCPtr<AST> ast, unsigned long uflags); 00076 00077 #endif /* TYPEINFERCOMMON_HXX */
1.4.7