Permalink
Browse files

rearranging darcs repo

darcs-hash:20050518074211-33cd0-84e91280f1008f53f7e15c353901fc04d0450139
  • Loading branch information...
mchakravarty committed May 18, 2005
1 parent 7916257 commit fcddb686f027b48729f8d05cc32232b395f745b5
Showing with 0 additions and 3,171 deletions.
  1. 0 {hipar → }/AUTHORS
  2. 0 {hipar → }/COPYING
  3. 0 {hipar → }/COPYING.LIB
  4. 0 {hipar → }/INSTALL
  5. 0 {hipar → }/Makefile
  6. 0 {hipar → }/NEWS
  7. 0 {hipar → }/README
  8. 0 {hipar → }/README.CTKlight
  9. 0 {hipar → }/aclocal.m4
  10. 0 {hipar → }/base/ChangeLog
  11. 0 {hipar → }/base/Makefile
  12. 0 {hipar → }/base/TODO
  13. 0 {hipar → }/base/admin/BaseVersion.hs
  14. 0 {hipar → }/base/admin/Common.hs
  15. 0 {hipar → }/base/admin/Config.hs
  16. 0 {hipar → }/base/admin/Makefile
  17. 0 {hipar → }/base/base.build.conf.cabal.in
  18. 0 {hipar → }/base/base.build.conf.ghc-pre-6.4.in
  19. 0 {hipar → }/base/errors/Errors.hs
  20. 0 {hipar → }/base/errors/Makefile
  21. 0 {hipar → }/base/general/DLists.hs
  22. 0 {hipar → }/base/general/FNameOps.hs
  23. 0 {hipar → }/base/general/FileOps.hs
  24. 0 {hipar → }/base/general/FiniteMaps.hs
  25. 0 {hipar → }/base/general/GetOpt.hs
  26. 0 {hipar → }/base/general/Makefile
  27. 0 {hipar → }/base/general/Sets.hs
  28. 0 {hipar → }/base/general/UNames.hs
  29. 0 {hipar → }/base/general/Utils.hs
  30. 0 {hipar → }/base/general/tests/Main.hs
  31. 0 {hipar → }/base/general/tests/doubles.hs
  32. 0 {hipar → }/base/general/tests/unordered.hs
  33. 0 {hipar → }/base/graphs/Makefile
  34. 0 {hipar → }/base/graphs/Marks.hs
  35. 0 {hipar → }/base/state/CIO.hs
  36. 0 {hipar → }/base/state/DynArrays.hs
  37. 0 {hipar → }/base/state/Makefile
  38. 0 {hipar → }/base/state/State.hs
  39. 0 {hipar → }/base/state/StateBase.hs
  40. 0 {hipar → }/base/state/StateTrans.hs
  41. 0 {hipar → }/base/state/tests/Main.hs
  42. 0 {hipar → }/base/syms/Attributes.hs
  43. 0 {hipar → }/base/syms/Idents.hs
  44. 0 {hipar → }/base/syms/Makefile
  45. 0 {hipar → }/base/syms/NameSpaces.hs
  46. 0 {hipar → }/base/syms/tests/Main.hs
  47. 0 {hipar → }/base/syntax/Lexers.hs
  48. 0 {hipar → }/base/syntax/Makefile
  49. 0 {hipar → }/base/syntax/ParserMonad.hs
  50. 0 {hipar → }/base/syntax/Parsers.hs
  51. 0 {hipar → }/base/syntax/Pretty.hs
  52. 0 {hipar → }/base/syntax/tests/LexersTest.hs
  53. 0 {hipar → }/base/syntax/tests/ParsersTest.hs
  54. 0 {hipar → }/base/sysdep/Makefile
  55. 0 {hipar → }/base/sysdep/SysDepGHC3.hs
  56. 0 {hipar → }/base/sysdep/SysDepGHC4.hs
  57. 0 {hipar → }/base/sysdep/SysDepNHC1.hs
  58. 0 {hipar → }/base/sysdep/SysDepPosixAVAIL.hs
  59. 0 {hipar → }/base/sysdep/SysDepPosixUNAVAIL.hs
  60. 0 {hipar → }/c2hs/AUTHORS
  61. 0 {hipar → }/c2hs/COPYING
  62. 0 {hipar → }/c2hs/COPYING.LIB
  63. 0 {hipar → }/c2hs/ChangeLog
  64. 0 {hipar → }/c2hs/INSTALL
  65. 0 {hipar → }/c2hs/Makefile
  66. 0 {hipar → }/c2hs/README
  67. 0 {hipar → }/c2hs/TODO
  68. 0 {hipar → }/c2hs/aclocal.m4
  69. 0 {hipar → }/c2hs/c/C.hs
  70. 0 {hipar → }/c2hs/c/CAST.hs
  71. 0 {hipar → }/c2hs/c/CAttrs.hs
  72. 0 {hipar → }/c2hs/c/CBuiltin.hs
  73. 0 {hipar → }/c2hs/c/CLexer.hs
  74. 0 {hipar → }/c2hs/c/CNames.hs
  75. 0 {hipar → }/c2hs/c/CParser.hs
  76. 0 {hipar → }/c2hs/c/CPretty.hs
  77. 0 {hipar → }/c2hs/c/CTrav.hs
  78. 0 {hipar → }/c2hs/c/Makefile
  79. 0 {hipar → }/c2hs/c/tests/Main.hs
  80. 0 {hipar → }/c2hs/c/tests/declr.i
  81. 0 {hipar → }/c2hs/c/tests/simple.i
  82. 0 {hipar → }/c2hs/c/tests/struct.i
  83. 0 {hipar → }/c2hs/c/tests/typedef.i
  84. 0 {hipar → }/c2hs/c2hs-config.in
  85. 0 {hipar → }/c2hs/c2hs.conf.cabal.in
  86. 0 {hipar → }/c2hs/c2hs.conf.ghc-pre-6.4.in
  87. 0 {hipar → }/c2hs/c2hs.spec.in
  88. 0 {hipar → }/c2hs/chs/CHS.hs
  89. 0 {hipar → }/c2hs/chs/CHSLexer.hs
  90. 0 {hipar → }/c2hs/chs/Makefile
  91. 0 {hipar → }/c2hs/configure.in
  92. 0 {hipar → }/c2hs/examples/Makefile
  93. 0 {hipar → }/c2hs/examples/libghttpHS/Ghttp.chs
  94. 0 {hipar → }/c2hs/examples/libghttpHS/Makefile
  95. 0 {hipar → }/c2hs/examples/libghttpHS/ghttpHS.c
  96. 0 {hipar → }/c2hs/examples/libghttpHS/ghttpHS.h
  97. 0 {hipar → }/c2hs/gen/CInfo.hs
  98. 0 {hipar → }/c2hs/gen/GBMonad.hs
  99. 0 {hipar → }/c2hs/gen/GenBind.hs
  100. 0 {hipar → }/c2hs/gen/GenHeader.hs
  101. 0 {hipar → }/c2hs/gen/Makefile
  102. 0 {hipar → }/c2hs/lib/C2HS.hs
  103. 0 {hipar → }/c2hs/lib/C2HSBase.hs
  104. 0 {hipar → }/c2hs/lib/C2HSMarsh.hs
  105. 0 {hipar → }/c2hs/lib/Makefile
  106. 0 {hipar → }/c2hs/mk/c2hs.pck.mk
  107. 0 {hipar → }/c2hs/mk/config.mk.in
  108. 0 {hipar → }/c2hs/state/C2HSState.hs
  109. 0 {hipar → }/c2hs/state/Makefile
  110. 0 {hipar → }/c2hs/state/Switches.hs
  111. 0 {hipar → }/c2hs/tests/Calls.chs
  112. 0 {hipar → }/c2hs/tests/Cpp.chs
  113. 0 {hipar → }/c2hs/tests/Enums.chs
  114. 0 {hipar → }/c2hs/tests/Makefile
  115. 0 {hipar → }/c2hs/tests/Marsh.chs
  116. 0 {hipar → }/c2hs/tests/Pointer.chs
  117. 0 {hipar → }/c2hs/tests/Simple.chs
  118. 0 {hipar → }/c2hs/tests/Structs.chs
  119. 0 {hipar → }/c2hs/tests/calls.h
  120. 0 {hipar → }/c2hs/tests/cpp.h
  121. 0 {hipar → }/c2hs/tests/enums.c
  122. 0 {hipar → }/c2hs/tests/enums.h
  123. 0 {hipar → }/c2hs/tests/marsh.h
  124. 0 {hipar → }/c2hs/tests/pointer.c
  125. 0 {hipar → }/c2hs/tests/pointer.h
  126. 0 {hipar → }/c2hs/tests/simple.c
  127. 0 {hipar → }/c2hs/tests/simple.h
  128. 0 {hipar → }/c2hs/tests/structs.c
  129. 0 {hipar → }/c2hs/tests/structs.h
  130. 0 {hipar → }/c2hs/toplevel/C2HSConfig.hs.in
  131. 0 {hipar → }/c2hs/toplevel/Main.hs
  132. 0 {hipar → }/c2hs/toplevel/Makefile
  133. 0 {hipar → }/c2hs/toplevel/Version.hs
  134. 0 {hipar → }/c2hs/toplevel/c2hs_config.c
  135. 0 {hipar → }/c2hs/toplevel/c2hs_config.h
  136. 0 {hipar → }/config.guess
  137. 0 {hipar → }/config.sub
  138. 0 {hipar → }/configure.in
  139. 0 {hipar → }/doc/base/Makefile
  140. 0 {hipar → }/doc/base/base.bib
  141. 0 {hipar → }/doc/base/base.tex
  142. 0 {hipar → }/doc/c2hs/Makefile
  143. 0 {hipar → }/doc/c2hs/c2hs.sgml
  144. 0 {hipar → }/doc/c2hs/lib/CError.hs
  145. 0 {hipar → }/doc/c2hs/lib/CForeign.hs
  146. 0 {hipar → }/doc/c2hs/lib/CString.hs
  147. 0 {hipar → }/doc/c2hs/lib/CTypes.hs
  148. 0 {hipar → }/doc/c2hs/lib/CTypesISO.hs
  149. 0 {hipar → }/doc/c2hs/lib/Foreign.hs
  150. 0 {hipar → }/doc/c2hs/lib/ForeignPtr.hs
  151. 0 {hipar → }/doc/c2hs/lib/Int.hs
  152. 0 {hipar → }/doc/c2hs/lib/MarshalAlloc.hs
  153. 0 {hipar → }/doc/c2hs/lib/MarshalArray.hs
  154. 0 {hipar → }/doc/c2hs/lib/MarshalError.hs
  155. 0 {hipar → }/doc/c2hs/lib/MarshalUtils.hs
  156. 0 {hipar → }/doc/c2hs/lib/Ptr.hs
  157. 0 {hipar → }/doc/c2hs/lib/README
  158. 0 {hipar → }/doc/c2hs/lib/StablePtr.hs
  159. 0 {hipar → }/doc/c2hs/lib/Storable.hs
  160. 0 {hipar → }/doc/c2hs/lib/Word.hs
  161. 0 {hipar → }/doc/c2hs/man1/c2hs-config.1.in
  162. 0 {hipar → }/doc/c2hs/man1/c2hs.1.in
  163. +0 −14 hipar/base/base.build.conf.in
  164. +0 −32 hipar/base/sysdep/IOExtsNHC1.hs
  165. +0 −89 hipar/base/todo
  166. +0 −16 hipar/c2hs/c2hs.conf.in
  167. +0 −69 hipar/c2hs/lib/C2HSConfig.hs.in
  168. +0 −956 hipar/c2hs/lib/C2HSDeprecated.hs
  169. +0 −578 hipar/c2hs/lib/CError.hs.in
  170. +0 −17 hipar/c2hs/lib/CForeign.hs
  171. +0 −157 hipar/c2hs/lib/CString.hs
  172. +0 −43 hipar/c2hs/lib/ForeignPtr.hs
  173. +0 −97 hipar/c2hs/lib/MarshalAlloc.hs
  174. +0 −201 hipar/c2hs/lib/MarshalArray.hs
  175. +0 −65 hipar/c2hs/lib/MarshalError.hs
  176. +0 −148 hipar/c2hs/lib/MarshalUtils.hs
  177. +0 −32 hipar/c2hs/lib/NewStablePtr.hs.in
  178. +0 −251 hipar/c2hs/lib/NewStorable.hs.in
  179. +0 −81 hipar/c2hs/lib/Ptr.hs
  180. +0 −78 hipar/mk/c2hs.mk
  181. +0 −79 hipar/mk/dhc.mk
  182. +0 −86 hipar/mk/idl2chs.mk
  183. +0 −82 hipar/mk/nepal.mk
  184. 0 {hipar → }/install-sh
  185. 0 {hipar → }/mk/common.mk
  186. 0 {hipar → }/mk/config.mk.in
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,14 +0,0 @@
[Package
{name = "ctk",
import_dirs = [@IMPORT_DIRS@],
source_dirs = [],
library_dirs = [@LIBRARY_DIRS@],
hs_libraries = ["ctk"],
extra_libraries = [],
include_dirs = [],
c_includes = [],
package_deps = [@PACKAGES_STRINGS@],
extra_ghc_opts = [],
extra_cc_opts = [],
extra_ld_opts = []}
]
@@ -1,32 +0,0 @@
-- This is a preliminary `IOExts' substitute for nhc provided by
-- Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
module IOExtsNHC1
( IORef
, newIORef
, readIORef
, writeIORef
, fixIO
) where
import FFI
newtype IORef a = IORef (StablePtr a)
newIORef :: a -> IO (IORef a)
newIORef a = makeStablePtr a >>= return . IORef
readIORef :: IORef a -> IO a
readIORef (IORef r) = deRefStablePtr r
foreign import "stableCopy"
overwriteStablePtr :: StablePtr a -> StablePtr a -> IO ()
writeIORef :: IORef a -> a -> IO ()
writeIORef (IORef r) a = do
s <- makeStablePtr a
overwriteStablePtr r s
freeStablePtr s
fixIO :: (a -> IO a) -> IO a
fixIO f = let x = unsafePerformIO (f x) in return x
View
@@ -1,89 +0,0 @@
-*-text-*-
Compiler Base TODO
==================
Next: + improve autoconf (we would like ./configure to generate its stuff in
the build tree - at least for C->HS - but the tree usually doesn't
exist when ./configure is run)
Define __HASKELL__=98 and __HASKELL98__ as preprocessor macros for
all Haskell 98 compilers.
+ The configure patched file should arguably be generated in the build/
tree and not in the source tree.
+ Export `DList.DList' without (..)
Short Term:
~~~~~~~~~~~
* See general/UNames.hs for nhc98 induced ugliness; change when nhc98 is fixed
* Lexers: For unicode `Char', we need to explicit support for positive and
negated ranges such as ['\0'..'\255'] and ['\0'..'\255'] \\ ['a'..'c'],
where the latter is usually written [^abc] (see the haskell-cafe
discussion).
* Roman introduced the class `Printable'. A general class based pretty-print
system would be nice.
* Parsers: Roman had the idea of allowing boolean functions to disambiguate
the parse table where two rules cannot be distinguished by the usual LL
mechanism alone (see emails).
* Identifiers in any of the intermediate languages that have the same lexeme as
a keyword or a predefined identifier should always been pretty-printed in
their quoted form.
Difficult to know for each IL which identifiers have to be treated specially.
We need a kind of IL-dependent exception list.
Middle Term:
~~~~~~~~~~~~
* Use a different attribute mechanism. The stuff started for the flatten
prototype looks quite promising. Observations:
- Current hipar system with a unique in every node => makes it complicated
to construct/transform trees, as we always have to clone subtress in a
monad.
- GHC's system => when attributes of an identifier are updated, the
"new" identifiers have to substituted into all expression that contain
usage occurences.
* Graph processing support: Does it need to be a new mechanism or can we
realise it via Attrs (what kind of generic functions could we provide). One
possibility is the use of an `Bool' attribute used to implement fast sets
(eg, marking). (If there is a lot of marking, we might want to realise
indexing with attributes via hashing to be able to work with sparse keys and
to already have O(1) during attribute table construction.)
* `FiniteMap' should be an instance of `Functior' with `fmap = mapFM'
* configuration shouldn't be in
* FNameOps, FileOps: Introduce an autoconf set variable that determines
whether "/" or "\" is used as a delimiter in paths
* Lexers: * After a certain number of errors (say 50); abort lexing.
* Parsers (maybe similar problem with Lexers): If the grammar is not LL(1), we
just get an `ambiguous grammar' error message at runtime without any hint,
which part of the grammer might be ambiguous. This is too hard to debug!
* In the language-specific `XXXAttrs.hs' modules, the routines for handling
the different on the attribute tables have always the same structure; Only
the access to the `AttrXXX' datatype is different. It should be possible to
generalize them.
Moreover, the `referring identifier information' is always needed and might
be generalized.
* The handling of state could be improved by revising the state modules and
using constructor classes and monad transformers.
Currently, we only define the state type abstractly when generating a new
instance of `CST'. This is in order to be able to use the generic
operations, such as I/O, also in the monad instance. But this comprises the
security of the monad encapsulation as also the generic functions that allow
to extract and copy the state can be used. Ideally, we want to lift generic
operations like I/O automagically into the new monad and to protect it from
access to its state. Furthermore, some support for stripping and attaching
of the type-tag (intro with `newtype') would be nice.
View
@@ -1,16 +0,0 @@
[
Package {
name = "c2hs",
import_dirs = ["@LIBDIR@/c2hs-@C2HS_VERSION@/@SYS@/import"],
source_dirs = [],
library_dirs = ["@LIBDIR@/c2hs-@C2HS_VERSION@/@SYS@"],
hs_libraries = ["c2hs"],
extra_libraries = [],
include_dirs = [],
c_includes = [],
package_deps = ["haskell98"],
extra_ghc_opts = ["-ffi"],
extra_cc_opts = [],
extra_ld_opts = []
}
]
@@ -1,69 +0,0 @@
-- -*-haskell-*-
-- ** @configure_input@ **
-- ===========================================================================
-- C->Haskell Compiler: Configuration of the marshalling library
--
-- Author : Manuel M. T. Chakravarty
-- Created: 28 August 99
--
-- Version $Revision: 1.4 $ from $Date: 2000/04/09 10:15:57 $
--
-- Copyright (c) [1999..2000] Manuel M. T. Chakravarty
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Library General Public
-- License as published by the Free Software Foundation; either
-- version 2 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Library General Public License for more details.
--
--- DESCRIPTION ---------------------------------------------------------------
--
-- This module contains the configuration (mapping of external types to
-- Haskell types etc) of the C2HS marshaling library.
--
-- Definitions largely determined by `configure'.
--
--- DOCU ----------------------------------------------------------------------
--
-- language: Haskell 98
--
-- The details for `char' are hardcoded, because they cannot change.
--
--- TODO ----------------------------------------------------------------------
--
module C2HSConfig (CChar, CUChar, CSChar, CInt, CSInt, CLInt, CLLInt, CUInt,
CUSInt, CULInt, CULLInt, CFloat, CDouble, CLDouble,
sizeofFloat, sizeofDouble, sizeofAddr)
where
import Int
import Word
-- type mapping of C basic types to Haskell
--
type CChar = @HS_TYPEOF_CHAR@
type CUChar = Char -- this is a bit dangerous (Unicode)
type CSChar = Int8
type CInt = @HS_TYPEOF_INT@
type CSInt = @HS_TYPEOF_SHORT_INT@
type CLInt = @HS_TYPEOF_LONG_INT@
type CLLInt = @HS_TYPEOF_LONG_LONG_INT@
type CUInt = @HS_TYPEOF_UNSIGNED_INT@
type CUSInt = @HS_TYPEOF_UNSIGNED_SHORT_INT@
type CULInt = @HS_TYPEOF_UNSIGNED_LONG_INT@
type CULLInt = @HS_TYPEOF_UNSIGNED_LONG_LONG_INT@
type CFloat = @HS_TYPEOF_FLOAT@
type CDouble = @HS_TYPEOF_DOUBLE@
type CLDouble = @HS_TYPEOF_LONG_DOUBLE@
-- size information
--
sizeofFloat, sizeofDouble, sizeofAddr :: Int
sizeofFloat = @SIZEOF_FLOAT@
sizeofDouble = @SIZEOF_DOUBLE@
sizeofAddr = @SIZEOF_VOID_P@
Oops, something went wrong.

0 comments on commit fcddb68

Please sign in to comment.