aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/backendconvert.icl6
-rw-r--r--backend/backendpreprocess.icl11
-rw-r--r--frontend/syntax.dcl9
-rw-r--r--frontend/syntax.icl16
4 files changed, 7 insertions, 35 deletions
diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl
index f3efdd6..3e1e22c 100644
--- a/backend/backendconvert.icl
+++ b/backend/backendconvert.icl
@@ -29,6 +29,12 @@ sfoldr op r l s
foldr [] = r
foldr [a:x] = op a (foldr x)
+:: FunctionPattern = FP_Basic !BasicValue !(Optional FreeVar)
+ | FP_Algebraic !(Global DefinedSymbol) ![FunctionPattern] !(Optional FreeVar)
+ | FP_Variable !FreeVar
+ | FP_Dynamic ![VarInfoPtr] !FreeVar !TypeCodeExpression !(Optional FreeVar)
+ | FP_Empty
+
:: BEMonad a :== *BackEndState -> *(!a,!*BackEndState)
:: BackEnder :== *BackEndState -> *BackEndState
diff --git a/backend/backendpreprocess.icl b/backend/backendpreprocess.icl
index 47274b1..85aba8c 100644
--- a/backend/backendpreprocess.icl
+++ b/backend/backendpreprocess.icl
@@ -175,17 +175,6 @@ instance sequence LetBind where
sequence bind
= sequence bind.lb_dst
-instance sequence FunctionPattern where
- sequence (FP_Algebraic _ subpatterns optionalVar)
- = sequence subpatterns
- o` sequence optionalVar
- sequence (FP_Variable freeVar)
- = sequence freeVar
- sequence (FP_Basic _ optionalVar)
- = sequence optionalVar
- sequence FP_Empty
- = identity
-
instance sequence (Ptr VarInfo) where
sequence varInfoPtr
= assignSequenceNumber varInfoPtr
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index 01be501..4d703cc 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -1277,13 +1277,6 @@ instance == OverloadedListType
| TCE_UnqType !TypeCodeExpression
:: GlobalTCType = GTT_Basic !BasicType | GTT_Constructor !SymbIdent | GTT_PredefTypeConstructor !(Global Index) | GTT_Function
-
-
-:: FunctionPattern = FP_Basic !BasicValue !(Optional FreeVar)
- | FP_Algebraic !(Global DefinedSymbol) ![FunctionPattern] !(Optional FreeVar)
- | FP_Variable !FreeVar
- | FP_Dynamic ![VarInfoPtr] !FreeVar !TypeCodeExpression !(Optional FreeVar)
- | FP_Empty
:: AlgebraicPattern =
{ ap_symbol :: !(Global DefinedSymbol)
@@ -1346,7 +1339,7 @@ cNotALineNumber :== -1
instance == ModuleKind, Ident
instance <<< (Module a) | <<< a, ParsedDefinition, InstanceType, AttributeVar, TypeVar, SymbolType, Expression, Type, Ident, (Global object) | <<< object,
Position, CaseAlt, AType, FunDef, ParsedExpr, TypeAttribute, (Bind a b) | <<< a & <<< b, ParsedConstructor, (TypeDef a) | <<< a, TypeVarInfo, AttrVarInfo,
- BasicValue, ATypeVar, TypeRhs, FunctionPattern, (Import from_symbol) | <<< from_symbol, ImportDeclaration, ImportedIdent, CasePatterns,
+ BasicValue, ATypeVar, TypeRhs, (Import from_symbol) | <<< from_symbol, ImportDeclaration, ImportedIdent, CasePatterns,
(Optional a) | <<< a, ConsVariable, BasicType, Annotation, SelectorKind, Selection, SelectorDef, ConsDef, LocalDefs, FreeVar, ClassInstance, SignClassification,
TypeCodeExpression, CoercionPosition, AttrInequality, LetBind, Declaration, STE_Kind, BoundVar,
TypeSymbIdent,
diff --git a/frontend/syntax.icl b/frontend/syntax.icl
index 00dc5aa..edfad93 100644
--- a/frontend/syntax.icl
+++ b/frontend/syntax.icl
@@ -526,22 +526,6 @@ instance <<< ParsedBody
where
(<<<) file {pb_args,pb_rhs} = file <<< pb_args <<< " = " <<< pb_rhs
-instance <<< FunctionPattern
-where
- (<<<) file (FP_Basic val (Yes var))
- = file <<< var <<< "=:" <<< val
- (<<<) file (FP_Basic val No)
- = file <<< val
- (<<<) file (FP_Algebraic constructor vars (Yes var))
- = file <<< var <<< "=:" <<< constructor <<< vars
- (<<<) file (FP_Algebraic constructor vars No)
- = file <<< constructor <<< vars
- (<<<) file (FP_Variable var) = file <<< var
- (<<<) file (FP_Dynamic vars var type_code _)
- = writeVarPtrs (file <<< var <<< " :: ") vars <<< type_code
- (<<<) file (FP_Empty) = file <<< '_'
-
-
instance <<< FunKind
where
(<<<) file (FK_Function False) = file <<< "FK_Function"