- 06 Oct, 2000 4 commits
- 05 Oct, 2000 12 commits
-
-
andy authored
Fixing the order that labeled fields appear in datatypes. Currently they are reversed, which breaks the prelude badly. [From Haskell report: The arguments to the positional constructor occur in the same order as the labeled fields. For example, the declaration data C = F { f1,f2 :: Int, f3 :: Bool} defines a type and constructor identical to the one produced by data C = F Int Int Bool ]
-
simonpj authored
wibble
-
simonpj authored
Add test for generics
-
simonpj authored
Add a test to reject things like: instance Ord a => Ord (forall s. T s a) g :: T s (forall b.b) The for-alls are illegal in type arguments!
-
simonpj authored
Add test for for-all types in arguments
-
simonpj authored
Parser changes to support type constructor operators; part of the generics stuff
-
simonpj authored
Add a bit more documentation of generics
-
simonmar authored
let's touch the *right* .o file, shall we?
-
simonmar authored
oops, need to touch the .o file if compilation was NOT required
-
simonmar authored
test -fgenerics before generating the generic datatype.
-
simonmar authored
add -fgenerics
-
sewardj authored
Add finder, summariser, part of CM, to repo.
-
- 04 Oct, 2000 2 commits
- 03 Oct, 2000 9 commits
-
-
andy authored
Addding the Galois Connections ray tracer as an example for GHC.
-
sewardj authored
Change representation of Package so it contains the package's name. (This makes GHCI a bit more convenient).
-
qrczak authored
Added eqString_RDR to implicitFVs.
-
keithw authored
Correct some minor typos and a forward reference or two.
-
rrt authored
Backed out bogon (last commit was completely nonsensical).
-
rrt authored
Add $(FPTOOLS_TOP)/dll to PATH when running GHC_INPLACE. This is to make the inplace compiler pick up the right set of DLLs under Windows, and won't have any effect on other platforms (where the dll directory is empty).
-
simonpj authored
First cut at documenting generic classes
-
simonpj authored
-------------------------------------- Adding generics SLPJ Oct 2000 -------------------------------------- This big commit adds Hinze/PJ-style generic class definitions, based on work by Andrei Serjantov. For example: class Bin a where toBin :: a -> [Int] fromBin :: [Int] -> (a, [Int]) toBin {| Unit |} Unit = [] toBin {| a :+: b |} (Inl x) = 0 : toBin x toBin {| a :+: b |} (Inr y) = 1 : toBin y toBin {| a :*: b |} (x :*: y) = toBin x ++ toBin y fromBin {| Unit |} bs = (Unit, bs) fromBin {| a :+: b |} (0:bs) = (Inl x, bs') where (x,bs') = fromBin bs fromBin {| a :+: b |} (1:bs) = (Inr y, bs') where (y,bs') = fromBin bs fromBin {| a :*: b |} bs = (x :*: y, bs'') where (x,bs' ) = fromBin bs (y,bs'') = fromBin bs' Now we can say simply instance Bin a => Bin [a] and the compiler will derive the appropriate code automatically. (About 9k lines of diffs. Ha!) Generic related things ~~~~~~~~~~~~~~~~~~~~~~ * basicTypes/BasicTypes: The EP type (embedding-projection pairs) * types/TyCon: An extra field in an algebraic tycon (genInfo) * types/Class, and hsSyn/HsBinds: Each class op (or ClassOpSig) carries information about whether it a) has no default method b) has a polymorphic default method c) has a generic default method There's a new data type for this: Class.DefMeth * types/Generics: A new module containing good chunk of the generic-related code It has a .hi-boot file (alas). * typecheck/TcInstDcls, typecheck/TcClassDcl: Most of the rest of the generics-related code * hsSyn/HsTypes: New infix type form to allow types of the form data a :+: b = Inl a | Inr b * parser/Parser.y, Lex.lhs, rename/ParseIface.y: Deal with the new syntax * prelude/TysPrim, TysWiredIn: Need to generate generic stuff for the wired-in TyCons * rename/RnSource RnBinds: A rather gruesome hack to deal with scoping of type variables from a generic patterns. Details commented in the ClassDecl case of RnSource.rnDecl. Of course, there are many minor renamer consequences of the other changes above. * lib/std/PrelBase.lhs Data type declarations for Unit, :+:, :*: Slightly unrelated housekeeping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * hsSyn/HsDecls: ClassDecls now carry the Names for their implied declarations (superclass selectors, tycon, etc) in a list, rather than laid out one by one. This simplifies code between the parser and the type checker. * prelude/PrelNames, TysWiredIn: All the RdrNames are now together in PrelNames. * utils/ListSetOps: Add finite mappings based on equality and association lists (Assoc a b) Move stuff from List.lhs that is related
-
simonpj authored
Remove dead code mkLookupFun
-
- 02 Oct, 2000 8 commits
-
-
simonpj authored
Add check for unboxed function arguments
-
sewardj authored
First shot at the summariser. Doesn't know how to unlit or cppify source yet.
-
sewardj authored
@ModSummary@ wibble.
-
sewardj authored
Partially back out changes mistakenly included in last commit :-(
-
sewardj authored
Implement initial-state (emptyTy :: Ty) functions.
-
simonmar authored
Names of mpz routines in GMP 3 now have a "__g" prefix (untested, but should fix the NCG).
-
simonmar authored
- move readMVar and swapMVar from PrelConc to concurrent - add the following exception-safe MVar operations: withMVar :: MVar a -> (a -> IO b) -> IO b modifyMVar :: MVar a -> (a -> IO (a,b)) -> IO b modifyMVar_ :: MVar a -> (a -> IO a) -> IO () - re-implement readMVar and swapMVar in an exception-safe way. - re-implement the Chan operations using withMVar et al.
-
simonpj authored
Add tc107
-
- 29 Sep, 2000 4 commits
- 28 Sep, 2000 1 commit
-
-
simonpj authored
Another wibble
-