aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2011-11-04 16:26:00 +0000
committerjohnvg2011-11-04 16:26:00 +0000
commitb431a032578e41c7426e4adad3e5648efedba670 (patch)
treec44d89f2779c543d3081ccfe18eb2051cba969da
parentremove differences in layout between the compiler and the iTask compiler (diff)
remove differences in layout between the compiler and the iTask compiler
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1990 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/syntax.dcl21
-rw-r--r--frontend/syntax.icl12
2 files changed, 14 insertions, 19 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index e1c6319..6b14923 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -335,7 +335,7 @@ cNameLocationDependent :== True
:: FunSpecials
= FSP_ParsedSubstitutions ![Env Type TypeVar]
- | FSP_Substitutions ![SpecialSubstitution]
+ | FSP_Substitutions ![SpecialSubstitution]
| FSP_ContextTypes ![Special]
| FSP_FunIndex !Index
| FSP_None
@@ -713,7 +713,8 @@ from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo
| VITI_PatternType [AType] /*module*/!Index /*constructor*/!Index VI_TypeInfo
//:: VarInfo = VI_Empty | VI_Type !AType !(Optional CoercionPosition) | VI_FAType ![ATypeVar] !AType !(Optional CoercionPosition) |
-:: VarInfo = VI_Empty | VI_Type !AType !VI_TypeInfo | VI_FAType ![ATypeVar] !AType !VI_TypeInfo |
+:: VarInfo = VI_Empty | VI_Type !AType !VI_TypeInfo |
+ VI_FAType ![ATypeVar] !AType !VI_TypeInfo |
VI_Occurrence !Occurrence | VI_UsedVar !Ident |
VI_Expression !Expression | VI_Variable !Ident !VarInfoPtr | VI_LiftedVariable !VarInfoPtr |
VI_Count !Int /* the reference count of a variable */ !Bool /* true if the variable is global, false otherwise */ |
@@ -843,9 +844,9 @@ cNotVarNumber :== -1
/* For handling dynamics */
- | EI_UnmarkedDynamic !(Optional DynamicType) ![DynamicPtr]
- | EI_Dynamic !(Optional DynamicType) ![DynamicPtr]
- | EI_DynamicType !DynamicType ![DynamicPtr]
+ | EI_UnmarkedDynamic !(Optional DynamicType) ![DynamicPtr] // in expression
+ | EI_Dynamic !(Optional DynamicType) ![DynamicPtr] // in expression
+ | EI_DynamicType !DynamicType ![DynamicPtr] // in pattern
/* Auxiliary, was EI_DynamicType before checking */
@@ -855,9 +856,9 @@ cNotVarNumber :== -1
| EI_TempDynamicType !(Optional DynamicType) ![DynamicPtr] !AType ![TypeContext] !ExprInfoPtr !SymbIdent
| EI_TempDynamicPattern ![TypeVar] !DynamicType ![DynamicPtr] ![TempLocalVar] !AType ![TypeContext] !ExprInfoPtr !SymbIdent
-
- | EI_TypeOfDynamic !TypeCodeExpression /* Final */
- | EI_TypeOfDynamicPattern ![VarInfoPtr] !TypeCodeExpression /* Final */
+
+ | EI_TypeOfDynamic !TypeCodeExpression /* Final */
+ | EI_TypeOfDynamicPattern ![VarInfoPtr] !TypeCodeExpression /* Final */
| EI_TypeCode !TypeCodeExpression
| EI_TypeCodes ![TypeCodeExpression]
@@ -988,7 +989,7 @@ cNotVarNumber :== -1
| (:@:) infixl 9 !ConsVariable ![AType]
| TB !BasicType
- | TFA [ATypeVar] Type /* Universally quantified types */
+ | TFA ![ATypeVar] !Type /* Universally quantified types */
| GTV !TypeVar
| TV !TypeVar
@@ -1306,7 +1307,7 @@ cIsNotStrict :== False
| TypeSignature !(Int Int -> (AType,Int,Int)) !Expression
- | EE
+ | EE
| NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */
| FailExpr !Ident // only allowed on (case) root positions
diff --git a/frontend/syntax.icl b/frontend/syntax.icl
index fc47517..8c9acf5 100644
--- a/frontend/syntax.icl
+++ b/frontend/syntax.icl
@@ -98,7 +98,7 @@ where
instance toString AttributeVar
where
// toString {av_ident,av_info_ptr} = toString av_ident + "[" + toString (ptrToInt av_info_ptr) + "]"
- toString {av_ident,av_info_ptr} = toString av_ident
+ toString {av_ident} = toString av_ident
instance <<< AType
where
@@ -383,7 +383,6 @@ where
(<<<) file (Update expr1 selections expr2) = file <<< '{' <<< expr1 <<< " & " <<< selections <<< " = " <<< expr2 <<< '}'
(<<<) file (RecordUpdate cons_symbol expression expressions) = file <<< '{' <<< cons_symbol <<< ' ' <<< expression <<< " & " <<< expressions <<< '}'
(<<<) file (TupleSelect field field_nr expr) = file <<< expr <<<'.' <<< field_nr
-// (<<<) file (Lambda vars expr) = file <<< '\\' <<< vars <<< " -> " <<< expr
(<<<) file (MatchExpr cons expr) = file <<< cons <<< " =: " <<< expr
(<<<) file EE = file <<< "** E **"
(<<<) file (NoBind _) = file <<< "** NB **"
@@ -745,7 +744,6 @@ where
(<<<) file (PD_Type td) = file <<< td
(<<<) file (PD_Generic {gen_ident}) = file <<< "generic " <<< gen_ident
(<<<) file (PD_GenericCase {gc_ident,gc_type_cons}) = file <<< gc_ident <<< "{|" <<< gc_type_cons <<< "|}"
-
(<<<) file _ = file
instance <<< Rhs
@@ -922,12 +920,8 @@ where
(<<<) file
STE_DclFunction
= file <<< "STE_DclFunction"
- (<<<) file
- STE_Generic
- = file <<< "STE_Generic"
- (<<<) file
- STE_GenericCase
- = file <<< "STE_GenericCase"
+ (<<<) file STE_Generic = file <<< "STE_Generic"
+ (<<<) file STE_GenericCase = file <<< "STE_GenericCase"
(<<<) file
(STE_Module _)
= file <<< "STE_Module"