aboutsummaryrefslogtreecommitdiff
path: root/frontend
AgeCommit message (Collapse)AuthorFilesLines
2017-03-06Lambda-caseCamil Staps2-4/+26
2017-02-27check imports of types that occur only in a cached definition module,johnvg3-2/+73
we can currently only check if there is an import, not whether it should be a qualified import git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2776 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-11-11fix definition of generic function only in the definition module,johnvg1-6/+29
the Declaration list contains 2 identifiers for a generic function definition, copy the generic definition from the definition module once instead of twice git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2767 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-10-04fix substitution of universally quantified uniqueness attributes in function ↵johnvg1-8/+8
determineTypeOfMemberInstance, to prevent compiler crash for: :: T m a = T (m (a, a)) derive bimap T, (,) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2744 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-06-20fix commit for revision 2724johnvg1-3/+5
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2734 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-06-10add Expression to CP_SymbArg and rename as CP_SymbArgAndExpression,johnvg3-43/+51
print expression in error message in cannot_unify git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2732 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-06-06set FI_HasTypeCodes in fi_properties if a function contains type codes andjohnvg3-49/+46
should be converted in module convertDynamics, instead of storing a list with one nilPtr in fi_dynamics, remove unnecessary Let expressions with unused variables by initializing with VI_NotUsed instead of VI_Empty git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2724 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2016-04-05don't forget to transform (index) expressions in ArraySelection's of Selector'sjohnvg1-23/+31
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2681 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2015-12-02allow # and | in \ expressionsjohnvg4-66/+130
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2671 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2015-11-27only allow infix constructor with arity 2, otherwise the compiler may crash ↵johnvg1-2/+11
when pattern matching git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2669 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2015-11-17fix qualified import of constructors with a constraint or universally ↵johnvg1-10/+17
quantified type variable by using a SK_OverloadedConstructor instead of a SK_Constructor git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2665 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-10-16atop compiling after a kind error, because this may cause a crash in the ↵johnvg1-2/+6
typechecker (while matching types of instances) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2444 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-10-16move addFunctionsRange after collectFunctions for instances and generic cases,johnvg1-3/+2
this adds local functions of instances and generic cases to the ifi_local_function_indices, in order to check the kinds of these local functions git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2442 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-09-26remove unused constructor TQV of :: type_io.icljohnvg6-24/+0
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2424 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-04-03add unit type (print type as ())johnvg1-0/+2
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2366 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-04-03add unit typejohnvg5-234/+300
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2365 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-04-03use the index to recognize predefined types when printing, instead of the ↵johnvg1-23/+16
name of the types git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2364 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-03-19fix the order of expansion of type synonyms in type synonyms,johnvg1-2/+3
by using the reversed groups (constructed in reverse order) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2361 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2014-02-21if a constraint of a class without members is reduced, and all classes in ↵johnvg1-1/+65
the constraint of that class appear in the reduced constraints for a variable, add a constraint for the original class for that variable (this causes removal of the other constraints later), to prevent functions with too many constraints git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2357 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-12-13in derived dynamic types, add uniqueness to algebraic types that are always ↵johnvg4-7/+23
unique (the type definition has a * on the left), add Bool to GTT_Constructor to indicate uniqueness, generate TCE_UnqType in TypeCode for unique GTT_Constructor's, this uniqueness property should be propagated, but this is not implemented yet git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2336 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-12-12add type attributes for universally quantified variables generated in the ↵johnvg1-5/+3
generics1 module to the list of all type attributes (not adding these type attributes caused a type error), this also happens for function types that are specified by the programmer, the universally quantified type variables are however not added to the list of all type variables git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2334 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-11-27fix printing of uniqueness attributes in type with A.johnvg1-0/+4
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2330 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-11-04fix comprehensions with a non lower case identifier as pattern,johnvg1-2/+3
for example: [0 \\ [] <- [[]]] git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2317 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-11-04remove unused argument ca and result of functions:johnvg1-30/+29
makeConsExpressionForGenerator, makeNilExpression and makeConsExpression git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2315 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-10-23don't accept instance members defined using :==johnvg1-9/+20
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2306 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-10-23undo previous commit, because it causes the compiler to crash when compiling ↵johnvg1-5/+0
the CleanIDE (undo: check the type of instances defined using :== (maybe the parser should reject these instances)) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2304 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-10-14check the type of instances defined using :== (maybe the parser should ↵johnvg1-0/+5
reject these instances) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2297 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-10-09prevent crash if a newtype is used with -dynamicsjohnvg1-5/+9
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2292 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-10-09restore tv_info_pointer values in function ↵johnvg1-32/+55
convertSymbolTypeWithoutCollectingImportedConstructors, this is necessary because in module type_io these pointers point to TVI_Normalized values that could be overwritten by this function git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2290 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-06-07prevent infinite loop when fusing trivial tail recursive functions (e.g. ↵johnvg1-14/+42
undef = undef) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2253 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-06-07prevent crash during fusion,johnvg1-23/+23
argument fun_type of function determineProducers was changed by a record pattern match, rename the argument to consumer_type git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2251 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-06-03remove unused Bool of PE_Let contructorjohnvg5-36/+30
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2249 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-05-28prevent crash when writing .tcl file with extensible algebraic types (not ↵johnvg1-24/+16
yet implement in the dynamic linker) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2246 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-05-28fix renumbering of extensible algebraic typesjohnvg1-3/+10
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2244 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-05-06call reset_free_var_heap_pointers before expandCheckedAlternative in ↵johnvg1-7/+10
expandMacrosInBody, to prevent crash in collectVariables git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2239 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-29copy expr in DictionariesFunction in instance of copy for Expression,johnvg1-0/+4
to avoid abort in collectVariables for a BoundVar git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2237 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-26improve "multiply defined" error, add module names of the definitions to the ↵johnvg3-71/+75
error message git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2234 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-10allow =: again for generic functions without argumentsjohnvg1-5/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2233 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-09optimize fusion, reduce memory used of fusion (from iTask branch):johnvg5-316/+1167
allow integers and strings as consumer for generic functions (to optimize use of generic info). use PR_CurriedFunction instead of PR_Curried for local macro functions that are good producers. check the arity of the function to be generated already in determineProducer, if too large, don't yield a producer which will be rejected later, to allow optimization of producers in subsequent arguments. optimize trivial function calls (with arguments) before optimizing arguments, treat constant function as trivial function. if a function call has two identical arguments, generate a specialized function that shares these parameters. specialize functions with zero arity constructor arguments, if the function is a generic function, or the constructor is a generic constructor. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2232 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-08add generic function dependencies for generic function definitions,johnvg18-840/+2601
add generic case definitions in definition modules for the types used to make the generic representation, in generic case definitions in definition modules specify what generic info and dependencies are used git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2227 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05update derive class for deriving generic functions in class context (from ↵johnvg3-9/+26
iTask branch) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2226 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05add derive class for deriving generic functions in class context (from iTask ↵johnvg12-97/+383
branch) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2225 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05change type GenericCaseDef, add types GenericCaseFunctions and GCFjohnvg7-205/+200
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2224 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-04add type StringPos (from iTask branch)johnvg4-24/+46
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2223 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-04renumber functions after checking imported modules (from iTask branch)johnvg6-394/+509
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2222 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-04add type constraints in dynamic typesjohnvg8-103/+191
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2221 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-03remove more small differences in module typereify with the iTask branchjohnvg3-42/+42
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2220 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-03remove some small differences in module typereify with the iTask branchjohnvg2-33/+33
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2219 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-02add type constraints in constructors and function arguments with universal ↵johnvg28-372/+1283
quantifier (from iTask branch) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2218 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-03-26in function adjust_type_code, add alternative for TCE_Selector,johnvg1-1/+6
fix name of type function git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2217 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d