| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Bye bye STG Hugs!
|
| |
|
|
|
|
|
| |
Removing the -DUSE_REPORT_PRELUDE for Hugs, so Hugs can use quicksort for
its sorting function.
Related wibbles in the libraries.
|
| |
|
|
| |
Changing PrimPrel to PrelPrim.
|
| |
|
|
| |
Observe wibble.
|
| |
|
|
|
|
|
| |
Adding in support for split Hugs Prelude.
There are now two preludes.
(1) PrimPrel - the Prelude defintions, and the extra magic datatypes.
(2) Prelude - the external interface for Prelude.
|
| |
|
|
|
|
|
| |
Second attack at supporting threads inside STG Hugs.
We now support most of the concurrency primitives.
Also a wibble in Evaluator.c, letting Hugs compile.
|
| |
|
|
| |
Adding version of Makefile that looks in the new location for Prelude.hs
|
| |
|
|
|
| |
Adding the latest version of the makefile
Removing Prelude.hs from the lib dir
|
| |
|
|
|
|
|
|
| |
Moved Prelude.hs for STG Hugs to ghc/lib/hugs/Prelude.hs
This means that everything in the ghc/interpreter/lib directory
is generated. The new makefile for interpreter/lib will be added
shortly.
|
| |
|
|
| |
Adding latest version of STG Hugs libs makefile.
|
| |
|
|
|
| |
Adding prelude changes require for the new libs, include IOExts.
Reintroducing ptr equality into HugsSTG.
|
| |
|
|
| |
Changes needed to support foreign export (dynamic) in combined mode.
|
| |
|
|
|
|
|
| |
Remove fromDouble from class Fractional, and make it standalone.
This matches GHC. I don't think this is strictly necessary, but
Hugs refers to fromDouble during desugaring and I prefer to avoid
possible mishaps.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More bug fixes resulting from trying to load small programs into Hugs
using the GHC Prelude:
-- Better handling of kinds on class method types. It's still a kludge
(I reckon) but works well enough to correctly handle methods in
Monad and Functor. See comment in startGHCClass() in interface.c.
-- Add hugsprimReadField and hugsprimShowField.
-- Make error be exported from the Prelude. For some reason, PrelErr.hi
doesn't give a signature for error, so we have to fake it by copying
that of hugsprimError.
-- Handle fixity declarations read from interfaces.
-- Set nameListMonad so that list comprehensions can be translated.
|
| |
|
|
|
|
|
| |
Many bug fixes for object loading:
-- create class symbol table entries more correctly
-- find GHC-created info tables for names which are constructors
-- add debugging machinery: :d <entity> and symbol-table printers
|
| |
|
|
|
| |
-- Make default defaults work in combined mode
-- rename some fns in lib/Prelude.hs to match names in HugsPrel.lhs
|
| |
|
|
|
| |
Make hugsprimUnpackString :: Addr -> String available to Hugs' desugarer
in both modes.
|
| |
|
|
| |
Back out previous commit.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is the missing log message for the commit by sewardj at
2000/01/10 08:23:33 PST for these files:
Some names in the standalone Prelude are referred to during desugaring
in Hugs. These functions therefore need to be supplied from the GHC
world in combined mode. Rename the relevant functions from
primXYZ to hugsprimXYZ to distinguish them, in preparation for
create of ghc/lib/std/PrelHugs.lhs.
---------------------------------------------------------------------
|
| | |
|
| |
|
|
| |
Add rules so library sources can be obtained from fptools/hslibs.
|
| |
|
|
|
|
|
|
| |
Fix bug in 'deriving Enum' reported by Ralf Hinze:
data T = A | B deriving Enum
failed, requiring instance Ord T, because code generated
for enumFromThen required Ord. We now derive just fromEnum
and toEnum, and let the Report's defaults do the rest.
|
| |
|
|
| |
Add clean target, and change hugslib to all.
|
| |
|
|
|
| |
Bind namePmFromInteger, namePmSubtract, namePmLe to stuff in Prelude
so that n+k patterns work.
|
| |
|
|
|
| |
Changing the top level evaluator so it runs things
of type IO a, not just IO <monomorphic-thing>.
|
| |
|
|
| |
wibble
|
| |
|
|
| |
Include path wibbles.
|
| |
|
|
| |
Enforce multiple reader, single writer semantics for Handles.
|
| |
|
|
| |
Implement CPUTime.getCPUTime, CPUTime.cpuTimePrecision.
|
| |
|
|
| |
Implement System.system, System.exitWith for Hugs.
|
| |
|
|
|
|
| |
Implement more of IO std library. Buffering settings,
seekery and some error-handling stuff is still missing, but the
rest is done.
|
| |
|
|
|
| |
Duh. Reinstate type variable for state token in Ref type.
Also rename to STRef since that's GHC's name for it.
|
| |
|
|
| |
Adding Makefile for Hugs lib directory.
|
| |
|
|
|
| |
Make Ref only be parameterised by the type of the mutable value,
rather than by that *and* the type of the state token.
|
| |
|
|
| |
Export Ref, newRef, readRef, writeRef from the Prelude.
|
| |
|
|
|
|
|
|
|
| |
Minor bugfixes for concurrency support in Hugs.
Evaluator.c: correctly handle case of entering a black hole.
Prelude.hs: better exception catching in forkIO and primRunIO
GC.c: (revert_dead_CAFs): don't ASSERT(0) on a dead CAF
(I don't know why this assert was there)
|
| |
|
|
|
|
| |
In hugs, implement ThreadId(..), instance Eq/Ord ThreadId,
and forkIO. Add deleteAllThreads() to scheduler so Hugs can
clean up after evaluation.
|
| |
|
|
|
| |
A version of the Prelude with some extra (primitive) functions
exported for use by various system libraries.
|
| |
|
|
|
| |
Added basic support for MVars: data MVar, and newMVar, putMVar and
getMVar.
|
| |
|
|
|
|
|
| |
Fix codegen bug causing cg028.hs to fail. namePmDouble was not bound
to anything, which caused translations of patterns containing doubles
to contain NILs. Also bound namePmInteger since it didn't seem to be
bound to anything.
|
| |
|
|
|
|
| |
minor tweaks to do with H98 (like sequence => sequence_, etc)
Removing the lib/*hs standard libs to make way for the automatically
generated ones.
|
| |
|
|
| |
Minor efficiency improvements to Prelude I/O functions.
|
| |
|
|
| |
Make foreign import and thus the Prelude work on cygwin.
|
| |
|
|
|
|
|
|
|
| |
Make platform-specific dynamic loaders add ".so", ".dll" etc to
library names, so that f-i decls can be written without them.
Modify Prelude accordingly.
Remove unused functionality in dynamic.c and make err msgs a bit
better.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add foreign import/export implementations for x86 stdcall convention.
Make parser notice calling conventions on f-i and f-x declarations,
check they are supported on the platform Hugs is compiled on. Pass
them all the way through the code generator to the interpreter.
Allow f-i/f-x decls to omit the calling convention, in which case
ccall is used. Remove calling convention from all such decls
in the Prelude so it will work on any platform.
|
| |
|
|
| |
Remove debugging export of ST(..), which causes failures in nofib.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added basic support for foreign export dynamic.
Many aspects of it are still broken:
* Only supports x86-linux.
* The range of allowable types is small: Char Int Float Double
Addr and Word.
* Adjustor thunks are never freed.
* Returning Doubles or Floats doesn't work at all.
I expect to fix some of these shortly. foreign import also
needs redoing, so it can accept any number of arguments of
any type.
Also:
* Fixed setRtsFlags in Evaluator.c to make it endian-independent.
* Fixed raisePrim in Evaluator.c so things like division by zero,
array index errors, etc, throw an exception instead of
terminating StgHugs. raisePrim is renamed makeErrorCall.
|
| |
|
|
|
| |
Firstified a few common fns for a modest performance gain,
ie, elem = any . (==) ===> directly recursive version.
|
| |
|
|
|
|
|
|
|
| |
Changes to improve runtime performance of STG Hugs.
-- Reorganisation of the evaluator (Evaluator.c).
-- Changes to code emission (Assembler.c) to support peephole opts
-- An experimental simplifier (optimise.c).
-- Many supporting bug fixes and minor changes.
-- Experimental implementation of integer for standalone hugs (sainteger.c).
|
|
|
Many improvements resulting from first attempt to run nofib suite:
-- More libraries (lib/*.hs) brought into operation
-- Prelude error handling and basic I/O improved
-- Changed bytecode immediate value fields so large constant
-- tables can be compiled
-- Fixed bugs: translation of FATBAR, negative floating point
-- literals, strict constructors, handling of CAFs
|