Mon Mar 31 07:28:01 EDT 2008 Samuel Bronson * Fix kind inference + test Also, comment out the case in kindOf that makes things look fine when they aren't -- unless of course * isn't the right kind Mon Mar 31 11:18:39 EDT 2008 Samuel Bronson * Work around type inference bug relating to main (I didn't do it!) Fri Mar 21 00:29:22 EDT 2008 Samuel Bronson * Split TArrows where appropriate Thu Mar 20 16:42:02 EDT 2008 Samuel Bronson * Actually define (->)... Thu Apr 3 16:53:48 EDT 2008 Samuel Bronson * Fix type inference for (->) Tue Mar 18 18:43:45 EDT 2008 Samuel Bronson * Add Control.Monad.Instances to base package Tue Mar 18 18:56:40 EDT 2008 Samuel Bronson * Add Control.Category Thu Mar 20 17:33:26 EDT 2008 Samuel Bronson * Make Control.Category actually not import Prelude... New patches: [Fix kind inference + test Samuel Bronson **20080331112801 Also, comment out the case in kindOf that makes things look fine when they aren't -- unless of course * isn't the right kind ] { adddir ./regress/tests/5_types hunk ./FrontEnd/Class.hs 312 qtToClassHead :: KindEnv -> HsQualType -> ([Pred],(Name,[Type])) -qtToClassHead kt (HsQualType cntx (HsTyApp (HsTyCon className) ty)) = (map (hsAsstToPred kt) cntx,(toName ClassName className,[runIdentity $ hsTypeToType kt ty])) +qtToClassHead kt qt@(HsQualType cntx (HsTyApp (HsTyCon className) ty)) = + trace ("qtToClassHead" <+> show qt) $ + let res = (map (hsAsstToPred kt) cntx,(toName ClassName className, + [runIdentity $ hsTypeToType (kiHsQualType kt (HsQualType cntx (HsTyTuple []))) ty])) + in trace ("=" <+> show res) res createClassAssocs kt decls = [ (ctc n,map ct as,ctype t)| HsTypeDecl { hsDeclName = n, hsDeclTArgs = as, hsDeclType = t } <- decls ] where ctc n = let nn = toName TypeConstructor n in Tycon nn (kindOf nn kt) hunk ./FrontEnd/KindInfer.hs 12 KindEnv(), hsQualTypeToSigma, hsAsstToPred, + kiHsQualType, kindOfClass, kindOf, restrictKindEnv, hunk ./FrontEnd/KindInfer.hs 179 constrain KindAny k = return () constrain KindStar (KBase Star) = return () constrain KindQuest k@KBase {} = kindCombine kindFunRet k >> return () -constrain KindQuestQuest (KBase KQuest) = fail "cannot constraint ? to be ??" +constrain KindQuestQuest (KBase KQuest) = fail "cannot constrain ? to be ??" constrain KindQuestQuest k@KBase {} = kindCombine kindArg k >> return () constrain KindSimple (KBase Star) = return () constrain KindSimple (a `Kfun` b) = do hunk ./FrontEnd/KindInfer.hs 290 unify k kv kiType k (HsTyCon v) = do kv <- lookupKind KindAny (toName TypeConstructor v) - unify k kv + unify k kv kiType k HsTyAssoc = do constrain KindSimple k kiType _ HsTyEq {} = error "kiType.HsTyEq" hunk ./FrontEnd/KindInfer.hs 433 kindOf :: Name -> KindEnv -> Kind kindOf name KindEnv { kindEnv = env } = case Map.lookup name env of - Nothing | nameType name `elem` [TypeConstructor,TypeVal] -> kindStar +-- Nothing | nameType name `elem` [TypeConstructor,TypeVal] -> kindStar Just k -> k _ -> error $ "kindOf: could not find kind of : " ++ show (nameType name,name) hunk ./FrontEnd/KindInfer.hs 496 -- = IsIn className (TVar $ Tyvar varName (kindOf varName kt)) | isConstructorLike (hsIdentString . hsNameIdent $ varName) = IsIn (toName ClassName className) (TCon (Tycon (toName TypeConstructor varName) (head $ kindOfClass (toName ClassName className) kt))) | otherwise = IsIn (toName ClassName className) (TVar $ tyvar (toName TypeVal varName) (head $ kindOfClass (toName ClassName className) kt)) -hsAsstToPred kt (HsAsstEq t1 t2) = IsEq (runIdentity $ hsTypeToType kt t1) (runIdentity $ hsTypeToType kt t2) +hsAsstToPred kt (HsAsstEq t1 t2) = IsEq (runIdentity $ hsTypeToType' kt t1) (runIdentity $ hsTypeToType' kt t2) hunk ./FrontEnd/KindInfer.hs 503 hsQualTypeToSigma kt qualType = hsQualTypeToType kt (Just []) qualType hsTypeToType :: Monad m => KindEnv -> HsType -> m Type -hsTypeToType kt t = return $ hoistType $ aHsTypeToType kt t -- (forallHoist t) +hsTypeToType kt t = return $ unsafePerformIO $ runKI kt $ + do kv <- newKindVar KindAny + kiType (KVar kv) t + kt' <- postProcess =<< getEnv + hsTypeToType' kt' t + + +hsTypeToType' :: Monad m => KindEnv -> HsType -> m Type +hsTypeToType' kt t = return $ hoistType $ aHsTypeToType kt t -- (forallHoist t) hsQualTypeToType :: Monad m => KindEnv -- ^ the kind environment hunk ./FrontEnd/KindInfer.hs 521 hsQualTypeToType kindEnv qs qualType = return $ hoistType $ tForAll quantOver ( ps' :=> t') where newEnv = kiHsQualType kindEnv qualType --newEnv = kindEnv - Just t' = hsTypeToType newEnv (hsQualTypeType qualType) + Just t' = hsTypeToType' newEnv (hsQualTypeType qualType) ps = hsQualTypeHsContext qualType ps' = map (hsAsstToPred newEnv) ps quantOver = nub $ freeVars ps' ++ fvs hunk ./FrontEnd/Tc/Main.hs 17 import Doc.DocLike import Doc.PPrint as PPrint import FrontEnd.Desugar(doToExp) -import FrontEnd.KindInfer +import FrontEnd.KindInfer(hsQualTypeToSigma,hsTypeToType) import FrontEnd.SrcLoc import FrontEnd.Tc.Class import FrontEnd.Tc.Monad hiding(listenPreds) hunk ./FrontEnd/Tc/Module.hs 23 import FrontEnd.Desugar import FrontEnd.Exports import FrontEnd.Infix -import FrontEnd.KindInfer +import FrontEnd.KindInfer (kiDecls, restrictKindEnv) import FrontEnd.Rename import FrontEnd.Tc.Main import FrontEnd.Tc.Monad addfile ./regress/tests/5_types/kinds.hs hunk ./regress/tests/5_types/kinds.hs 1 +class Arrow a where + arr :: (b -> c) -> a b c + (>>>) :: a b c -> a c d -> a b d + +newtype Kleisli m a b = Kleisli { runKleisli :: a -> m b } + +instance Monad m => Arrow (Kleisli m) where + arr f = Kleisli (return . f) + Kleisli f >>> Kleisli g = Kleisli (\x -> f x >>= g) hunk ./regress/tests/5_types/kinds.hs 11 +main = return () + } [Work around type inference bug relating to main (I didn't do it!) Samuel Bronson **20080331151839] hunk ./regress/tests/5_types/kinds.hs 11 arr f = Kleisli (return . f) Kleisli f >>> Kleisli g = Kleisli (\x -> f x >>= g) -main = return () +main = putStrLn "hi!" +-- main = return () [Split TArrows where appropriate Samuel Bronson **20080321042922] { hunk ./FrontEnd/Representation.hs 30 fromTAp, fromTArrow, tassocToAp, + splitTAp_maybe, MetaVar(..), tTTuple, tTTuple', hunk ./FrontEnd/Representation.hs 34 - tList + tList, + tArrow, + tAp )where hunk ./FrontEnd/Representation.hs 99 tList = TCon (Tycon tc_List (Kfun kindStar kindStar)) +tArrow = TCon (Tycon tc_Arrow (kindArg `Kfun` kindFunRet `Kfun` kindStar)) + instance Eq Type where (TVar a) == (TVar b) = a == b (TMetaVar a) == (TMetaVar b) = a == b hunk ./FrontEnd/Representation.hs 109 (TArrow a' a) == (TArrow b' b) = a' == b' && b == a _ == _ = False +tAp (TAp c@TCon{} a) b | c == tArrow = TArrow a b +tAp a b = TAp a b + tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl TAp (TCon con) (cas ++ eas) -- Unquantified type variables hunk ./FrontEnd/Representation.hs 324 fromTAp t = f t [] where f (TAp a b) rs = f a (b:rs) + f (TArrow a b) rs = f tArrow (a:b:rs) f t rs = (t,rs) hunk ./FrontEnd/Representation.hs 327 +splitTAp_maybe :: Type -> Maybe (Type, Type) +splitTAp_maybe (TAp a b) = Just (a, b) +splitTAp_maybe (TArrow a b) = Just (TAp tArrow a, b) +splitTAp_maybe t = Nothing + fromTArrow t = f t [] where f (TArrow a b) rs = f b (a:rs) f t rs = (reverse rs,t) hunk ./FrontEnd/Tc/Kind.hs 75 | KVar Kindvar -- variables aren't really allowed in haskell in kinds deriving(Eq, Ord) -- but we need them for kind inference {-! derive: Binary !-} + +infixr `Kfun` KBase kb `isSubsumedBy` KBase kb' = isSubsumedBy2 kb kb' Kfun k1 k2 `isSubsumedBy` Kfun k1' k2' = isSubsumedBy k1 k1' && isSubsumedBy k2 k2' hunk ./FrontEnd/Tc/Type.hs 20 followTaus, fromTAp, fromTArrow, + splitTAp_maybe, module FrontEnd.Tc.Type, prettyPrintType, readMetaVar, hunk ./FrontEnd/Tc/Type.hs 26 tForAll, tList, + tArrow, + tAp, Constraint(..), applyTyvarMap, Class(), hunk ./FrontEnd/Tc/Unify.hs 212 return False - bm (TAp a b) (TAp c d) = do + bm t1 t2 | Just (a, b) <- splitTAp_maybe t1, Just (c, d) <- splitTAp_maybe t2 = do printRule "APP" a `boxyMatch` c b `boxyMatch` d } [Actually define (->)... Samuel Bronson **20080320204202] merger 0.0 ( hunk ./lib/base/Jhc/Basics.hs 7 +data (->) :: ?? -> ? -> * hunk ./lib/base/Jhc/Basics.hs 7 +data (->) :: ?? -> ? -> * ) [Fix type inference for (->) Samuel Bronson **20080403205348] { hunk ./FrontEnd/Class.hs 298 -- the types will only ever be constructors or vars convType :: [(HsType, Kind)] -> Type -convType tsks = foldl1 TAp (map toType tsks) +convType tsks = foldl1 tAp (map toType tsks) toType :: (HsType, Kind) -> Type toType (HsTyCon n, k) = TCon $ Tycon (toName TypeConstructor n) k hunk ./FrontEnd/DataConsAssump.hs 55 where typeName' = toName TypeConstructor typeName typeKind = kindOf typeName' kt - resultType = foldl TAp tycon argVars + resultType = foldl tAp tycon argVars tycon = TCon (Tycon typeName' typeKind) argVars = map fromHsNameToTyVar $ zip argKinds args argKinds = init $ unfoldKind typeKind hunk ./FrontEnd/DataConsAssump.hs 69 where typeName' = toName TypeConstructor typeName typeKind = kindOf typeName' kt - resultType = foldl TAp tycon argVars + resultType = foldl tAp tycon argVars tycon = TCon (Tycon typeName' typeKind) argVars = map fromHsNameToTyVar $ zip argKinds args argKinds = init $ unfoldKind typeKind hunk ./FrontEnd/KindInfer.hs 463 aHsTypeToType kt HsTyExpKind { hsTyType = t } = aHsTypeToType kt t aHsTypeToType kt tuple@(HsTyTuple types) = tTTuple $ map (aHsTypeToType kt) types aHsTypeToType kt tuple@(HsTyUnboxedTuple types) = tTTuple' $ map (aHsTypeToType kt) types -aHsTypeToType kt (HsTyApp t1 t2) = TAp (aHsTypeToType kt t1) (aHsTypeToType kt t2) +aHsTypeToType kt (HsTyApp t1 t2) = tAp (aHsTypeToType kt t1) (aHsTypeToType kt t2) -- variables, we must know the kind of the variable here! hunk ./FrontEnd/Representation.hs 112 tAp (TAp c@TCon{} a) b | c == tArrow = TArrow a b tAp a b = TAp a b -tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl TAp (TCon con) (cas ++ eas) +tassocToAp TAssoc { typeCon = con, typeClassArgs = cas, typeExtraArgs = eas } = foldl tAp (TCon con) (cas ++ eas) -- Unquantified type variables hunk ./FrontEnd/Representation.hs 324 fromTAp t = f t [] where f (TAp a b) rs = f a (b:rs) - f (TArrow a b) rs = f tArrow (a:b:rs) + f (TArrow a b) rs = f (tAp tArrow a) (b:rs) f t rs = (t,rs) splitTAp_maybe :: Type -> Maybe (Type, Type) hunk ./FrontEnd/Representation.hs 329 splitTAp_maybe (TAp a b) = Just (a, b) -splitTAp_maybe (TArrow a b) = Just (TAp tArrow a, b) +splitTAp_maybe (TArrow a b) = Just (tAp tArrow a, b) splitTAp_maybe t = Nothing fromTArrow t = f t [] where hunk ./FrontEnd/Tc/Main.hs 263 localEnv env $ do s2' <- evalType s2' lamPoly ps e s2' (p':rs) -- TODO poly + lam (p:ps) e t@(TAp (TAp (TMetaVar mv) s1') s2') rs = do + boxyMatch (TMetaVar mv) tArrow + (p',env) <- tcPat p s1' + localEnv env $ do + s2' <- evalType s2' + lamPoly ps e s2' (p':rs) -- TODO poly lam [] e typ rs = do e' <- tcExpr e typ return (HsLambda sloc (reverse rs) e') hunk ./FrontEnd/Tc/Monad.hs 274 inst:: Map.Map Int Type -> Map.Map Atom Type -> a -> a instance Instantiate Type where - inst mm ts (TAp l r) = TAp (inst mm ts l) (inst mm ts r) + inst mm ts (TAp l r) = tAp (inst mm ts l) (inst mm ts r) inst mm ts (TArrow l r) = TArrow (inst mm ts l) (inst mm ts r) inst mm _ t@TCon {} = t inst mm ts (TVar tv ) = case Map.lookup (tyvarAtom tv) ts of hunk ./FrontEnd/Tc/Monad.hs 370 tell [(t,b)] return b f e@TCon {} _ = return e - f (TAp a b) vs = liftM2 TAp (f a vs) (f b vs) + f (TAp a b) vs = liftM2 tAp (f a vs) (f b vs) f (TArrow a b) vs = liftM2 TArrow (f a vs) (f b vs) f (TForAll as (ps :=> t)) vs = do t' <- f t (vs List.\\ as) hunk ./FrontEnd/Tc/Type.hs 269 tickleM f (IsEq t1 t2) = return IsEq `ap` f t1 `ap` f t2 instance Tickleable Type Type where - tickleM f (TAp l r) = return TAp `ap` f l `ap` f r + tickleM f (TAp l r) = return tAp `ap` f l `ap` f r tickleM f (TArrow l r) = return TArrow `ap` f l `ap` f r tickleM f (TAssoc c cas eas) = return (TAssoc c) `ap` mapM f cas `ap` mapM f eas tickleM f (TForAll ta (ps :=> t)) = do hunk ./FrontEnd/Tc/Unify.hs 169 bm a (TMetaVar mv) | (TCon ca,as) <- fromTAp a = do printRule $ "CEQ1: " ++ prettyPrintType a a <- occursCheck mv a - withMetaVars mv (map getType as) (\ ts -> foldl TAp (TCon ca) ts) $ \ ts -> + withMetaVars mv (map getType as) (\ ts -> foldl tAp (TCon ca) ts) $ \ ts -> sequence_ [ boxyMatch a t | t <- ts | a <- as ] return False hunk ./FrontEnd/Tc/Unify.hs 177 --printRule $ "CEQ1: " ++ pprint a let xxs = x:xs a <- occursCheck mv a - withMetaVars mv (map getType xxs) (\ (t:ts) -> foldl TAp t ts) $ \ ts -> + withMetaVars mv (map getType xxs) (\ (t:ts) -> foldl tAp t ts) $ \ ts -> sequence_ [ boxyMatch a t | t <- ts | a <- xxs ] return False hunk ./lib/base/Jhc/Basics.hs 7 import Jhc.Prim import Jhc.Int +data (->) :: ?? -> ? -> * data Integer type String = [Char] addfile ./regress/tests/5_types/ArrowMonad.hs hunk ./regress/tests/5_types/ArrowMonad.hs 1 +{-# JHC_OPTIONS -N #-} + +import Jhc.Basics hiding (id) +import Jhc.Monad +import Jhc.IO + +import Control.Category + +-- | The basic arrow class. +-- Any instance must define either 'arr' or 'pure' (which are synonyms), +-- as well as 'first'. The other combinators have sensible +-- default definitions, which may be overridden for efficiency. + +class Category a => Arrow a where + + -- | Lift a function to an arrow: you must define either this + -- or 'pure'. + arr :: (b -> c) -> a b c + arr = pure + + -- | A synonym for 'arr': you must define one or other of them. + pure :: (b -> c) -> a b c + pure = arr + + -- | Send the first component of the input through the argument + -- arrow, and copy the rest unchanged to the output. + first :: a b c -> a (b,d) (c,d) + + -- | A mirror image of 'first'. + -- + -- The default definition may be overridden with a more efficient + -- version if desired. + second :: a b c -> a (d,b) (d,c) + second f = arr swap >>> first f >>> arr swap + where swap ~(x,y) = (y,x) + + -- | Split the input between the two argument arrows and combine + -- their output. Note that this is in general not a functor. + -- + -- The default definition may be overridden with a more efficient + -- version if desired. + (***) :: a b c -> a b' c' -> a (b,b') (c,c') + f *** g = first f >>> second g + + -- | Fanout: send the input to both argument arrows and combine + -- their output. + -- + -- The default definition may be overridden with a more efficient + -- version if desired. + (&&&) :: a b c -> a b c' -> a b (c,c') + f &&& g = arr (\b -> (b,b)) >>> f *** g + + +-- Ordinary functions are arrows. + +instance Arrow (->) where + arr f = f + first f = f *** id + second f = id *** f +-- (f *** g) ~(x,y) = (f x, g y) +-- sorry, although the above defn is fully H'98, nhc98 can't parse it. + (***) f g ~(x,y) = (f x, g y) + + +-- | Some arrows allow application of arrow inputs to other inputs. + +class Arrow a => ArrowApply a where + app :: a (a b c, b) c + +instance ArrowApply (->) where + app (f,x) = f x + +-- | The 'ArrowApply' class is equivalent to 'Monad': any monad gives rise +-- to a 'Kleisli' arrow, and any instance of 'ArrowApply' defines a monad. + +newtype ArrowApply a => ArrowMonad a b = ArrowMonad (a () b) + +instance ArrowApply a => Monad (ArrowMonad a) where + return x = ArrowMonad (arr (\z -> x)) + ArrowMonad m >>= f = ArrowMonad (m >>> + arr (\x -> let ArrowMonad h = f x in (h, ())) >>> + app) + +-- this program doesn't actually *do* anything; it's just supposed to typecheck +main :: IO () +main = return () } [Add Control.Monad.Instances to base package Samuel Bronson **20080318224345] { adddir ./lib/base/Control/Monad addfile ./lib/base/Control/Monad/Instances.hs hunk ./lib/base/Control/Monad/Instances.hs 1 +{-# OPTIONS_NHC98 --prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : Control.Monad.Instances +-- Copyright : (c) The University of Glasgow 2001 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- 'Functor' and 'Monad' instances for @(->) r@ and +-- 'Functor' instances for @(,) a@ and @'Either' a@. + +module Control.Monad.Instances (Functor(..),Monad(..)) where + +import Prelude + +instance Functor ((->) r) where + fmap = (.) + +instance Monad ((->) r) where + return = const + f >>= k = \ r -> k (f r) r + +instance Functor ((,) a) where + fmap f (x,y) = (x, f y) + +instance Functor (Either a) where + fmap _ (Left x) = Left x + fmap f (Right y) = Right (f y) hunk ./lib/base/base.cabal 6 Extensions: ForeignFunctionInterface Exposed-Modules: Control.Exception, Control.Monad, + Control.Monad.Instances, Data.Array, Data.Char, Data.Complex, } [Add Control.Category Samuel Bronson **20080318225640] { addfile ./lib/base/Control/Category.hs hunk ./lib/base/Control/Category.hs 1 +{-# JHC_OPTIONS -fcpp #-} +----------------------------------------------------------------------------- +-- | +-- Module : Control.Category +-- Copyright : (c) Ashley Yakeley 2007 +-- License : BSD-style (see the LICENSE file in the distribution) +-- +-- Maintainer : ashley@semantic.org +-- Stability : experimental +-- Portability : portable + +-- http://hackage.haskell.org/trac/ghc/ticket/1773 + +module Control.Category where + +import Prelude hiding (id,(.)) +import qualified Prelude + +infixr 9 . +infixr 1 >>>, <<< + +-- | A class for categories. +-- id and (.) must form a monoid. +class Category cat where + -- | the identity morphism + id :: cat a a + + -- | morphism composition + (.) :: cat b c -> cat a b -> cat a c + +{-# RULES + "identity/left" forall p . + id . p = p + "identity/right" forall p . + p . id = p + "association" forall p q r . + (p . q) . r = p . (q . r) + #-} + +instance Category (->) where + id = Prelude.id +#ifndef __HADDOCK__ +-- Haddock 1.x cannot parse this: + (.) = (Prelude..) +#endif + +-- | Right-to-left composition +(<<<) :: Category cat => cat b c -> cat a b -> cat a c +(<<<) = (.) + +-- | Left-to-right composition +(>>>) :: Category cat => cat a b -> cat b c -> cat a c +f >>> g = g . f hunk ./lib/base/base.cabal 7 Exposed-Modules: Control.Exception, Control.Monad, Control.Monad.Instances, + Control.Category, Data.Array, Data.Char, Data.Complex, } [Make Control.Category actually not import Prelude... Samuel Bronson **20080320213326] hunk ./lib/base/Control/Category.hs 16 module Control.Category where -import Prelude hiding (id,(.)) -import qualified Prelude +import Jhc.Basics hiding (id,(.)) +import qualified Jhc.Basics as Prelude infixr 9 . infixr 1 >>>, <<< Context: [fix conflicts in Name.Names John Meacham **20080326092848] [rearrange libraries some, move RULES to more logical places John Meacham **20080326092814] [allow 'non-decreasing indentation' John Meacham **20080326092755] [Improve (->) situation somewhat Samuel Bronson **20080318033431 Control.Arrow still won't quite work... something about Control.Arrow.172_a not getting a kind inferred... ] [Remove duplicate case in kiType Samuel Bronson **20080317200547] [TAG eogmidkiv John Meacham **20080324121616] [add fibbonacci regression test John Meacham **20080324080332] [devolve devolved functions in grin John Meacham **20080324080252] [follow aliases to find basic types when converting to grin John Meacham **20080324070256] [add derived enum testing regression test John Meacham **20080324063054] [redo deriving of enumeration types John Meacham **20080324031110] [clean up warnings John Meacham **20080324014415] [add '--stale' option to force certain modules to be considered stale John Meacham **20080323235746] [make enums only 16 bits so they can be stored in sptr's directly John Meacham **20080323045845] [add basic support for the LANGUAGE pragma John Meacham **20080323031324] [add support for 30 bit Int's controlled with the -ffull-int flag. fix conversion functions for signed types John Meacham **20080323012213] [allow characters to be stored in the sptr_t directly, print them out nicely in the source code when possible John Meacham **20080322232116] [add support for storing small integer values directly in nodes. John Meacham **20080322225801] [make convertVal a local definition, start adding support for embedded primitives John Meacham **20080322214028] [add ToCmmTy class and some utility routines John Meacham **20080322214015] [add Data.Array.Unboxed and Data.Array.IO John Meacham **20080322194002] [fix m4 generated storable instances John Meacham **20080322004135] [clean up primitive operation peephole optimization code a bunch John Meacham **20080322000405] [add Cmm/ directory, clean up module names John Meacham **20080321210128] [code cleanups, add a 'BitsUnknown' class to types John Meacham **20080321202104] [TAG waxtoandyevi John Meacham **20080320232104] [add comments to conversion functions in C.Op, add B2B reinterpret cast coversion John Meacham **20080320182452] [Oops... left out one of the most important parts of -dsquare-stats Samuel Bronson **20080320192134] [add Unsafe.Coerce John Meacham **20080320153419] [add storable instances for float and double. expose Addr data constructor John Meacham **20080319211009] [add m4 files to those searched by gsource John Meacham **20080319210920] [get rid of old hardcoded tBox type John Meacham **20080319193358] [Add -dsquare-stats option for terminals with poor character coverage Samuel Bronson **20080320034832] [Layout wibble. Lemmih **20080319154848] [Print '[ X of N ] name' for each module. Lemmih **20080319154602] [Be less noisy when not in verbose mode. Lemmih **20080319154404] [make showing of jhc core a bit more compact John Meacham **20080317152907] [fix option for BOEHM garbage collector John Meacham **20080314232909] [clean up C code generator just a bit John Meacham **20080313184924] [rearrange structure in generated c code to make them more compact and group GC followed pointers together John Meacham **20080313182657] [add alignment constraints to structures, clean up and annotate more of the rts John Meacham **20080313170334] [add code to track number of allocations of each size. John Meacham **20080313114637] [clean up memory allocation code in rts, do out of memory checking always. John Meacham **20080313103902] [move rts stuff to subdirectory John Meacham **20080313004150] [code cleanups John Meacham **20080313003743] [add some annotation to C expressions to allow the code generator to clean things up some, do a pass replacing all unused vars with v0, modify C.FromGrin to handle v0 properly, not trying to assign to it. John Meacham **20080312224356] [separate declarations of c varaiables from their uses, push variable declarations inwards in c code John Meacham **20080312134931] [remove some warningns in generate, sort local variable declarations, add more warnings checks on generated c code, don't assign to unused vars bound in case statements John Meacham **20080312131000] [Doesn't quite work Samuel Bronson **20080315202515] [Class aliases halfway done? Samuel Bronson **20080315015152] [Jhc.IOArray module implementing extremely basic IOArray functionality Samuel Bronson **20080316233339] [Fix parsing of @ patterns so that Data.HashTable parses Samuel Bronson **20080316232916] [clean out old IORef code now that we use Alloc and Index John Meacham **20080312233220] [fill out System.IO routines John Meacham **20080312045536] [when generating an 'if' statement, compare pointers directly when possible. John Meacham **20080312031931] [add code generation for FPwr and FAtan2 John Meacham **20080312031859] [perform casting of return values of c calls to avoid spurious warnings from c compiler John Meacham **20080311181707] [Convenience command :recompile for GHCi usage; accompanying Makefile.am changes Samuel Bronson **20080312220054] [modify hashconster to know we don't need to allocate nodes that have no fields, modify code to always emit heap-less nodes when the node has no arguments John Meacham **20080311170446] [don't create constant entries in memory when they can be encoded in a sptr_t John Meacham **20080311010726] [don't store nodes that consist solely of a 'WHAT' field on the heap, encode it directly into the wptr_t. John Meacham **20080310170229] [add flag to C types to say whether the garbage collector might be interested in them. add macros for getting at the 'what' field. John Meacham **20080310124540] [add documentation of run time system to the manual John Meacham **20080310101340] [change function pointer representation so the GC can tell whether to follow pointers. John Meacham **20080308014755] [update datestamp John Meacham **20080309042215] [Misc. comments Samuel Bronson **20080308164934] [TAG frinredvos John Meacham **20080307160355] Patch bundle hash: d8020d8e6bdae835ebf004009f4bf1c978074204