Adam Sampson
b413cf3dc2
Fix some broken Haddock.
2008-05-25 18:49:15 +00:00
Adam Sampson
5d8d96fb7a
GenerateC doesn't need Text.Regex any more.
2008-05-25 18:42:18 +00:00
Neil Brown
d044b51335
Renamed ndType to ndSpecType, as per Trac ticket #59
2008-05-21 13:38:51 +00:00
Neil Brown
35498a4d13
Renamed the "Typed" type-class to "ASTTypeable" as per the Trac ticket
2008-05-21 13:16:45 +00:00
Neil Brown
8943b767eb
Fixed the SimplifyTypes module
...
This fixes Trac ticket #46 . The pass for masking out state bodies has been moved to PassList (since it's so small and should be run first) for now, and SimplifyTypes has had its previous two passes merged into one.
2008-05-21 13:12:49 +00:00
Neil Brown
9f411bfd45
Fixed the Rain passes so that the order correctly satisfies the pre-requisites
2008-05-21 12:46:51 +00:00
Neil Brown
4537cd205c
Fixed the occam pass list so that it now has the correct order in respect to all the pre-requisite properties
2008-05-21 12:30:04 +00:00
Neil Brown
15cf63980f
Changed the pass mechanism to use a fixed list again rather than use the dependency graph
...
This fixes ticket #47 from Trac, which explains how using a dependency graph for passes was a bit too over the top, and led to unexpected results. Under the "new" (the original!) system, the pass list is used as-is, but the dependencies are checked to make sure the pass list order isn't wrong. In future we should also add back running the properties at the appropriate point (currently disabled).
2008-05-21 12:26:32 +00:00
Neil Brown
0627ff2b4f
Changed the Rain TLP interface to use lists for output streams as I'd originally intended
2008-05-21 00:20:29 +00:00
Neil Brown
0b1708c241
Added the equality operator for tockList in the C++ support code
2008-05-21 00:20:11 +00:00
Neil Brown
11588b34a3
Fixed a bug where transformConstr would skip over the second of two nested definitions of array constructors
2008-05-20 23:44:32 +00:00
Neil Brown
48fbf5f3e1
Added pulling up of list literals and list-constructed expressions
2008-05-20 23:44:07 +00:00
Neil Brown
2300a5c3a7
Added a few extra cases in ShowCode, for some Rain things
2008-05-20 23:42:52 +00:00
Neil Brown
e5d8b51827
Added a missing line to substitute back inferred types for anonymous non-numeric types
2008-05-20 22:08:15 +00:00
Neil Brown
8c78d056b6
Improved display of unknown types (for debugging, really)
2008-05-20 22:07:35 +00:00
Neil Brown
926659cf70
Fixed the Rain lists testcase to adhere to the new type unification scheme
2008-05-20 21:56:25 +00:00
Neil Brown
af63afa5e9
Added type inference for list literals and list constructors
2008-05-20 21:56:07 +00:00
Neil Brown
2b3783d845
Fixed the handling of types for function returns
...
Function returns are done in Rain by assigning to the function name, so we need a bit of extra code when checking assignments to see if the LHS is a function name.
2008-05-20 18:11:05 +00:00
Neil Brown
7f387ae6a9
Fixed a conflict in configure.ac, adding the GLIB_ flags to the C flags
2008-05-18 11:39:51 +00:00
Neil Brown
bd7584e280
Turned off the checkFunction pass for now, since it is over-eager at spotting problems with Rain functions
2008-03-25 18:46:51 +00:00
Neil Brown
f9d55d2c65
Expanded the Rain lists testcase
2008-03-25 18:45:19 +00:00
Neil Brown
20a142839f
Added the beginnings of list support for CCSP (using glib)
2008-03-25 18:44:49 +00:00
Neil Brown
963b677142
Added support for detecting glib for the C backend
2008-03-25 18:43:48 +00:00
Neil Brown
f0a90a3024
Removed "run" from the Rain syntax, and adopted the occam approach instead
2008-03-25 17:32:54 +00:00
Neil Brown
4429dfc051
Added Meta tags all over the place in the type unification to give better error messages
2008-05-20 18:42:20 +00:00
Neil Brown
6afea19ee6
Cleared up the mess of old stuff in the list of rain passes
2008-05-18 11:36:08 +00:00
Neil Brown
8cc602100d
Added code to replace the unknown types with their deduced values after type unification
2008-05-18 11:34:26 +00:00
Neil Brown
ec5baf4e97
Stopped the Rain parser using any as a placeholder, and switched to using the unknown types
2008-05-18 11:34:05 +00:00
Neil Brown
760c8a9a1e
Added marking up of types in foreach replicators for type unification
2008-05-18 11:13:48 +00:00
Neil Brown
0c443255e6
Changed the expression types to use type unification, and removed the old test
...
The new behaviour is to check that both sides of a dyadic operator have the same type. This means that multiplying time by a scalar is no longer possible, but it also means (due to the lack of checks after unification) that multiplying two lists is possible, or concatenating two integers. This needs to be fixed by adding another pass.
2008-05-18 10:30:25 +00:00
Neil Brown
6758cd7da3
Changed the list concatenation operator to be ++ in Rain
2008-05-18 10:30:17 +00:00
Neil Brown
46aa0383be
Removed some unused functions from RainTypes
2008-05-18 09:52:50 +00:00
Neil Brown
4586cdd43a
Added an export list to RainTypes, and removed some tests for old passes
2008-05-18 09:49:11 +00:00
Neil Brown
f79cba0616
Changed the parameter type checking to use type unification
2008-05-18 09:43:12 +00:00
Neil Brown
7bbfab34a0
Added simple instances of the Typed class for actuals and formals
2008-05-18 09:42:51 +00:00
Neil Brown
ecb4758b64
Corrected a slight bug in the type tests
2008-05-18 09:34:04 +00:00
Neil Brown
fb090a3618
Hacked the ShowCode module quickly to display a lot more Rain code (stealing from the occam stuff, and twiddling it slightly)
2008-05-17 22:21:18 +00:00
Neil Brown
90986ea97b
Added a backend that prints out the AST as source (rather than dumping the raw AST)
2008-05-17 22:20:38 +00:00
Neil Brown
e53fda754e
Fixed the Rain passes so the the alphabet test case now works (at least)
2008-05-17 20:51:42 +00:00
Neil Brown
1e5268dea5
Fixed the types that are definitely known (declarations, etc) so that they are available during type unification
2008-05-17 19:48:48 +00:00
Neil Brown
bf07c441ae
Changed the communication type checking to be part of the type unification framework
2008-05-17 19:47:47 +00:00
Neil Brown
1115364d47
Changed TypeExp to stop using Data.Generics (which was getting awkward)
...
Instead of storing the Constr, which was messy, we now store a String (to allow comparison of constructor types during unification) and a function to reform the type at the end of the type checking.
2008-05-17 19:44:45 +00:00
Neil Brown
abbca5f235
Added tests for channel communications (and type unification)
2008-05-17 19:43:44 +00:00
Neil Brown
ddb9ba2fd3
Corrected a bug in unifyArgs where errors that occur while processing arguments were being ignored
2008-05-17 19:42:49 +00:00
Neil Brown
e72e537c47
Added a missing line in the Makefile for UnifyType
2008-05-17 16:55:04 +00:00
Neil Brown
ab0301a342
Made the Rain parser actually record an unknown (to-be-inferred) type for numeric literals
2008-05-17 14:24:45 +00:00
Neil Brown
cd0c8d2901
Added assignments to the new type unification system for Rain
2008-05-17 14:23:31 +00:00
Neil Brown
1e6ae6bff9
Improved the error messages when the type unification fails
2008-05-17 14:23:00 +00:00
Neil Brown
f10cb7d525
Moved the TypeExp type out to its own module, UnifyType
2008-05-17 14:21:57 +00:00
Neil Brown
0aeebfeeb8
Added more tests for the Rain type system, this time assignment
2008-05-17 14:19:50 +00:00