diff options
| author | sof <unknown> | 1999-10-25 13:21:16 +0000 |
|---|---|---|
| committer | sof <unknown> | 1999-10-25 13:21:16 +0000 |
| commit | bd3fdabc98a87e7ebf124e9c26f6a7f89cb214e1 (patch) | |
| tree | ed241c2019be9c93da902d4830edeefbf7ec7654 /ghc/compiler/codeGen | |
| parent | 148227dc4e67d89a2036251ef3ad72fed1e44c0f (diff) | |
| download | haskell-bd3fdabc98a87e7ebf124e9c26f6a7f89cb214e1.tar.gz | |
[project @ 1999-10-25 13:20:57 by sof]
FFI wibble:
* disallow the use of {Mutable}ByteArrays in 'safe' foreign imports.
* ensure that ForeignObjs live across a _ccall_GC_.
Diffstat (limited to 'ghc/compiler/codeGen')
| -rw-r--r-- | ghc/compiler/codeGen/CgExpr.lhs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ghc/compiler/codeGen/CgExpr.lhs b/ghc/compiler/codeGen/CgExpr.lhs index e76289892a..0fca2d3e57 100644 --- a/ghc/compiler/codeGen/CgExpr.lhs +++ b/ghc/compiler/codeGen/CgExpr.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgExpr.lhs,v 1.29 1999/06/28 16:29:45 simonpj Exp $ +% $Id: CgExpr.lhs,v 1.30 1999/10/25 13:21:16 sof Exp $ % %******************************************************** %* * @@ -139,6 +139,14 @@ cgExpr (StgCon (PrimOp TagToEnumOp) [arg] res_ty) (\ sequel -> mkDynamicAlgReturnCode tycon dyn_tag sequel) where dyn_tag = CTemp (mkBuiltinUnique 0) IntRep + -- + -- if you're reading this code in the attempt to figure + -- out why the compiler panic'ed here, it is probably because + -- you used tagToEnum# in a non-monomorphic setting, e.g., + -- intToTg :: Enum a => Int -> a ; intToTg (I# x#) = tagToEnum# x# + -- + -- That won't work. + -- (Just (tycon,_)) = splitTyConApp_maybe res_ty |
