Skip to content

Commit

Permalink
Merge branch 'master' into fix#5464
Browse files Browse the repository at this point in the history
  • Loading branch information
dreixel committed Oct 4, 2011
2 parents acc2451 + ec436fe commit 3f50b5b
Show file tree
Hide file tree
Showing 106 changed files with 3,900 additions and 3,612 deletions.
90 changes: 90 additions & 0 deletions aclocal.m4
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -100,6 +100,96 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS],
soext='.dylib' soext='.dylib'
;; ;;
esac esac
checkArch() {
case [$]1 in
alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|s390x|sparc|sparc64|vax|x86_64)
;;
*)
echo "Unknown arch [$]1"
exit 1
;;
esac
}
checkVendor() {
case [$]1 in
dec|unknown|hp|apple|next|sun|sgi|ibm)
;;
*)
echo "Unknown vendor [$]1"
exit 1
;;
esac
}
checkOS() {
case [$]1 in
linux|freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
;;
*)
echo "Unknown OS '[$]1'"
exit 1
;;
esac
}
BuildPlatform="$BuildArch-$BuildVendor-$BuildOS"
BuildPlatform_CPP=`echo "$BuildPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
BuildArch_CPP=` echo "$BuildArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
BuildVendor_CPP=` echo "$BuildVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
BuildOS_CPP=` echo "$BuildOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
checkArch "$BuildArch"
checkVendor "$BuildVendor"
checkOS "$BuildOS"
HostPlatform="$HostArch-$HostVendor-$HostOS"
HostPlatform_CPP=`echo "$HostPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
HostArch_CPP=` echo "$HostArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
HostVendor_CPP=` echo "$HostVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
HostOS_CPP=` echo "$HostOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
checkArch "$HostArch"
checkVendor "$HostVendor"
checkOS "$HostOS"
TargetPlatform="$TargetArch-$TargetVendor-$TargetOS"
TargetPlatform_CPP=`echo "$TargetPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
TargetArch_CPP=` echo "$TargetArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
TargetVendor_CPP=` echo "$TargetVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
TargetOS_CPP=` echo "$TargetOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
checkArch "$TargetArch"
checkVendor "$TargetVendor"
checkOS "$TargetOS"
echo "GHC build : $BuildPlatform"
echo "GHC host : $HostPlatform"
echo "GHC target : $TargetPlatform"
AC_SUBST(BuildPlatform)
AC_SUBST(HostPlatform)
AC_SUBST(TargetPlatform)
AC_SUBST(HostPlatform_CPP)
AC_SUBST(BuildPlatform_CPP)
AC_SUBST(TargetPlatform_CPP)
AC_SUBST(HostArch_CPP)
AC_SUBST(BuildArch_CPP)
AC_SUBST(TargetArch_CPP)
AC_SUBST(HostOS_CPP)
AC_SUBST(BuildOS_CPP)
AC_SUBST(TargetOS_CPP)
AC_SUBST(HostVendor_CPP)
AC_SUBST(BuildVendor_CPP)
AC_SUBST(TargetVendor_CPP)
AC_SUBST(exeext)
AC_SUBST(soext)
]) ])




Expand Down
10 changes: 4 additions & 6 deletions compiler/basicTypes/Literal.lhs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module Literal
, nullAddrLit, float2DoubleLit, double2FloatLit , nullAddrLit, float2DoubleLit, double2FloatLit
) where ) where
#include "HsVersions.h"
import TysPrim import TysPrim
import PrelNames import PrelNames
import Type import Type
Expand Down Expand Up @@ -220,16 +222,12 @@ instance Ord Literal where
\begin{code} \begin{code}
-- | Creates a 'Literal' of type @Int#@ -- | Creates a 'Literal' of type @Int#@
mkMachInt :: Integer -> Literal mkMachInt :: Integer -> Literal
mkMachInt x = -- ASSERT2( inIntRange x, integer x ) mkMachInt x = ASSERT2( inIntRange x, integer x )
-- Not true: you can write out of range Int# literals
-- For example, one can write (intToWord# 0xffff0000) to
-- get a particular Word bit-pattern, and there's no other
-- convenient way to write such literals, which is why we allow it.
MachInt x MachInt x
-- | Creates a 'Literal' of type @Word#@ -- | Creates a 'Literal' of type @Word#@
mkMachWord :: Integer -> Literal mkMachWord :: Integer -> Literal
mkMachWord x = -- ASSERT2( inWordRange x, integer x ) mkMachWord x = ASSERT2( inWordRange x, integer x )
MachWord x MachWord x
-- | Creates a 'Literal' of type @Int64#@ -- | Creates a 'Literal' of type @Int64#@
Expand Down
8 changes: 3 additions & 5 deletions compiler/basicTypes/Name.lhs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ import FastTypes
import FastString import FastString
import Outputable import Outputable
import Data.Array
import Data.Data import Data.Data
import Data.Word ( Word32 )
\end{code} \end{code}


%************************************************************************ %************************************************************************
Expand Down Expand Up @@ -416,9 +414,9 @@ instance Binary Name where
case getUserData bh of case getUserData bh of
UserData{ ud_put_name = put_name } -> put_name bh name UserData{ ud_put_name = put_name } -> put_name bh name
get bh = do get bh =
i <- get bh case getUserData bh of
return $! (ud_symtab (getUserData bh) ! fromIntegral (i::Word32)) UserData { ud_get_name = get_name } -> get_name bh
\end{code} \end{code}


%************************************************************************ %************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion compiler/basicTypes/Unique.lhs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module Unique (
pprUnique, pprUnique,
mkUniqueGrimily, -- Used in UniqSupply only! mkUniqueGrimily, -- Used in UniqSupply only!
getKey, getKeyFastInt, -- Used in Var, UniqFM, Name only! getKey, getKeyFastInt, -- Used in Var, UniqFM, Name only!
mkUnique, unpkUnique, -- Used in BinIface only
incrUnique, -- Used for renumbering incrUnique, -- Used for renumbering
deriveUnique, -- Ditto deriveUnique, -- Ditto
Expand Down
Loading

0 comments on commit 3f50b5b

Please sign in to comment.