uhc-light 1.1.8.4 → 1.1.8.5
raw patch · 336 files changed
+4245/−3096 lines, 336 filesdep ~uhc-lightbinary-added
Dependency ranges changed: uhc-light
Files
- 103/lib/ag/Core/AbsSyn.ag +5/−0
- 103/lib/ag/CoreRun/AbsSyn.ag +21/−0
- 103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi binary
- 103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config +1/−1
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.cr binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config +1/−1
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Control/Monad.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Control/Monad.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Either.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Either.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/IORef.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/IORef.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/List.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/List.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Maybe.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Maybe.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Typeable.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Typeable.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Debug/Trace.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Debug/Trace.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Error.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Error.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Fix.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Fix.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Unsafe.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Unsafe.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Array.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Array.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Base.cr too large to diff
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Base.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bounded.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bounded.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/BoxArray.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/BoxArray.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Enum.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Enum.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Eq.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Eq.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Float.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Float.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/GC.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/GC.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics/Tuple.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics/Tuple.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Handle.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Handle.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IOBase.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IOBase.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ix.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ix.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/LazyST.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/LazyST.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MVar.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MVar.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MutVar.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MutVar.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/OldException.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/OldException.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ord.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ord.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Prims.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Prims.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Read.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Read.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Real.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Real.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Run.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Run.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/ST.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/ST.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/STRef.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/STRef.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Show.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Show.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StackTrace.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StackTrace.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Types.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Types.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Weak.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Weak.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/WeakPtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/WeakPtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Unsafe/Coerce.cr binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Unsafe/Coerce.hi binary
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/CTypes.h +0/−231
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/HsBase.h +0/−757
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/HsBaseConfig.h +0/−944
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/IntLikeInstance.h +0/−242
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/MachDeps.h +0/−125
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/TupleInstance.h +0/−147
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/Typeable.h +0/−149
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/dirUtils.h +0/−11
- 103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/installed-pkg-config +0/−2
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Control/Monad.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Control/Monad.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Either.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Either.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/IORef.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/IORef.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/List.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/List.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Maybe.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Maybe.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Typeable.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Typeable.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Debug/Trace.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Debug/Trace.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Error.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Error.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Fix.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Fix.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Unsafe.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Unsafe.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Array.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Array.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Base.cr too large to diff
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Base.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bounded.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bounded.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/BoxArray.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/BoxArray.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Enum.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Enum.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Eq.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Eq.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Float.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Float.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/GC.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/GC.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics/Tuple.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics/Tuple.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Handle.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Handle.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IOBase.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IOBase.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ix.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ix.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/LazyST.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/LazyST.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MVar.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MVar.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MutVar.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MutVar.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/OldException.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/OldException.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ord.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ord.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Prims.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Prims.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Read.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Read.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Real.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Real.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Run.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Run.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/ST.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/ST.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/STRef.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/STRef.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Show.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Show.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StackTrace.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StackTrace.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Types.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Types.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Weak.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Weak.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/WeakPtr.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/WeakPtr.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Unsafe/Coerce.cr binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Unsafe/Coerce.hi binary
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/CTypes.h +231/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/HsBase.h +757/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/HsBaseConfig.h +944/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/IntLikeInstance.h +242/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/MachDeps.h +125/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/TupleInstance.h +147/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/Typeable.h +149/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/dirUtils.h +11/−0
- 103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/installed-pkg-config +2/−0
- changelog.md +6/−3
- src-main/EHC.hs +2/−1
- src-main/EHCRun.hs +15/−7
- src/UHC/Light/Compiler/Base/API.hs +11/−1
- src/UHC/Light/Compiler/Base/CfgPP.hs +26/−10
- src/UHC/Light/Compiler/Config.hs +3/−3
- src/UHC/Light/Compiler/ConfigInstall.hs +1/−1
- src/UHC/Light/Compiler/ConfigInternalVersions.hs +1/−1
- src/UHC/Light/Compiler/Core.hs +9/−6
- src/UHC/Light/Compiler/Core/API.hs +12/−0
- src/UHC/Light/Compiler/Core/BindExtract.hs +10/−0
- src/UHC/Light/Compiler/Core/Check.hs +84/−48
- src/UHC/Light/Compiler/Core/ExtractFFE.hs +10/−0
- src/UHC/Light/Compiler/Core/FvS.hs +10/−0
- src/UHC/Light/Compiler/Core/ModAsMap.hs +16/−0
- src/UHC/Light/Compiler/Core/Parser.hs +6/−1
- src/UHC/Light/Compiler/Core/Pretty.hs +14/−1
- src/UHC/Light/Compiler/Core/Subst.hs +16/−0
- src/UHC/Light/Compiler/Core/ToCoreRun.hs +69/−20
- src/UHC/Light/Compiler/Core/ToGrin.hs +10/−0
- src/UHC/Light/Compiler/Core/Trf/ANormal.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/AnaRelevance.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/AnnBasedSimplify.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/CAFGlobalAsArg.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/ConstProp.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/ElimNonCodegenConstructs.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/ElimTrivApp.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/EraseExtractTysigCore.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/EtaRed.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/ExplicitStackTrace.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/FixAfterParse.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/FloatToGlobal.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/InlineLetAlias.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/LamGlobalAsArg.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/LetDefBeforeUse.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/LetFlattenStrict.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/LetUnrec.hs +16/−0
- src/UHC/Light/Compiler/Core/Trf/OptimizeStrictness.hs +19/−0
- src/UHC/Light/Compiler/Core/Trf/RenUniq.hs +16/−0
- src/UHC/Light/Compiler/Core/UsedModNms.hs +10/−0
- src/UHC/Light/Compiler/CoreRun.hs +57/−14
- src/UHC/Light/Compiler/CoreRun/API.hs +10/−1
- src/UHC/Light/Compiler/CoreRun/API/Internal.hs +2/−0
- src/UHC/Light/Compiler/CoreRun/Parser.hs +16/−2
- src/UHC/Light/Compiler/CoreRun/Pretty.hs +153/−8
- src/UHC/Light/Compiler/CoreRun/Prim.hs +60/−33
- src/UHC/Light/Compiler/CoreRun/Run.hs +5/−4
- src/UHC/Light/Compiler/CoreRun/Run/Val.hs +291/−62
- src/UHC/Light/Compiler/CoreRun/Run/Val/Prim.hs +178/−122
- src/UHC/Light/Compiler/CoreRun/Run/Val/RunExplStk.hs +5/−9
- src/UHC/Light/Compiler/CoreRun/Run/Val/RunImplStk.hs +2/−3
- src/UHC/Light/Compiler/EH/MainAG_AGItf.hs +11/−10
- src/UHC/Light/Compiler/EHC/CompilePhase/Parsers.hs +2/−1
- src/UHC/Light/Compiler/EHC/CompilePhase/Run.hs +31/−2
- src/UHC/Light/Compiler/EHC/CompilePhase/TopLevelPhases.hs +49/−50
- src/UHC/Light/Compiler/EHC/CompileRun.hs +9/−3
- src/UHC/Light/Compiler/EHC/Main.hs +3/−3
- src/UHC/Light/Compiler/Scanner/Common.hs +53/−50
- src/UHC/Light/Compiler/SourceCodeSig.hs +2/−2
- uhc-light.cabal +4/−4
@@ -10,7 +10,12 @@ -- ctagsMp : {CTagsMp} DATA CExport+ -- export of plain (value) identifiers | Export nm : {HsName}++ -- export of data types with (optional) list of constructors also exported (absent means all of them are exported)+ | ExportData nm : {HsName}+ mbConNmL : {Maybe [HsName]} TYPE CExportL = [CExport]
@@ -3,8 +3,29 @@ moduleNm : {HsName} moduleNr : {Int} -- sequence nr, index later into global table of modules stkDepth : {Int} -- max depth of stack for setting up globals+ metas : MetaL binds : {CRArray Bind} body : Exp++DATA Meta+ | Data tyNm : {HsName}+ dataCons : DataConL++TYPE MetaL = [Meta]++SET AllMeta = Meta MetaL++-- Equivalent of data type def holding the minimal pieces of info required for codegen+DATA DataCon+ | Con conNm : {HsName}+ tagNr : {Int} -- runtime tag+ -- arity : {Int} -- nr of fields, excluding tag++TYPE DataConL = [DataCon]++SET AllDataCon = DataCon DataConL++SET AllMetaNT = AllMeta AllDataCon DATA SExp -- base cases
binary file changed (6272 → 6272 bytes)
@@ -1,2 +1,2 @@ exposed-modules: Data.Array-build-depends: uhcbase-1.1.8.4 base-3.0.0.0+build-depends: uhcbase-1.1.8.5 base-3.0.0.0
binary file changed (160831 → 164208 bytes)
binary file changed (116222 → 116222 bytes)
binary file changed (169759 → 173070 bytes)
binary file changed (140282 → 140282 bytes)
binary file changed (5522 → 5920 bytes)
binary file changed (10045 → 10045 bytes)
binary file changed (16739 → 17306 bytes)
binary file changed (18302 → 18302 bytes)
binary file changed (13558 → 13924 bytes)
binary file changed (13430 → 13430 bytes)
binary file changed (3007 → 3100 bytes)
binary file changed (7497 → 7497 bytes)
binary file changed (4265 → 4446 bytes)
binary file changed (8545 → 8545 bytes)
binary file changed (4493 → 4493 bytes)
binary file changed (230406 → 231630 bytes)
binary file changed (49047 → 49047 bytes)
binary file changed (40531 → 41322 bytes)
binary file changed (28461 → 28461 bytes)
binary file changed (3879 → 3879 bytes)
binary file changed (73168 → 75059 bytes)
binary file changed (32505 → 32505 bytes)
binary file changed (1548 → 1623 bytes)
binary file changed (4931 → 4931 bytes)
binary file changed (4378 → 4378 bytes)
binary file changed (379387 → 385153 bytes)
binary file changed (182318 → 182318 bytes)
binary file changed (1185 → 1229 bytes)
binary file changed (5745 → 5745 bytes)
binary file changed (28321 → 28370 bytes)
binary file changed (6454 → 6454 bytes)
binary file changed (3526 → 3820 bytes)
binary file changed (7763 → 7763 bytes)
binary file changed (122069 → 123907 bytes)
binary file changed (79702 → 79702 bytes)
binary file changed (2798 → 2933 bytes)
binary file changed (6620 → 6620 bytes)
binary file changed (64067 → 63707 bytes)
binary file changed (220303 → 222135 bytes)
binary file changed (77868 → 77868 bytes)
binary file changed (1719 → 1854 bytes)
binary file changed (5235 → 5235 bytes)
binary file changed (192464 → 195083 bytes)
binary file changed (69319 → 69319 bytes)
binary file changed (36202 → 37229 bytes)
binary file changed (27804 → 27804 bytes)
binary file changed (4498 → 4498 bytes)
binary file changed (228328 → 229263 bytes)
binary file changed (49978 → 49978 bytes)
binary file changed (3874 → 3921 bytes)
binary file changed (5464 → 5464 bytes)
binary file changed (3643 → 3732 bytes)
binary file changed (6144 → 6144 bytes)
@@ -1,2 +1,2 @@ exposed-modules: Control.Applicative Control.Arrow Control.Category Control.Monad.Fix Control.Monad.Instances Control.Monad.ST.Lazy Control.Monad.ST Data.Bool Data.Complex Data.Dynamic Data.Eq Data.Foldable Data.Function Data.Ix Data.Monoid Data.Ord Data.Ratio Data.String Data.Traversable Numeric Prelude System.Console.GetOpt System.Environment System.Exit Text.ParserCombinators.ReadP Text.ParserCombinators.ReadPrec Text.Read.Lex Text.Read Text.Show.Functions Text.Show-build-depends: uhcbase-1.1.8.4+build-depends: uhcbase-1.1.8.5
binary file changed (59734 → absent bytes)
binary file changed (27704 → absent bytes)
binary file changed (81556 → absent bytes)
binary file changed (24833 → absent bytes)
binary file changed (11057 → absent bytes)
binary file changed (5668 → absent bytes)
binary file changed (6448 → absent bytes)
binary file changed (3864 → absent bytes)
binary file changed (3362 → absent bytes)
binary file changed (3315 → absent bytes)
binary file changed (201705 → absent bytes)
binary file changed (46537 → absent bytes)
binary file changed (7855 → absent bytes)
binary file changed (4487 → absent bytes)
binary file changed (169640 → absent bytes)
binary file changed (112836 → absent bytes)
binary file changed (3050 → absent bytes)
binary file changed (4479 → absent bytes)
binary file changed (405 → absent bytes)
binary file changed (3275 → absent bytes)
binary file changed (149 → absent bytes)
binary file changed (2259 → absent bytes)
binary file changed (19571 → absent bytes)
binary file changed (14489 → absent bytes)
binary file changed (28631 → absent bytes)
binary file changed (16760 → absent bytes)
binary file changed (4710 → absent bytes)
binary file changed (2294 → absent bytes)
binary file changed (951 → absent bytes)
binary file changed (1984 → absent bytes)
binary file changed (214102 → absent bytes)
binary file changed (64601 → absent bytes)
file too large to diff
binary file changed (950230 → absent bytes)
binary file changed (12702 → absent bytes)
binary file changed (5335 → absent bytes)
binary file changed (120611 → absent bytes)
binary file changed (60961 → absent bytes)
binary file changed (29019 → absent bytes)
binary file changed (21229 → absent bytes)
binary file changed (5196 → absent bytes)
binary file changed (1288 → absent bytes)
binary file changed (8283 → absent bytes)
binary file changed (4111 → absent bytes)
binary file changed (105917 → absent bytes)
binary file changed (66526 → absent bytes)
binary file changed (58776 → absent bytes)
binary file changed (4807 → absent bytes)
binary file changed (651 → absent bytes)
binary file changed (1259 → absent bytes)
binary file changed (207 → absent bytes)
binary file changed (16434 → absent bytes)
binary file changed (660907 → absent bytes)
binary file changed (421402 → absent bytes)
binary file changed (17942 → absent bytes)
binary file changed (11367 → absent bytes)
binary file changed (15077 → absent bytes)
binary file changed (5975 → absent bytes)
binary file changed (275969 → absent bytes)
binary file changed (144190 → absent bytes)
binary file changed (75981 → absent bytes)
binary file changed (30408 → absent bytes)
binary file changed (36959 → absent bytes)
binary file changed (23326 → absent bytes)
binary file changed (28617 → absent bytes)
binary file changed (10285 → absent bytes)
binary file changed (18012 → absent bytes)
binary file changed (10662 → absent bytes)
binary file changed (12018 → absent bytes)
binary file changed (5421 → absent bytes)
binary file changed (68496 → absent bytes)
binary file changed (21750 → absent bytes)
binary file changed (192936 → absent bytes)
binary file changed (73547 → absent bytes)
binary file changed (24745 → absent bytes)
binary file changed (21209 → absent bytes)
binary file changed (87213 → absent bytes)
binary file changed (17136 → absent bytes)
binary file changed (7166 → absent bytes)
binary file changed (1916 → absent bytes)
binary file changed (11769 → absent bytes)
binary file changed (5056 → absent bytes)
binary file changed (47127 → absent bytes)
binary file changed (31521 → absent bytes)
binary file changed (22619 → absent bytes)
binary file changed (15434 → absent bytes)
binary file changed (151409 → absent bytes)
binary file changed (36709 → absent bytes)
binary file changed (21492 → absent bytes)
binary file changed (16107 → absent bytes)
binary file changed (141 → absent bytes)
binary file changed (1380 → absent bytes)
binary file changed (67781 → absent bytes)
binary file changed (51972 → absent bytes)
binary file changed (26763 → absent bytes)
binary file changed (18131 → absent bytes)
binary file changed (13574 → absent bytes)
binary file changed (9775 → absent bytes)
binary file changed (140 → absent bytes)
binary file changed (853 → absent bytes)
@@ -1,231 +0,0 @@-{- ---------------------------------------------------------------------------// Dirty CPP hackery for CTypes/CTypesISO-//-// (c) The FFI task force, 2000-// ----------------------------------------------------------------------------}--#ifndef CTYPES__H-#define CTYPES__H--#include "Typeable.h"--{--// As long as there is no automatic derivation of classes for newtypes we resort-// to extremely dirty cpp-hackery. :-P Some care has to be taken when the-// macros below are modified, otherwise the layout rule will bite you.--}---- // A hacked version for GHC follows the Haskell 98 version...-#ifndef __GLASGOW_HASKELL__--#define NEWTYPE_TYPE_NODERIVING(T,B) \-newtype T = T B ; --#define NEWTYPE_TYPE(T,B) \-newtype T = T B deriving (Eq, Ord) ; --#define ARITHMETIC_TYPE_INSTANCES(T,C,S,B) \-INSTANCE_NUM(T) ; \-INSTANCE_REAL(T) ; \-INSTANCE_READ(T,B) ; \-INSTANCE_SHOW(T,B) ; \-INSTANCE_ENUM(T) ; \-INSTANCE_STORABLE(T) ; \-INSTANCE_TYPEABLE0(T,C,S) ;--#define INTEGRAL_TYPE_INSTANCES(T,C,S,B) \-INSTANCE_BOUNDED(T) ; \-INSTANCE_INTEGRAL(T) ; \-INSTANCE_BITS(T)--#define ARITHMETIC_TYPE(T,C,S,B) \-NEWTYPE_TYPE(T,B) ; \-ARITHMETIC_TYPE_INSTANCES(T,C,S,B) ;--#define INTEGRAL_TYPE(T,C,S,B) \-ARITHMETIC_TYPE(T,C,S,B) ; \-INTEGRAL_TYPE_INSTANCES(T,C,S,B)--#define FLOATING_TYPE(T,C,S,B) \-ARITHMETIC_TYPE(T,C,S,B) ; \-INSTANCE_FRACTIONAL(T) ; \-INSTANCE_FLOATING(T) ; \-INSTANCE_REALFRAC(T) ; \-INSTANCE_REALFLOAT(T)--#ifndef __GLASGOW_HASKELL__-#define fakeMap map-#endif--#define INSTANCE_READ(T,B) \-instance Read T where { \- readsPrec p s = fakeMap (\(x, t) -> (T x, t)) (readsPrec p s) }--#define INSTANCE_SHOW(T,B) \-instance Show T where { \- showsPrec p (T x) = showsPrec p x }--#define INSTANCE_NUM(T) \-instance Num T where { \- (T i) + (T j) = T (i + j) ; \- (T i) - (T j) = T (i - j) ; \- (T i) * (T j) = T (i * j) ; \- negate (T i) = T (negate i) ; \- abs (T i) = T (abs i) ; \- signum (T i) = T (signum i) ; \- fromInteger x = T (fromInteger x) }--#define INSTANCE_EQ(T) \-instance Eq T where { \- (T x1) == (T x2) = x1 == x2 }--#define INSTANCE_ORD(T) \-instance Ord T where { \- (T x1) `compare` (T x2) = x1 `compare` x2 }--#define INSTANCE_BOUNDED(T) \-instance Bounded T where { \- minBound = T minBound ; \- maxBound = T maxBound }--#define INSTANCE_ENUM(T) \-instance Enum T where { \- succ (T i) = T (succ i) ; \- pred (T i) = T (pred i) ; \- toEnum x = T (toEnum x) ; \- fromEnum (T i) = fromEnum i ; \- enumFrom (T i) = fakeMap T (enumFrom i) ; \- enumFromThen (T i) (T j) = fakeMap T (enumFromThen i j) ; \- enumFromTo (T i) (T j) = fakeMap T (enumFromTo i j) ; \- enumFromThenTo (T i) (T j) (T k) = fakeMap T (enumFromThenTo i j k) }--#define INSTANCE_REAL(T) \-instance Real T where { \- toRational (T i) = toRational i }--#define INSTANCE_INTEGRAL(T) \-instance Integral T where { \- (T i) `quot` (T j) = T (i `quot` j) ; \- (T i) `rem` (T j) = T (i `rem` j) ; \- (T i) `div` (T j) = T (i `div` j) ; \- (T i) `mod` (T j) = T (i `mod` j) ; \- (T i) `quotRem` (T j) = let (q,r) = i `quotRem` j in (T q, T r) ; \- (T i) `divMod` (T j) = let (d,m) = i `divMod` j in (T d, T m) ; \- toInteger (T i) = toInteger i }--#define INSTANCE_BITS(T) \-instance Bits T where { \- (T x) .&. (T y) = T (x .&. y) ; \- (T x) .|. (T y) = T (x .|. y) ; \- (T x) `xor` (T y) = T (x `xor` y) ; \- complement (T x) = T (complement x) ; \- shift (T x) n = T (shift x n) ; \- rotate (T x) n = T (rotate x n) ; \- bit n = T (bit n) ; \- setBit (T x) n = T (setBit x n) ; \- clearBit (T x) n = T (clearBit x n) ; \- complementBit (T x) n = T (complementBit x n) ; \- testBit (T x) n = testBit x n ; \- bitSize (T x) = bitSize x ; \- isSigned (T x) = isSigned x }--#define INSTANCE_FRACTIONAL(T) \-instance Fractional T where { \- (T x) / (T y) = T (x / y) ; \- recip (T x) = T (recip x) ; \- fromRational r = T (fromRational r) }--#define INSTANCE_FLOATING(T) \-instance Floating T where { \- pi = pi ; \- exp (T x) = T (exp x) ; \- log (T x) = T (log x) ; \- sqrt (T x) = T (sqrt x) ; \- (T x) ** (T y) = T (x ** y) ; \- (T x) `logBase` (T y) = T (x `logBase` y) ; \- sin (T x) = T (sin x) ; \- cos (T x) = T (cos x) ; \- tan (T x) = T (tan x) ; \- asin (T x) = T (asin x) ; \- acos (T x) = T (acos x) ; \- atan (T x) = T (atan x) ; \- sinh (T x) = T (sinh x) ; \- cosh (T x) = T (cosh x) ; \- tanh (T x) = T (tanh x) ; \- asinh (T x) = T (asinh x) ; \- acosh (T x) = T (acosh x) ; \- atanh (T x) = T (atanh x) }--#define INSTANCE_REALFRAC(T) \-instance RealFrac T where { \- properFraction (T x) = let (m,y) = properFraction x in (m, T y) ; \- truncate (T x) = truncate x ; \- round (T x) = round x ; \- ceiling (T x) = ceiling x ; \- floor (T x) = floor x }--#define INSTANCE_REALFLOAT(T) \-instance RealFloat T where { \- floatRadix (T x) = floatRadix x ; \- floatDigits (T x) = floatDigits x ; \- floatRange (T x) = floatRange x ; \- decodeFloat (T x) = decodeFloat x ; \- encodeFloat m n = T (encodeFloat m n) ; \- exponent (T x) = exponent x ; \- significand (T x) = T (significand x) ; \- scaleFloat n (T x) = T (scaleFloat n x) ; \- isNaN (T x) = isNaN x ; \- isInfinite (T x) = isInfinite x ; \- isDenormalized (T x) = isDenormalized x ; \- isNegativeZero (T x) = isNegativeZero x ; \- isIEEE (T x) = isIEEE x ; \- (T x) `atan2` (T y) = T (x `atan2` y) }--#define INSTANCE_STORABLE(T) \-instance Storable T where { \- sizeOf (T x) = sizeOf x ; \- alignment (T x) = alignment x ; \- peekElemOff a i = liftM T (peekElemOff (castPtr a) i) ; \- pokeElemOff a i (T x) = pokeElemOff (castPtr a) i x }--#else /* __GLASGOW_HASKELL__ */---- // GHC can derive any class for a newtype, so we make use of that here...--#define ARITHMETIC_CLASSES Eq,Ord,Num,Enum,Storable,Real-#define INTEGRAL_CLASSES Bounded,Integral,Bits-#define FLOATING_CLASSES Fractional,Floating,RealFrac,RealFloat--#define ARITHMETIC_TYPE(T,C,S,B) \-newtype T = T B deriving (ARITHMETIC_CLASSES); \-INSTANCE_READ(T,B); \-INSTANCE_SHOW(T,B); \-INSTANCE_TYPEABLE0(T,C,S) ;--#define INTEGRAL_TYPE(T,C,S,B) \-newtype T = T B deriving (ARITHMETIC_CLASSES, INTEGRAL_CLASSES); \-INSTANCE_READ(T,B); \-INSTANCE_SHOW(T,B); \-INSTANCE_TYPEABLE0(T,C,S) ;--#define FLOATING_TYPE(T,C,S,B) \-newtype T = T B deriving (ARITHMETIC_CLASSES, FLOATING_CLASSES); \-INSTANCE_READ(T,B); \-INSTANCE_SHOW(T,B); \-INSTANCE_TYPEABLE0(T,C,S) ;--#define INSTANCE_READ(T,B) \-instance Read T where { \- readsPrec = unsafeCoerce# (readsPrec :: Int -> ReadS B); \- readList = unsafeCoerce# (readList :: ReadS [B]); }--#define INSTANCE_SHOW(T,B) \-instance Show T where { \- showsPrec = unsafeCoerce# (showsPrec :: Int -> B -> ShowS); \- show = unsafeCoerce# (show :: B -> String); \- showList = unsafeCoerce# (showList :: [B] -> ShowS); }--#endif /* __GLASGOW_HASKELL__ */--#endif
@@ -1,757 +0,0 @@-/* ------------------------------------------------------------------------------ *- * (c) The University of Glasgow 2001-2004- *- * Definitions for package `base' which are visible in Haskell land.- *- * Adapted for use in EHC- *- * ---------------------------------------------------------------------------*/--#ifndef __HSBASE_H__-#define __HSBASE_H__--#include "HsBaseConfig.h"-#ifdef __UHC_BUILDS_O__-#include "rts.h"-#endif--/* ultra-evil... */-#undef PACKAGE_BUGREPORT-#undef PACKAGE_NAME-#undef PACKAGE_STRING-#undef PACKAGE_TARNAME-#undef PACKAGE_VERSION--/* Needed to get the macro version of errno on some OSs (eg. Solaris).- We must do this, because these libs are only compiled once, but- must work in both single-threaded and multi-threaded programs. */-#define _REENTRANT 1--#ifndef __UHC__-#include "HsFFI.h"-#endif /* !__UHC__ */--#include <stdio.h>-#include <stdlib.h>-#include <math.h>--#if HAVE_SYS_TYPES_H-#include <sys/types.h>-#endif-#if HAVE_UNISTD_H-#include <unistd.h>-#endif-#if HAVE_SYS_STAT_H-#include <sys/stat.h>-#endif-#if HAVE_FCNTL_H-# include <fcntl.h>-#endif-#if HAVE_TERMIOS_H-#include <termios.h>-#endif-#if HAVE_SIGNAL_H-#include <signal.h>-/* Ultra-ugly: OpenBSD uses broken macros for sigemptyset and sigfillset (missing casts) */-#if __OpenBSD__-#undef sigemptyset-#undef sigfillset-#endif-#endif-#if HAVE_ERRNO_H-#include <errno.h>-#endif-#if HAVE_STRING_H-#include <string.h>-#endif-#if HAVE_DIRENT_H-#include <dirent.h>-#endif-#if HAVE_UTIME_H-#include <utime.h>-#endif-#if HAVE_SYS_UTSNAME_H-#include <sys/utsname.h>-#endif-#if HAVE_GETTIMEOFDAY-# if HAVE_SYS_TIME_H-# include <sys/time.h>-# endif-#elif HAVE_GETCLOCK-# if HAVE_SYS_TIMERS_H-# define POSIX_4D9 1-# include <sys/timers.h>-# endif-#endif-#if HAVE_TIME_H-#include <time.h>-#endif-#if HAVE_SYS_TIMEB_H-#include <sys/timeb.h>-#endif-#if HAVE_WINDOWS_H-#include <windows.h>-#endif-#if HAVE_SYS_TIMES_H-#include <sys/times.h>-#endif-#if HAVE_WINSOCK_H && defined(__MINGW32__)-#include <winsock.h>-#endif-#if HAVE_LIMITS_H-#include <limits.h>-#endif-#if HAVE_WCTYPE_H-#include <wctype.h>-#endif-#if HAVE_INTTYPES_H-# include <inttypes.h>-#elif HAVE_STDINT_H-# include <stdint.h>-#endif--#if !defined(__MINGW32__) && !defined(irix_HOST_OS)-# if HAVE_SYS_RESOURCE_H-# include <sys/resource.h>-# endif-#endif--#if !HAVE_GETRUSAGE && HAVE_SYS_SYSCALL_H-# include <sys/syscall.h>-# if defined(SYS_GETRUSAGE) /* hpux_HOST_OS */-# define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)-# define HAVE_GETRUSAGE 1-# endif-#endif--/* For System */-#if HAVE_SYS_WAIT_H-#include <sys/wait.h>-#endif-#if HAVE_VFORK_H-#include <vfork.h>-#endif--#ifndef __UHC__-#include "dirUtils.h"-#endif-#ifndef __UHC__-#include "WCsubst.h"-#endif /* !__UHC__ */--#if defined(__MINGW32__)-/* in Win32Utils.c */-extern void maperrno (void);-extern HsWord64 getUSecOfDay(void);-#endif--#if defined(__MINGW32__)-#include <io.h>-#include <fcntl.h>-#include <shlobj.h>-#include <share.h>-#endif--#if HAVE_SYS_SELECT_H-#include <sys/select.h>-#endif--/* in inputReady.c */-extern int fdReady(int fd, int write, int msecs, int isSock);--#ifndef __UHC__-/* in Signals.c */-extern HsInt nocldstop;-#endif /* !__UHC__ */--#ifndef __UHC__-/* ------------------------------------------------------------------------------ 64-bit operations, defined in longlong.c- -------------------------------------------------------------------------- */--#ifdef SUPPORT_LONG_LONGS--HsBool hs_gtWord64 (HsWord64, HsWord64);-HsBool hs_geWord64 (HsWord64, HsWord64);-HsBool hs_eqWord64 (HsWord64, HsWord64);-HsBool hs_neWord64 (HsWord64, HsWord64);-HsBool hs_ltWord64 (HsWord64, HsWord64);-HsBool hs_leWord64 (HsWord64, HsWord64);--HsBool hs_gtInt64 (HsInt64, HsInt64);-HsBool hs_geInt64 (HsInt64, HsInt64);-HsBool hs_eqInt64 (HsInt64, HsInt64);-HsBool hs_neInt64 (HsInt64, HsInt64);-HsBool hs_ltInt64 (HsInt64, HsInt64);-HsBool hs_leInt64 (HsInt64, HsInt64);--HsWord64 hs_remWord64 (HsWord64, HsWord64);-HsWord64 hs_quotWord64 (HsWord64, HsWord64);--HsInt64 hs_remInt64 (HsInt64, HsInt64);-HsInt64 hs_quotInt64 (HsInt64, HsInt64);-HsInt64 hs_negateInt64 (HsInt64);-HsInt64 hs_plusInt64 (HsInt64, HsInt64);-HsInt64 hs_minusInt64 (HsInt64, HsInt64);-HsInt64 hs_timesInt64 (HsInt64, HsInt64);--HsWord64 hs_and64 (HsWord64, HsWord64);-HsWord64 hs_or64 (HsWord64, HsWord64);-HsWord64 hs_xor64 (HsWord64, HsWord64);-HsWord64 hs_not64 (HsWord64);--HsWord64 hs_uncheckedShiftL64 (HsWord64, HsInt);-HsWord64 hs_uncheckedShiftRL64 (HsWord64, HsInt);-HsInt64 hs_uncheckedIShiftL64 (HsInt64, HsInt);-HsInt64 hs_uncheckedIShiftRA64 (HsInt64, HsInt);-HsInt64 hs_uncheckedIShiftRL64 (HsInt64, HsInt);--HsInt64 hs_intToInt64 (HsInt);-HsInt hs_int64ToInt (HsInt64);-HsWord64 hs_int64ToWord64 (HsInt64);-HsWord64 hs_wordToWord64 (HsWord);-HsWord hs_word64ToWord (HsWord64);-HsInt64 hs_word64ToInt64 (HsWord64);--HsWord64 hs_integerToWord64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);-HsInt64 hs_integerToInt64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);--#endif /* SUPPORT_LONG_LONGS */-#endif /* !__UHC__ */--/* ------------------------------------------------------------------------------ INLINE functions.-- These functions are given as inlines here for when compiling via C,- but we also generate static versions into the cbits library for- when compiling to native code.- -------------------------------------------------------------------------- */--#ifndef INLINE-# if defined(_MSC_VER)-# define INLINE extern __inline-# else-# define INLINE static inline-# endif-#endif--INLINE int __hscore_get_errno(void) { return errno; }-INLINE void __hscore_set_errno(int e) { errno = e; }--#if !defined(_MSC_VER)-INLINE int __hscore_s_isreg(mode_t m) { return S_ISREG(m); }-INLINE int __hscore_s_isdir(mode_t m) { return S_ISDIR(m); }-INLINE int __hscore_s_isfifo(mode_t m) { return S_ISFIFO(m); }-INLINE int __hscore_s_isblk(mode_t m) { return S_ISBLK(m); }-INLINE int __hscore_s_ischr(mode_t m) { return S_ISCHR(m); }-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)-INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); }-#endif-#endif--#if ( !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) ) || defined(__CYGWIN__)-INLINE int-__hscore_sigemptyset( sigset_t *set )-{ return sigemptyset(set); }--INLINE int-__hscore_sigfillset( sigset_t *set )-{ return sigfillset(set); }--INLINE int-__hscore_sigaddset( sigset_t * set, int s )-{ return sigaddset(set,s); }--INLINE int-__hscore_sigdelset( sigset_t * set, int s )-{ return sigdelset(set,s); }--INLINE int-__hscore_sigismember( sigset_t * set, int s )-{ return sigismember(set,s); }-#endif--INLINE void *-__hscore_memcpy_dst_off( char *dst, int dst_off, char *src, size_t sz )-{ return memcpy(dst+dst_off, src, sz); }--INLINE void *-__hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz )-{ return memcpy(dst, src+src_off, sz); }--INLINE HsBool-__hscore_supportsTextMode()-{-#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)- return HS_BOOL_FALSE;-#else- return HS_BOOL_TRUE;-#endif-}--INLINE HsInt-__hscore_bufsiz()-{- return BUFSIZ;-}--INLINE int-__hscore_seek_cur()-{- return SEEK_CUR;-}--INLINE int-__hscore_o_binary()-{-#if defined(_MSC_VER)- return O_BINARY;-#else- return CONST_O_BINARY;-#endif-}--INLINE int-__hscore_o_rdonly()-{-#ifdef O_RDONLY- return O_RDONLY;-#else- return 0;-#endif-}--INLINE int-__hscore_o_wronly( void )-{-#ifdef O_WRONLY- return O_WRONLY;-#else- return 0;-#endif-}--INLINE int-__hscore_o_rdwr( void )-{-#ifdef O_RDWR- return O_RDWR;-#else- return 0;-#endif-}--INLINE int-__hscore_o_append( void )-{-#ifdef O_APPEND- return O_APPEND;-#else- return 0;-#endif-}--INLINE int-__hscore_o_creat( void )-{-#ifdef O_CREAT- return O_CREAT;-#else- return 0;-#endif-}--INLINE int-__hscore_o_excl( void )-{-#ifdef O_EXCL- return O_EXCL;-#else- return 0;-#endif-}--INLINE int-__hscore_o_trunc( void )-{-#ifdef O_TRUNC- return O_TRUNC;-#else- return 0;-#endif-}--INLINE int-__hscore_o_noctty( void )-{-#ifdef O_NOCTTY- return O_NOCTTY;-#else- return 0;-#endif-}--INLINE int-__hscore_o_nonblock( void )-{-#ifdef O_NONBLOCK- return O_NONBLOCK;-#else- return 0;-#endif-}--INLINE int-__hscore_seek_set( void )-{- return SEEK_SET;-}--INLINE int-__hscore_seek_end( void )-{- return SEEK_END;-}--INLINE int-__hscore_ftruncate( int fd, off_t where )-{-#if defined(HAVE_FTRUNCATE)- return ftruncate(fd,where);-#elif defined(HAVE__CHSIZE)- return _chsize(fd,where);-#else-// ToDo: we should use _chsize_s() on Windows which allows a 64-bit-// offset, but it doesn't seem to be available from mingw at this time -// --SDM (01/2008)-#error at least ftruncate or _chsize functions are required to build-#endif-}--#ifndef __UHC__-INLINE int-__hscore_setmode( int fd, HsBool toBin )-{-#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)- return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);-#else- return 0;-#endif-}-#endif /* !__UHC__ */--#if __GLASGOW_HASKELL__--INLINE int-__hscore_PrelHandle_write( int fd, void *ptr, HsInt off, int sz )-{- return write(fd,(char *)ptr + off, sz);-}--INLINE int-__hscore_PrelHandle_read( int fd, void *ptr, HsInt off, int sz )-{- return read(fd,(char *)ptr + off, sz);--}--#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)-INLINE int-__hscore_PrelHandle_send( int fd, void *ptr, HsInt off, int sz )-{- return send(fd,(char *)ptr + off, sz, 0);-}--INLINE int-__hscore_PrelHandle_recv( int fd, void *ptr, HsInt off, int sz )-{- return recv(fd,(char *)ptr + off, sz, 0);-}-#endif--#endif /* __GLASGOW_HASKELL__ */--INLINE int-__hscore_mkdir( char *pathName, int mode )-{-#if ( defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) ) && !defined(__CYGWIN__)- return mkdir(pathName);-#else- return mkdir(pathName,mode);-#endif-}--INLINE int-__hscore_lstat( const char *fname, struct stat *st )-{-#if HAVE_LSTAT- return lstat(fname, st);-#else- return stat(fname, st);-#endif-}--INLINE char *-__hscore_d_name( struct dirent* d )-{- return (d->d_name);-}--INLINE int-__hscore_end_of_dir( void )-{- return READDIR_ERRNO_EOF;-}--INLINE void-__hscore_free_dirent(struct dirent *dEnt)-{-#if HAVE_READDIR_R- free(dEnt);-#endif-}--#if defined(__MINGW32__)-// We want the versions of stat/fstat/lseek that use 64-bit offsets,-// and you have to ask for those explicitly. Unfortunately there-// doesn't seem to be a 64-bit version of truncate/ftruncate, so while-// hFileSize and hSeek will work with large files, hSetFileSize will not.-#define stat(file,buf) _stati64(file,buf)-#define fstat(fd,buf) _fstati64(fd,buf)-typedef struct _stati64 struct_stat;-typedef off64_t stsize_t;-#else-typedef struct stat struct_stat;-typedef off_t stsize_t;-#endif--INLINE HsInt-__hscore_sizeof_stat( void )-{- return sizeof(struct_stat);-}--INLINE time_t __hscore_st_mtime ( struct_stat* st ) { return st->st_mtime; }-INLINE stsize_t __hscore_st_size ( struct_stat* st ) { return st->st_size; }-#if !defined(_MSC_VER)-INLINE mode_t __hscore_st_mode ( struct_stat* st ) { return st->st_mode; }-INLINE dev_t __hscore_st_dev ( struct_stat* st ) { return st->st_dev; }-INLINE ino_t __hscore_st_ino ( struct_stat* st ) { return st->st_ino; }-#endif--#if HAVE_TERMIOS_H-INLINE tcflag_t __hscore_lflag( struct termios* ts ) { return ts->c_lflag; }--INLINE void-__hscore_poke_lflag( struct termios* ts, tcflag_t t ) { ts->c_lflag = t; }--INLINE unsigned char*-__hscore_ptr_c_cc( struct termios* ts )-{ return (unsigned char*) &ts->c_cc; }--INLINE HsInt-__hscore_sizeof_termios( void )-{-#ifndef __MINGW32__- return sizeof(struct termios);-#else- return 0;-#endif-}-#endif--//sizeof_sigset_t is also use on windows systems which define tcflat_t. Why exclude it?-// #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)-INLINE HsInt-__hscore_sizeof_sigset_t( void )-{- return sizeof(sigset_t);-}-// #endif--INLINE int-__hscore_echo( void )-{-#ifdef ECHO- return ECHO;-#else- return 0;-#endif--}--INLINE int-__hscore_tcsanow( void )-{-#ifdef TCSANOW- return TCSANOW;-#else- return 0;-#endif--}--INLINE int-__hscore_icanon( void )-{-#ifdef ICANON- return ICANON;-#else- return 0;-#endif-}--INLINE int __hscore_vmin( void )-{-#ifdef VMIN- return VMIN;-#else- return 0;-#endif-}--INLINE int __hscore_vtime( void )-{-#ifdef VTIME- return VTIME;-#else- return 0;-#endif-}--INLINE int __hscore_sigttou( void )-{-#ifdef SIGTTOU- return SIGTTOU;-#else- return 0;-#endif-}--INLINE int __hscore_sig_block( void )-{-#ifdef SIG_BLOCK- return SIG_BLOCK;-#else- return 0;-#endif-}--INLINE int __hscore_sig_setmask( void )-{-#ifdef SIG_SETMASK- return SIG_SETMASK;-#else- return 0;-#endif-}--INLINE int-__hscore_f_getfl( void )-{-#ifdef F_GETFL- return F_GETFL;-#else- return 0;-#endif-}--INLINE int-__hscore_f_setfl( void )-{-#ifdef F_SETFL- return F_SETFL;-#else- return 0;-#endif-}--// defined in rts/RtsStartup.c.-extern void* __hscore_get_saved_termios(int fd);-extern void __hscore_set_saved_termios(int fd, void* ts);--INLINE int __hscore_hs_fileno (FILE *f) { return fileno (f); }--INLINE int __hscore_open(char *file, int how, mode_t mode) {-#ifdef __MINGW32__- if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND))- return _sopen(file,how,_SH_DENYRW,mode);- else- return _sopen(file,how,_SH_DENYWR,mode);-#else- return open(file,how,mode);-#endif-}--// These are wrapped because on some OSs (eg. Linux) they are-// macros which redirect to the 64-bit-off_t versions when large file-// support is enabled.-//-#if defined(__MINGW32__)-INLINE off64_t __hscore_lseek(int fd, off64_t off, int whence) {- return (_lseeki64(fd,off,whence));-}-#else-INLINE off_t __hscore_lseek(int fd, off_t off, int whence) {- return (lseek(fd,off,whence));-}-#endif--INLINE HsInt __hscore_stat(char *file, struct_stat *buf) {- return (stat(file,buf));-}--INLINE HsInt __hscore_fstat(int fd, struct_stat *buf) {- return (fstat(fd,buf));-}--// select-related stuff--#if !defined(__MINGW32__)-INLINE int hsFD_SETSIZE(void) { return FD_SETSIZE; }-INLINE int hsFD_ISSET(int fd, fd_set *fds) { return FD_ISSET(fd, fds); }-INLINE void hsFD_SET(int fd, fd_set *fds) { FD_SET(fd, fds); }-INLINE HsInt sizeof_fd_set(void) { return sizeof(fd_set); }-extern void hsFD_ZERO(fd_set *fds);-#endif--// gettimeofday()-related--#if !defined(__MINGW32__)--INLINE HsInt sizeofTimeVal(void) { return sizeof(struct timeval); }--INLINE HsWord64 getUSecOfDay(void)-{- struct timeval tv;- gettimeofday(&tv, (struct timezone *) NULL);- // Don't forget to cast *before* doing the arithmetic, otherwise- // the arithmetic happens at the type of tv_sec, which is probably- // only 'int'.- return ((HsWord64)tv.tv_sec * 1000000 + (HsWord64)tv.tv_usec);-}--INLINE void setTimevalTicks(struct timeval *p, HsWord64 usecs)-{- p->tv_sec = usecs / 1000000;- p->tv_usec = usecs % 1000000;-}-#endif /* !defined(__MINGW32__) */--/* ToDo: write a feature test that doesn't assume 'environ' to- * be in scope at link-time. */-extern char** environ;-INLINE char **__hscore_environ() { return environ; }--/* lossless conversions between pointers and integral types */-INLINE void * __hscore_from_uintptr(uintptr_t n) { return (void *)n; }-INLINE void * __hscore_from_intptr (intptr_t n) { return (void *)n; }-INLINE uintptr_t __hscore_to_uintptr (void *p) { return (uintptr_t)p; }-INLINE intptr_t __hscore_to_intptr (void *p) { return (intptr_t)p; }--void errorBelch2(const char*s, char *t);-void debugBelch2(const char*s, char *t);--#endif /* __HSBASE_H__ */-
@@ -1,944 +0,0 @@-/* ehclib/uhcbase/include/HsBaseConfig.h. Generated from HsBaseConfig.h.in by configure. */-#ifndef HSBASECONFIG_H-#define HSBASECONFIG_H--#include "MachDeps.h"--/********************************************************************/-/**** Sizes ****/-/********************************************************************/--#if SIZEOF_INTPTR_T == 8-#define HTYPE_INTPTR_T Int64-#define HTYPE_UINTPTR_T Word64-#else-#define HTYPE_INTPTR_T Int32-#define HTYPE_UINTPTR_T Word32-#endif--/* also here: typedef int sig_atomic_t- */-#if SIZEOF_INT == 8-#define HTYPE_INT Int64-#define HTYPE_UNSIGNED_INT Word64-#define HTYPE_SIG_ATOMIC_T Word64-#else-#define HTYPE_INT Int32-#define HTYPE_UNSIGNED_INT Word32-#define HTYPE_SIG_ATOMIC_T Word32-#endif--#if SIZEOF_LONG == 8-#define HTYPE_LONG Int64-#define HTYPE_UNSIGNED_LONG Word64-#else-#define HTYPE_LONG Int32-#define HTYPE_UNSIGNED_LONG Word32-#endif--#if SIZEOF_VOID_P == 8-#define HTYPE_PTRDIFF_T Int64-#else-#define HTYPE_PTRDIFF_T Int32-#endif--#if SIZEOF_CLOCK_T == 8-#define HTYPE_CLOCK_T Word64-#else-#define HTYPE_CLOCK_T Word32-#endif--#if SIZEOF_TIME_T == 8-#define HTYPE_TIME_T Word64-#else-#define HTYPE_TIME_T Word32-#endif--#if SIZEOF_USECONDS_T == 8-#define HTYPE_USECONDS_T Word64-#else-#define HTYPE_USECONDS_T Word32-#endif--#if SIZEOF_SIZE_T == 8-#define HTYPE_SIZE_T Word64-#else-#define HTYPE_SIZE_T Word32-#endif--#if SIZEOF_WCHAR_T == 1-#define HTYPE_WCHAR_T Word8-#elif SIZEOF_WCHAR_T == 2-#define HTYPE_WCHAR_T Word16-#else-#define HTYPE_WCHAR_T Word32-#endif----/* Define to Haskell type for char */-#define HTYPE_CHAR Int8--/* Define to Haskell type for double */-#define HTYPE_DOUBLE Double--/* Define to Haskell type for float */-#define HTYPE_FLOAT Float--/* Define to Haskell type for intmax_t */-#define HTYPE_INTMAX_T Int64--/* Define to Haskell type for long long */-#define HTYPE_LONG_LONG Int64--/* Define to Haskell type for short */-#define HTYPE_SHORT Int16--/* Define to Haskell type for signed char */-#define HTYPE_SIGNED_CHAR Int8--/* Define to Haskell type for uintmax_t */-#define HTYPE_UINTMAX_T Word64--/* Define to Haskell type for unsigned char */-#define HTYPE_UNSIGNED_CHAR Word8--/* Define to Haskell type for unsigned long long */-#define HTYPE_UNSIGNED_LONG_LONG Word64--/* Define to Haskell type for unsigned short */-#define HTYPE_UNSIGNED_SHORT Word16----/********************************************************************/-/**** System tupes ****/-/********************************************************************/--#ifdef SIZEOF_DEV_T-# if SIZEOF_DEV_T == 8-# define HTYPE_DEV_T Word64-# elif SIZEOF_DEV_T == 4-# define HTYPE_DEV_T Word32-# elif SIZEOF_DEV_T == 2-# define HTYPE_DEV_T Word16-# else-# endif-#endif--#ifdef SIZEOF_INO_T-# if SIZEOF_INO_T == 8-# define HTYPE_INO_T Word64-# elif SIZEOF_INO_T == 4-# define HTYPE_INO_T Word32-# elif SIZEOF_INO_T == 2-# define HTYPE_INO_T Word16-# else-# endif-#endif--#ifdef SIZEOF_MODE_T-# if SIZEOF_MODE_T == 8-# define HTYPE_MODE_T Word64-# elif SIZEOF_MODE_T == 4-# define HTYPE_MODE_T Word32-# elif SIZEOF_MODE_T == 2-# define HTYPE_MODE_T Word16-# else-# endif-#endif--#ifdef SIZEOF_OFF_T-# if SIZEOF_OFF_T == 8-# define HTYPE_OFF_T Word64-# elif SIZEOF_OFF_T == 4-# define HTYPE_OFF_T Word32-# elif SIZEOF_OFF_T == 2-# define HTYPE_OFF_T Word16-# else-# endif-#endif--#ifdef SIZEOF_PID_T-# if SIZEOF_PID_T == 8-# define HTYPE_PID_T Word64-# elif SIZEOF_PID_T == 4-# define HTYPE_PID_T Word32-# elif SIZEOF_PID_T == 2-# define HTYPE_PID_T Word16-# else-# endif-#endif--#ifdef SIZEOF_SSIZE_T-# if SIZEOF_SSIZE_T == 8-# define HTYPE_SSIZE_T Word64-# elif SIZEOF_SSIZE_T == 4-# define HTYPE_SSIZE_T Word32-# elif SIZEOF_SSIZE_T == 2-# define HTYPE_SSIZE_T Word16-# else-# endif-#endif--#ifdef SIZEOF_GID_T-# if SIZEOF_GID_T == 8-# define HTYPE_GID_T Word64-# elif SIZEOF_GID_T == 4-# define HTYPE_GID_T Word32-# elif SIZEOF_GID_T == 2-# define HTYPE_GID_T Word16-# else-# endif-#endif--#ifdef SIZEOF_NLINK_T-# if SIZEOF_NLINK_T == 8-# define HTYPE_NLINK_T Word64-# elif SIZEOF_NLINK_T == 4-# define HTYPE_NLINK_T Word32-# elif SIZEOF_NLINK_T == 2-# define HTYPE_NLINK_T Word16-# else-# endif-#endif--#ifdef SIZEOF_UID_T-# if SIZEOF_UID_T == 8-# define HTYPE_UID_T Word64-# elif SIZEOF_UID_T == 4-# define HTYPE_UID_T Word32-# elif SIZEOF_UID_T == 2-# define HTYPE_UID_T Word16-# else-# endif-#endif--#ifdef SIZEOF_CC_T-# if SIZEOF_CC_T == 8-# define HTYPE_CC_T Word64-# elif SIZEOF_CC_T == 4-# define HTYPE_CC_T Word32-# elif SIZEOF_CC_T == 2-# define HTYPE_CC_T Word16-# else-# endif-#endif--#ifdef SIZEOF_SPEED_T-# if SIZEOF_SPEED_T == 8-# define HTYPE_SPEED_T Word64-# elif SIZEOF_SPEED_T == 4-# define HTYPE_SPEED_T Word32-# elif SIZEOF_SPEED_T == 2-# define HTYPE_SPEED_T Word16-# else-# endif-#endif--#ifdef SIZEOF_TCFLAG_T-# if SIZEOF_TCFLAG_T == 8-# define HTYPE_TCFLAG_T Word64-# elif SIZEOF_TCFLAG_T == 4-# define HTYPE_TCFLAG_T Word32-# elif SIZEOF_TCFLAG_T == 2-# define HTYPE_TCFLAG_T Word16-# else-# endif-#endif--#ifdef SIZEOF_RLIM_T-# if SIZEOF_RLIM_T == 8-# define HTYPE_RLIM_T Word64-# elif SIZEOF_RLIM_T == 4-# define HTYPE_RLIM_T Word32-# elif SIZEOF_RLIM_T == 2-# define HTYPE_RLIM_T Word16-# else-# endif-#endif--/********************************************************************/-/**** Presence of include files ****/-/********************************************************************/--#define HAVE_DIRENT_H 1-#define HAVE_ERRNO_H 1-#define HAVE_FCNTL_H 1-#define HAVE_INTTYPES_H 1-#define HAVE_LIMITS_H 1-#define HAVE_SIGNAL_H 1-#define HAVE_STDINT_H 1-#define HAVE_STRING_H 1-#define HAVE_SYS_RESOURCE_H 1-#define HAVE_SYS_SELECT_H 1-#define HAVE_SYS_STAT_H 1-#define HAVE_SYS_SYSCALL_H 1-#define HAVE_SYS_TIME_H 1-#define HAVE_SYS_TIMEB_H 1-/* #undef HAVE_SYS_TIMERS_H */-#define HAVE_SYS_TIMES_H 1-#define HAVE_SYS_TYPES_H 1-#define HAVE_SYS_UTSNAME_H 1-#define HAVE_SYS_WAIT_H 1-#define HAVE_TERMIOS_H 1-#define HAVE_TIME_H 1-#define HAVE_UNISTD_H 1-#define HAVE_UTIME_H 1-/* #undef HAVE_VFORK_H */-#define HAVE_WCTYPE_H 1-/* #undef HAVE_WINDOWS_H */-/* #undef HAVE_WINSOCK_H */--/* #undef HAVE__CHSIZE */-#define HAVE_FTRUNCATE 1-/* #undef HAVE_GETCLOCK */-#define HAVE_GETRUSAGE 1-#define HAVE_GETTIMEOFDAY 1-#define HAVE_LSTAT 1-#define HAVE_READDIR_R 1--/********************************************************************/-/**** Runtime types ****/-/********************************************************************/--#ifdef __UHC_BUILDS_O__--#if defined(__UHC_TARGET_BC__) || defined(__UHC_TARGET_C__)-// # define HsBool Word-// # define HsInt Word-// # define HsWord64 Word64-// # define HsWord32 Word32-// # define HsWord16 Word16-// # define HsWord8 Word8-// # ifdef __UHC_TARGET_BC__-// # define HS_BOOL_FALSE gb_False-// # define HS_BOOL_TRUE gb_True-// # else-// # define HS_BOOL_FALSE 0-// # define HS_BOOL_TRUE 1-// # endif-#endif /* __UHC_TARGET_BC__ */--#endif /* __UHC_BUILDS_O__ */--/********************************************************************/-/**** Read dir EOF error ****/-/********************************************************************/--/* See remarks in GHC, libraries/base/aclocal.m4: MinGW platform returns non 0 value. We ignore that */-#define READDIR_ERRNO_EOF 0--/********************************************************************/-/**** C errors ****/-/********************************************************************/--/* (1) Assume errno.h is already included */-/* (2) Error codes like EADV are not present on all platforms, so a dummy value is provided, this should be done for all codes */--/* The value of E2BIG. */-#if !defined(E2BIG)-#define E2BIG 10000-#endif-#define CONST_E2BIG E2BIG--/* The value of EACCES. */-#if !defined(EACCES)-#define EACCES 10000-#endif-#define CONST_EACCES EACCES--/* The value of EADDRINUSE. */-#if !defined(EADDRINUSE)-#define EADDRINUSE 10000-#endif-#define CONST_EADDRINUSE EADDRINUSE--/* The value of EADDRNOTAVAIL. */-#define CONST_EADDRNOTAVAIL EADDRNOTAVAIL--/* The value of EADV. */-#if !defined(EADV)-#define EADV 10000-#endif-#define CONST_EADV EADV--/* The value of EAFNOSUPPORT. */-#if !defined(EAFNOSUPPORT)-#define EAFNOSUPPORT 10000-#endif-#define CONST_EAFNOSUPPORT EAFNOSUPPORT--/* The value of EAGAIN. */-#if !defined(EAGAIN)-#define EAGAIN 10000-#endif-#define CONST_EAGAIN EAGAIN--/* The value of EALREADY. */-#if !defined(EALREADY)-#define EALREADY 10000-#endif-#define CONST_EALREADY EALREADY--/* The value of EBADF. */-#if !defined(EBADF)-#define EBADF 10000-#endif-#define CONST_EBADF EBADF--/* The value of EBADMSG. */-#if !defined(EBADMSG)-#define EBADMSG 10000-#endif-#define CONST_EBADMSG EBADMSG--/* The value of EBADRPC. */-#if !defined(EBADRPC)-#define EBADRPC 10000-#endif-#define CONST_EBADRPC EBADRPC--/* The value of EBUSY. */-#if !defined(EBUSY)-#define EBUSY 10000-#endif-#define CONST_EBUSY EBUSY--/* The value of ECHILD. */-#if !defined(ECHILD)-#define ECHILD 10000-#endif-#define CONST_ECHILD ECHILD--/* The value of ECOMM. */-#if !defined(ECOMM)-#define ECOMM 10000-#endif-#define CONST_ECOMM ECOMM--/* The value of ECONNABORTED. */-#if !defined(ECONNABORTED)-#define ECONNABORTED 10000-#endif-#define CONST_ECONNABORTED ECONNABORTED--/* The value of ECONNREFUSED. */-#if !defined(ECONNREFUSED)-#define ECONNREFUSED 10000-#endif-#define CONST_ECONNREFUSED ECONNREFUSED--/* The value of ECONNRESET. */-#if !defined(ECONNRESET)-#define ECONNRESET 10000-#endif-#define CONST_ECONNRESET ECONNRESET--/* The value of EDEADLK. */-#if !defined(EDEADLK)-#define EDEADLK 10000-#endif-#define CONST_EDEADLK EDEADLK--/* The value of EDESTADDRREQ. */-#if !defined(EDESTADDRREQ)-#define EDESTADDRREQ 10000-#endif-#define CONST_EDESTADDRREQ EDESTADDRREQ--/* The value of EDIRTY. */-#if !defined(EDIRTY)-#define EDIRTY 10000-#endif-#define CONST_EDIRTY EDIRTY--/* The value of EDOM. */-#if !defined(EDOM)-#define EDOM 10000-#endif-#define CONST_EDOM EDOM--/* The value of EDQUOT. */-#if !defined(EDQUOT)-#define EDQUOT 10000-#endif-#define CONST_EDQUOT EDQUOT--/* The value of EEXIST. */-#if !defined(EEXIST)-#define EEXIST 10000-#endif-#define CONST_EEXIST EEXIST--/* The value of EFAULT. */-#if !defined(EFAULT)-#define EFAULT 10000-#endif-#define CONST_EFAULT EFAULT--/* The value of EFBIG. */-#if !defined(EFBIG)-#define EFBIG 10000-#endif-#define CONST_EFBIG EFBIG--/* The value of EFTYPE. */-#if !defined(EFTYPE)-#define EFTYPE 10000-#endif-#define CONST_EFTYPE EFTYPE--/* The value of EHOSTDOWN. */-#if !defined(EHOSTDOWN)-#define EHOSTDOWN 10000-#endif-#define CONST_EHOSTDOWN EHOSTDOWN--/* The value of EHOSTUNREACH. */-#if !defined(EHOSTUNREACH)-#define EHOSTUNREACH 10000-#endif-#define CONST_EHOSTUNREACH EHOSTUNREACH--/* The value of EIDRM. */-#if !defined(EIDRM)-#define EIDRM 10000-#endif-#define CONST_EIDRM EIDRM--/* The value of EILSEQ. */-#if !defined(EILSEQ)-#define EILSEQ 10000-#endif-#define CONST_EILSEQ EILSEQ--/* The value of EINPROGRESS. */-#if !defined(EINPROGRESS)-#define EINPROGRESS 10000-#endif-#define CONST_EINPROGRESS EINPROGRESS--/* The value of EINTR. */-#if !defined(EINTR)-#define EINTR 10000-#endif-#define CONST_EINTR EINTR--/* The value of EINVAL. */-#if !defined(EINVAL)-#define EINVAL 10000-#endif-#define CONST_EINVAL EINVAL--/* The value of EIO. */-#if !defined(EIO)-#define EIO 10000-#endif-#define CONST_EIO EIO--/* The value of EISCONN. */-#if !defined(EISCONN)-#define EISCONN 10000-#endif-#define CONST_EISCONN EISCONN--/* The value of EISDIR. */-#if !defined(EISDIR)-#define EISDIR 10000-#endif-#define CONST_EISDIR EISDIR--/* The value of ELOOP. */-#if !defined(ELOOP)-#define ELOOP 10000-#endif-#define CONST_ELOOP ELOOP--/* The value of EMFILE. */-#if !defined(EMFILE)-#define EMFILE 10000-#endif-#define CONST_EMFILE EMFILE--/* The value of EMLINK. */-#if !defined(EMLINK)-#define EMLINK 10000-#endif-#define CONST_EMLINK EMLINK--/* The value of EMSGSIZE. */-#if !defined(EMSGSIZE)-#define EMSGSIZE 10000-#endif-#define CONST_EMSGSIZE EMSGSIZE--/* The value of EMULTIHOP. */-#if !defined(EMULTIHOP)-#define EMULTIHOP 10000-#endif-#define CONST_EMULTIHOP EMULTIHOP--/* The value of ENAMETOOLONG. */-#if !defined(ENAMETOOLONG)-#define ENAMETOOLONG 10000-#endif-#define CONST_ENAMETOOLONG ENAMETOOLONG--/* The value of ENETDOWN. */-#if !defined(ENETDOWN)-#define ENETDOWN 10000-#endif-#define CONST_ENETDOWN ENETDOWN--/* The value of ENETRESET. */-#if !defined(ENETRESET)-#define ENETRESET 10000-#endif-#define CONST_ENETRESET ENETRESET--/* The value of ENETUNREACH. */-#if !defined(ENETUNREACH)-#define ENETUNREACH 10000-#endif-#define CONST_ENETUNREACH ENETUNREACH--/* The value of ENFILE. */-#if !defined(ENFILE)-#define ENFILE 10000-#endif-#define CONST_ENFILE ENFILE--/* The value of ENOBUFS. */-#if !defined(ENOBUFS)-#define ENOBUFS 10000-#endif-#define CONST_ENOBUFS ENOBUFS--/* The value of ENOCIGAR. */-#if !defined(ENOCIGAR)-#define ENOCIGAR 10000-#endif-#define CONST_ENOCIGAR ENOCIGAR--/* The value of ENODATA. */-#if !defined(ENODATA)-#define ENODATA 10000-#endif-#define CONST_ENODATA ENODATA--/* The value of ENODEV. */-#if !defined(ENODEV)-#define ENODEV 10000-#endif-#define CONST_ENODEV ENODEV--/* The value of ENOENT. */-#if !defined(ENOENT)-#define ENOENT 10000-#endif-#define CONST_ENOENT ENOENT--/* The value of ENOEXEC. */-#if !defined(ENOEXEC)-#define ENOEXEC 10000-#endif-#define CONST_ENOEXEC ENOEXEC--/* The value of ENOLCK. */-#if !defined(ENOLCK)-#define ENOLCK 10000-#endif-#define CONST_ENOLCK ENOLCK--/* The value of ENOLINK. */-#if !defined(ENOLINK)-#define ENOLINK 10000-#endif-#define CONST_ENOLINK ENOLINK--/* The value of ENOMEM. */-#if !defined(ENOMEM)-#define ENOMEM 10000-#endif-#define CONST_ENOMEM ENOMEM--/* The value of ENOMSG. */-#if !defined(ENOMSG)-#define ENOMSG 10000-#endif-#define CONST_ENOMSG ENOMSG--/* The value of ENONET. */-#if !defined(ENONET)-#define ENONET 10000-#endif-#define CONST_ENONET ENONET--/* The value of ENOPROTOOPT. */-#if !defined(ENOPROTOOPT)-#define ENOPROTOOPT 10000-#endif-#define CONST_ENOPROTOOPT ENOPROTOOPT--/* The value of ENOSPC. */-#if !defined(ENOSPC)-#define ENOSPC 10000-#endif-#define CONST_ENOSPC ENOSPC--/* The value of ENOSR. */-#if !defined(ENOSR)-#define ENOSR 10000-#endif-#define CONST_ENOSR ENOSR--/* The value of ENOSTR. */-#if !defined(ENOSTR)-#define ENOSTR 10000-#endif-#define CONST_ENOSTR ENOSTR--/* The value of ENOSYS. */-#if !defined(ENOSYS)-#define ENOSYS 10000-#endif-#define CONST_ENOSYS ENOSYS--/* The value of ENOTBLK. */-#if !defined(ENOTBLK)-#define ENOTBLK 10000-#endif-#define CONST_ENOTBLK ENOTBLK--/* The value of ENOTCONN. */-#if !defined(ENOTCONN)-#define ENOTCONN 10000-#endif-#define CONST_ENOTCONN ENOTCONN--/* The value of ENOTDIR. */-#if !defined(ENOTDIR)-#define ENOTDIR 10000-#endif-#define CONST_ENOTDIR ENOTDIR--/* The value of ENOTEMPTY. */-#if !defined(ENOTEMPTY)-#define ENOTEMPTY 10000-#endif-#define CONST_ENOTEMPTY ENOTEMPTY--/* The value of ENOTSOCK. */-#if !defined(ENOTSOCK)-#define ENOTSOCK 10000-#endif-#define CONST_ENOTSOCK ENOTSOCK--/* The value of ENOTTY. */-#if !defined(ENOTTY)-#define ENOTTY 10000-#endif-#define CONST_ENOTTY ENOTTY--/* The value of ENXIO. */-#if !defined(ENXIO)-#define ENXIO 10000-#endif-#define CONST_ENXIO ENXIO--/* The value of EOPNOTSUPP. */-#if !defined(EOPNOTSUPP)-#define EOPNOTSUPP 10000-#endif-#define CONST_EOPNOTSUPP EOPNOTSUPP--/* The value of EPERM. */-#if !defined(EPERM)-#define EPERM 10000-#endif-#define CONST_EPERM EPERM--/* The value of EPFNOSUPPORT. */-#if !defined(EPFNOSUPPORT)-#define EPFNOSUPPORT 10000-#endif-#define CONST_EPFNOSUPPORT EPFNOSUPPORT--/* The value of EPIPE. */-#if !defined(EPIPE)-#define EPIPE 10000-#endif-#define CONST_EPIPE EPIPE--/* The value of EPROCLIM. */-#if !defined(EPROCLIM)-#define EPROCLIM 10000-#endif-#define CONST_EPROCLIM EPROCLIM--/* The value of EPROCUNAVAIL. */-#if !defined(EPROCUNAVAIL)-#define EPROCUNAVAIL 10000-#endif-#define CONST_EPROCUNAVAIL EPROCUNAVAIL--/* The value of EPROGMISMATCH. */-#if !defined(EPROGMISMATCH)-#define EPROGMISMATCH 10000-#endif-#define CONST_EPROGMISMATCH EPROGMISMATCH--/* The value of EPROGUNAVAIL. */-#if !defined(EPROGUNAVAIL)-#define EPROGUNAVAIL 10000-#endif-#define CONST_EPROGUNAVAIL EPROGUNAVAIL--/* The value of EPROTO. */-#if !defined(EPROTO)-#define EPROTO 10000-#endif-#define CONST_EPROTO EPROTO--/* The value of EPROTONOSUPPORT. */-#if !defined(EPROTONOSUPPORT)-#define EPROTONOSUPPORT 10000-#endif-#define CONST_EPROTONOSUPPORT EPROTONOSUPPORT--/* The value of EPROTOTYPE. */-#if !defined(EPROTOTYPE)-#define EPROTOTYPE 10000-#endif-#define CONST_EPROTOTYPE EPROTOTYPE--/* The value of ERANGE. */-#if !defined(ERANGE)-#define ERANGE 10000-#endif-#define CONST_ERANGE ERANGE--/* The value of EREMCHG. */-#if !defined(EREMCHG)-#define EREMCHG 10000-#endif-#define CONST_EREMCHG EREMCHG--/* The value of EREMOTE. */-#if !defined(EREMOTE)-#define EREMOTE 10000-#endif-#define CONST_EREMOTE EREMOTE--/* The value of EROFS. */-#if !defined(EROFS)-#define EROFS 10000-#endif-#define CONST_EROFS EROFS--/* The value of ERPCMISMATCH. */-#if !defined(ERPCMISMATCH)-#define ERPCMISMATCH 10000-#endif-#define CONST_ERPCMISMATCH ERPCMISMATCH--/* The value of ERREMOTE. */-#if !defined(ERREMOTE)-#define ERREMOTE 10000-#endif-#define CONST_ERREMOTE ERREMOTE--/* The value of ESHUTDOWN. */-#if !defined(ESHUTDOWN)-#define ESHUTDOWN 10000-#endif-#define CONST_ESHUTDOWN ESHUTDOWN--/* The value of ESOCKTNOSUPPORT. */-#if !defined(ESOCKTNOSUPPORT)-#define ESOCKTNOSUPPORT 10000-#endif-#define CONST_ESOCKTNOSUPPORT ESOCKTNOSUPPORT--/* The value of ESPIPE. */-#if !defined(ESPIPE)-#define ESPIPE 10000-#endif-#define CONST_ESPIPE ESPIPE--/* The value of ESRCH. */-#if !defined(ESRCH)-#define ESRCH 10000-#endif-#define CONST_ESRCH ESRCH--/* The value of ESRMNT. */-#if !defined(ESRMNT)-#define ESRMNT 10000-#endif-#define CONST_ESRMNT ESRMNT--/* The value of ESTALE. */-#if !defined(ESTALE)-#define ESTALE 10000-#endif-#define CONST_ESTALE ESTALE--/* The value of ETIME. */-#if !defined(ETIME)-#define ETIME 10000-#endif-#define CONST_ETIME ETIME--/* The value of ETIMEDOUT. */-#if !defined(ETIMEDOUT)-#define ETIMEDOUT 10000-#endif-#define CONST_ETIMEDOUT ETIMEDOUT--/* The value of ETOOMANYREFS. */-#if !defined(ETOOMANYREFS)-#define ETOOMANYREFS 10000-#endif-#define CONST_ETOOMANYREFS ETOOMANYREFS--/* The value of ETXTBSY. */-#if !defined(ETXTBSY)-#define ETXTBSY 10000-#endif-#define CONST_ETXTBSY ETXTBSY--/* The value of EUSERS. */-#if !defined(EUSERS)-#define EUSERS 10000-#endif-#define CONST_EUSERS EUSERS--/* The value of EWOULDBLOCK. */-#if !defined(EWOULDBLOCK)-#define EWOULDBLOCK 10000-#endif-#define CONST_EWOULDBLOCK EWOULDBLOCK--/* The value of EXDEV. */-#if !defined(EXDEV)-#define EXDEV 10000-#endif-#define CONST_EXDEV EXDEV--/* The value of O_BINARY. */-#if !defined(O_BINARY)-#define O_BINARY 10000-#endif-#define CONST_O_BINARY O_BINARY--/* The value of SIGINT. */-#if !defined(SIGINT)-#define SIGINT 10000-#endif-#define CONST_SIGINT SIGINT---#endif-
@@ -1,242 +0,0 @@-{- ---------------------------------------------------------------------------// Macros to help make various instances for Int like types (Int8, ...).-//-// Primitives are defined by 2 forms of macros:-// - starting with PRIMS_ : name of Haskell function and primitive is the same-// - starting with PRIMS2_ : name of primitive is given explicitly, to allow sharing between primitives-// ----------------------------------------------------------------------------}---- define conversion primitives-#define PRIMS_CONVERSION_INTEGER(tycon,primIntegerTo,primToInteger) \-foreign import prim primIntegerTo :: Integer -> tycon ; \-foreign import prim primToInteger :: tycon -> Integer --#define PRIMS2_CONVERSION_INTEGER(tycon,primIntegerTo,primIntegerToNm,primToInteger,primToIntegerNm) \-foreign import prim primIntegerToNm primIntegerTo :: Integer -> tycon ; \-foreign import prim primToIntegerNm primToInteger :: tycon -> Integer --#define PRIMS_CONVERSION_INT(tycon,primIntTo,primToInt) \-foreign import prim primIntTo :: Int -> tycon ; \-foreign import prim primToInt :: tycon -> Int ----- define Eq primitives-#define PRIMS_EQ(tycon,primEq,primNe) \-foreign import prim primEq :: tycon -> tycon -> Bool ; \-foreign import prim primNe :: tycon -> tycon -> Bool --#define PRIMS2_EQ(tycon,primEq,primEqNm,primNe,primNeNm) \-foreign import prim primEqNm primEq :: tycon -> tycon -> Bool ; \-foreign import prim primNeNm primNe :: tycon -> tycon -> Bool----- define Eq instance-#define INSTANCE_EQ(tycon,primEq,primNe) \-instance Eq tycon where \- { (==) = primEq ; \- (/=) = primNe \- }----- define Ord primitives--#define PRIMS_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \-foreign import prim primCmp :: tycon -> tycon -> Ordering ; \-foreign import prim primLt :: tycon -> tycon -> Bool ; \-foreign import prim primGt :: tycon -> tycon -> Bool ; \-foreign import prim primLe :: tycon -> tycon -> Bool ; \-foreign import prim primGe :: tycon -> tycon -> Bool --#define PRIMS2_ORD(tycon,primCmp,primCmpNm,primLt,primLtNm,primGt,primGtNm,primLe,primLeNm,primGe,primGeNm) \-foreign import prim primCmpNm primCmp :: tycon -> tycon -> Ordering ; \-foreign import prim primLtNm primLt :: tycon -> tycon -> Bool ; \-foreign import prim primGtNm primGt :: tycon -> tycon -> Bool ; \-foreign import prim primLeNm primLe :: tycon -> tycon -> Bool ; \-foreign import prim primGeNm primGe :: tycon -> tycon -> Bool ----- define Ord instance--#define INSTANCE_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \-instance Ord tycon where \- { compare = primCmp \- ; (<) = primLt \- ; (>) = primGt \- ; (<=) = primLe \- ; (>=) = primGe \- }----- define Bounded primitives-#define PRIMS_BOUNDED(tycon,primMin,primMax) \-foreign import prim primMin :: tycon ; \-foreign import prim primMax :: tycon ----- define Bounded instance-#define INSTANCE_BOUNDED(tycon,primMin,primMax) \-instance Bounded tycon where \- { minBound = primMin \- ; maxBound = primMax \- }----- define Num primitives-#define PRIMS_NUM(tycon,primAdd,primSub,primMul,primNeg) \-foreign import prim primAdd :: tycon -> tycon -> tycon ; \-foreign import prim primSub :: tycon -> tycon -> tycon ; \-foreign import prim primMul :: tycon -> tycon -> tycon ; \-foreign import prim primNeg :: tycon -> tycon --#define PRIMS2_NUM(tycon,primAdd,primAddNm,primSub,primSubNm,primMul,primMulNm,primNeg,primNegNm) \-foreign import prim primAddNm primAdd :: tycon -> tycon -> tycon ; \-foreign import prim primSubNm primSub :: tycon -> tycon -> tycon ; \-foreign import prim primMulNm primMul :: tycon -> tycon -> tycon ; \-foreign import prim primNegNm primNeg :: tycon -> tycon ----- define Num instance-#define INSTANCE_NUM(tycon,primAdd,primSub,primMul,primNeg,primIntegerTo,primIntTo) \-instance Num tycon where \- { (+) = primAdd \- ; (-) = primSub \- ; (*) = primMul \- ; negate = primNeg \- ; fromInteger = primIntegerTo \- ; fromInt = primIntTo \- ; abs = absReal \- ; signum = signumReal \- }----- define Enum instance-#define INSTANCE_ENUM(tycon,primToEnum,primFromEnum) \-instance Enum tycon where \- { succ = boundedSucc \- ; pred = boundedPred \- ; toEnum = primToEnum \- ; fromEnum = primFromEnum \- ; enumFrom = boundedEnumFrom \- ; enumFromTo = boundedEnumFromTo \- ; enumFromThen = boundedEnumFromThen \- ; enumFromThenTo = boundedEnumFromThenTo \- }----- define Real instance-#define INSTANCE_REAL(tycon) \-instance Real tycon where \- { toRational x = toInteger x % 1 \- }----- define Integral primitives-#define PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) \-foreign import prim primDiv :: tycon -> tycon -> tycon ; \-foreign import prim primMod :: tycon -> tycon -> tycon ; \-foreign import prim primQuot :: tycon -> tycon -> tycon ; \-foreign import prim primRem :: tycon -> tycon -> tycon --#define PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primRemNm) \-foreign import prim primDivNm primDiv :: tycon -> tycon -> tycon ; \-foreign import prim primModNm primMod :: tycon -> tycon -> tycon ; \-foreign import prim primQuotNm primQuot :: tycon -> tycon -> tycon ; \-foreign import prim primRemNm primRem :: tycon -> tycon -> tycon --#define PRIMS_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem) \-PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) ; \-foreign import prim primDivMod :: tycon -> tycon -> (tycon,tycon) ; \-foreign import prim primQuotRem :: tycon -> tycon -> (tycon,tycon) --#define PRIMS2_INTEGRAL2(tycon,primDiv,primDivNm,primMod,primModNm,primDivMod,primDivModNm,primQuot,primQuotNm,primRem,primRemNm,primQuotRem,primQuotRemNm) \-PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primQuotRemNm) ; \-foreign import prim primDivModNm primDivMod :: tycon -> tycon -> (tycon,tycon) ; \-foreign import prim primQuotRemNm primQuotRem :: tycon -> tycon -> (tycon,tycon) ----- define Integral instance, assume default for divMod-#define INSTANCE_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem,primToInteger,primToInt) \-instance Integral tycon where \- { quotRem d m \- = (primQuot d m, primRem d m) \- ; div = primDiv \- ; quot = primQuot \- ; rem = primRem \- ; mod = primMod \- ; toInteger = primToInteger \- ; toInt = primToInt \- }--#define INSTANCE_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem,primToInteger,primToInt) \-instance Integral tycon where \- { divMod = primDivMod \- ; quotRem = primQuotRem \- ; div = primDiv \- ; quot = primQuot \- ; rem = primRem \- ; mod = primMod \- ; toInteger = primToInteger \- ; toInt = primToInt \- }----- define Show instance-#define INSTANCE_SHOW(tycon) \-instance Show tycon where \- { show = show . toInteger \- }----- define Read instance-#define INSTANCE_READ(tycon) \-instance Read tycon where \- { readsPrec p = readSigned readDec \- }----- define Bits primitives-#define PRIMS_BITLOGIC(tycon,primAnd,primOr,primXor) \-foreign import prim primAnd :: tycon -> tycon -> tycon ; \-foreign import prim primOr :: tycon -> tycon -> tycon ; \-foreign import prim primXor :: tycon -> tycon -> tycon--#define PRIMS_BITSHIFT(tycon,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \-foreign import prim primComplement :: tycon -> tycon ; \-foreign import prim primShiftLeft :: tycon -> Int -> tycon ; \-foreign import prim primShiftRight :: tycon -> Int -> tycon ; \-foreign import prim primRotateLeft :: tycon -> Int -> tycon ; \-foreign import prim primRotateRight :: tycon -> Int -> tycon--#define PRIMS2_BITLOGIC(tycon,primAnd,primAndNm,primOr,primOrNm,primXor,primXorNm) \-foreign import prim primAndNm primAnd :: tycon -> tycon -> tycon ; \-foreign import prim primOrNm primOr :: tycon -> tycon -> tycon ; \-foreign import prim primXorNm primXor :: tycon -> tycon -> tycon--#define PRIMS2_BITSHIFT(tycon,primComplement,primComplementNm,primShiftLeft,primShiftLeftNm,primShiftRight,primShiftRightNm,primRotateLeft,primRotateLeftNm,primRotateRight,primRotateRightNm) \-foreign import prim primComplementNm primComplement :: tycon -> tycon ; \-foreign import prim primShiftLeftNm primShiftLeft :: tycon -> Int -> tycon ; \-foreign import prim primShiftRightNm primShiftRight :: tycon -> Int -> tycon ; \-foreign import prim primRotateLeftNm primRotateLeft :: tycon -> Int -> tycon ; \-foreign import prim primRotateRightNm primRotateRight :: tycon -> Int -> tycon---- define Bits instance-#define INSTANCE_BITS1(tycon,size,signed,primAnd,primOr,primXor,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \-instance Bits tycon where \- { (.&.) = primAnd \- ; (.|.) = primOr \- ; xor = primXor \- ; complement = primComplement \- ; shiftL = primShiftLeft \- ; shiftR = primShiftRight \- ; rotateL = primRotateLeft \- ; rotateR = primRotateRight \- ; bitSize _ = size \- ; isSigned _ = signed \- }------
@@ -1,125 +0,0 @@-/* ehclib/uhcbase/include/MachDeps.h. Generated from MachDeps.h.in by configure. */-#ifndef MACHDEPS_H-#define MACHDEPS_H--#define SIZEOF_INTPTR_T 8-#define SIZEOF_CHAR 1-#define SIZEOF_SHORT 2-#define SIZEOF_INT 4-#define SIZEOF_LONG 8-#define SIZEOF_LONG_LONG 8-#define SIZEOF_FLOAT 4-#define SIZEOF_DOUBLE 8-#define SIZEOF_UNSIGNED_CHAR 1-#define SIZEOF_UNSIGNED_SHORT 2-#define SIZEOF_UNSIGNED_INT 4-#define SIZEOF_UNSIGNED_LONG 8-#define SIZEOF_UNSIGNED_LONG_LONG 8-#define SIZEOF_VOID_P 8--#define SIZEOF_DEV_T 4-#define SIZEOF_INO_T 8-#define SIZEOF_OFF_T 8-#define SIZEOF_MODE_T 2-#define SIZEOF_PID_T 4-#define SIZEOF_SSIZE_T 8-#define SIZEOF_GID_T 4-#define SIZEOF_NLINK_T 2-#define SIZEOF_UID_T 4-#define SIZEOF_RLIM_T 8-#define SIZEOF_CLOCK_T 8-#define SIZEOF_TIME_T 8-#define SIZEOF_SIZE_T 8-#define SIZEOF_WCHAR_T 4--#define SIZEOF_CC_T 1-#define SIZEOF_SPEED_T 8-#define SIZEOF_TCFLAG_T 8--#define ALIGNOF_INTPTR_T 8-#define ALIGNOF_CHAR 1-#define ALIGNOF_SHORT 2-#define ALIGNOF_INT 4-#define ALIGNOF_LONG 8-#define ALIGNOF_LONG_LONG 8-#define ALIGNOF_FLOAT 4-#define ALIGNOF_DOUBLE 8-#define ALIGNOF_UNSIGNED_CHAR 1-#define ALIGNOF_UNSIGNED_SHORT 2-#define ALIGNOF_UNSIGNED_INT 4-#define ALIGNOF_UNSIGNED_LONG 8-#define ALIGNOF_UNSIGNED_LONG_LONG 8-#define ALIGNOF_VOID_P 8--#define ALIGNOF_UINT8_T 1-#define ALIGNOF_UINT16_T 2-#define ALIGNOF_UINT32_T 4-#define ALIGNOF_UINT64_T 8--#if SIZEOF_INTPTR_T == 8-#define USE_64_BITS 1-#define USE_32_BITS 0-#else-#define USE_64_BITS 0-#define USE_32_BITS 1-#endif--#ifdef __UHC_TARGET_BC__-#define BITSIZEOF_WORDTAG 1-#else-#define BITSIZEOF_WORDTAG 0-#endif--#define SIZEOF_HSCHAR SIZEOF_INTPTR_T-#define ALIGNMENT_HSCHAR ALIGNOF_UINT32_T--#define SIZEOF_HSINT SIZEOF_INTPTR_T-#define ALIGNMENT_HSINT ALIGNOF_INTPTR_T--#define SIZEOF_HSWORD SIZEOF_INTPTR_T-#define ALIGNMENT_HSWORD ALIGNOF_INTPTR_T--#define SIZEOF_HSDOUBLE SIZEOF_DOUBLE-#define ALIGNMENT_HSDOUBLE ALIGNOF_DOUBLE--#define SIZEOF_HSFLOAT SIZEOF_FLOAT-#define ALIGNMENT_HSFLOAT ALIGNOF_FLOAT--#define SIZEOF_HSPTR SIZEOF_VOID_P-#define ALIGNMENT_HSPTR ALIGNOF_VOID_P--#define SIZEOF_HSFUNPTR SIZEOF_VOID_P-#define ALIGNMENT_HSFUNPTR ALIGNOF_VOID_P--#define SIZEOF_HSFOREIGNPTR SIZEOF_VOID_P-#define ALIGNMENT_HSFOREIGNPTR ALIGNOF_VOID_P--#define SIZEOF_HSSTABLEPTR SIZEOF_VOID_P-#define ALIGNMENT_HSSTABLEPTR ALIGNOF_VOID_P--#define SIZEOF_INT8 8-#define ALIGNMENT_INT8 ALIGNOF_UINT8_T--#define SIZEOF_WORD8 8-#define ALIGNMENT_WORD8 ALIGNOF_UINT8_T--#define SIZEOF_INT16 16-#define ALIGNMENT_INT16 ALIGNOF_UINT16_T--#define SIZEOF_WORD16 16-#define ALIGNMENT_WORD16 ALIGNOF_UINT16_T--#define SIZEOF_INT32 32-#define ALIGNMENT_INT32 ALIGNOF_UINT32_T--#define SIZEOF_WORD32 32-#define ALIGNMENT_WORD32 ALIGNOF_UINT32_T--#define SIZEOF_INT64 64-#define ALIGNMENT_INT64 ALIGNOF_UINT64_T--#define SIZEOF_WORD64 64-#define ALIGNMENT_WORD64 ALIGNOF_UINT64_T---#endif
@@ -1,147 +0,0 @@-{- ---------------------------------------------------------------------------// Macros to help make various instances for tuples.-// A kind of poor mans deriving.-//-// ----------------------------------------------------------------------------}--#define COMMA ,--{- ---------------------------------------------------------------------------// 2 tuple, 1 unary op-// ----------------------------------------------------------------------------}-#define TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-instance (clscon a, clscon b) => clscon (a,b) where \- { op1 op1preArg (a,b) op1postArg \- = pre \- op1subop a \- sep op1subop b \- post \- }--{- ---------------------------------------------------------------------------// 3 tuple, 1 unary op-// ----------------------------------------------------------------------------}-#define TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \- { op1 op1preArg (a,b,c) op1postArg \- = pre \- op1subop a \- sep op1subop b \- sep op1subop c \- post \- }--{- ---------------------------------------------------------------------------// 4 tuple, 1 unary op-// ----------------------------------------------------------------------------}-#define TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \- { op1 op1preArg (a,b,c,d) op1postArg \- = pre \- op1subop a \- sep op1subop b \- sep op1subop c \- sep op1subop d \- post \- }--{- ---------------------------------------------------------------------------// 5 tuple, 1 unary op-// ----------------------------------------------------------------------------}-#define TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \- { op1 op1preArg (a,b,c,d,e) op1postArg \- = pre \- op1subop a \- sep op1subop b \- sep op1subop c \- sep op1subop d \- sep op1subop e \- post \- }--{- ---------------------------------------------------------------------------// Set of 2..n tuple, 1 unary op-// ----------------------------------------------------------------------------}-#define TUPLE_UNOP1_INSTANCES(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-{ TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\- TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\- TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\- TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \-}--{- ---------------------------------------------------------------------------// 2 tuple, 1 binary op-// ----------------------------------------------------------------------------}-#define TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \-instance (clscon a, clscon b) => clscon (a,b) where \- { (a1,b1) op1 (a2,b2) \- = pre \- a1 op1subop a2 \- sep b1 op1subop b2 \- post \- }--{- ---------------------------------------------------------------------------// 3 tuple, 1 binary op-// ----------------------------------------------------------------------------}-#define TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \- { (a1,b1,c1) op1 (a2,b2,c2) \- = pre \- a1 op1subop a2 \- sep b1 op1subop b2 \- sep c1 op1subop c2 \- post \- }--{- ---------------------------------------------------------------------------// 4 tuple, 1 binary op-// ----------------------------------------------------------------------------}-#define TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \- { (a1,b1,c1,d1) op1 (a2,b2,c2,d2) \- = pre \- a1 op1subop a2 \- sep b1 op1subop b2 \- sep c1 op1subop c2 \- sep d1 op1subop d2 \- post \- }--{- ---------------------------------------------------------------------------// 5 tuple, 1 binary op-// ----------------------------------------------------------------------------}-#define TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \-instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \- { (a1,b1,c1,d1,e1) op1 (a2,b2,c2,d2,e2) \- = pre \- a1 op1subop a2 \- sep b1 op1subop b2 \- sep c1 op1subop c2 \- sep d1 op1subop d2 \- sep e1 op1subop e2 \- post \- }--{- ---------------------------------------------------------------------------// Set of 2..n tuple, 1 binary op-// ----------------------------------------------------------------------------}-#define TUPLE_BINOP1_INSTANCES(clscon,op1,op1subop,pre,sep,post) \-{ TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\- TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\- TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\- TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \-}-
@@ -1,149 +0,0 @@-{- ---------------------------------------------------------------------------// Macros to help make Typeable instances.-//-// INSTANCE_TYPEABLEn(tc,tcname,"tc") defines-//-// instance Typeable/n/ tc-// instance Typeable a => Typeable/n-1/ (tc a)-// instance (Typeable a, Typeable b) => Typeable/n-2/ (tc a b)-// ...-// instance (Typeable a1, ..., Typeable an) => Typeable (tc a1 ... an)-// ----------------------------------------------------------------------------}--#ifndef TYPEABLE_H-#define TYPEABLE_H--#define INSTANCE_TYPEABLE0(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable tycon where { typeOf _ = mkTyConApp tcname [] }--#ifdef __GLASGOW_HASKELL__---- // For GHC, the extra instances follow from general instance declarations--- // defined in Data.Typeable.--#define INSTANCE_TYPEABLE1(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE2(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE3(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE4(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE5(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE6(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }--#define INSTANCE_TYPEABLE7(tycon,tcname,str) \-tcname :: TyCon; \-tcname = mkTyCon str; \-instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }--#else /* !__GLASGOW_HASKELL__ */--#define INSTANCE_TYPEABLE1(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable (tycon a) where { typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE2(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable1 (tycon a) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b) => Typeable (tycon a b) where { \- typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE3(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable2 (tycon a) where { \- typeOf2 = typeOf2Default }; \-instance (Typeable a, Typeable b) => Typeable1 (tycon a b) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b, Typeable c) => Typeable (tycon a b c) where { \- typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE4(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable3 (tycon a) where { \- typeOf3 = typeOf3Default }; \-instance (Typeable a, Typeable b) => Typeable2 (tycon a b) where { \- typeOf2 = typeOf2Default }; \-instance (Typeable a, Typeable b, Typeable c) => Typeable1 (tycon a b c) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable (tycon a b c d) where { \- typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE5(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable4 (tycon a) where { \- typeOf4 = typeOf4Default }; \-instance (Typeable a, Typeable b) => Typeable3 (tycon a b) where { \- typeOf3 = typeOf3Default }; \-instance (Typeable a, Typeable b, Typeable c) => Typeable2 (tycon a b c) where { \- typeOf2 = typeOf2Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable1 (tycon a b c d) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable (tycon a b c d e) where { \- typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE6(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable5 (tycon a) where { \- typeOf5 = typeOf5Default }; \-instance (Typeable a, Typeable b) => Typeable4 (tycon a b) where { \- typeOf4 = typeOf4Default }; \-instance (Typeable a, Typeable b, Typeable c) => Typeable3 (tycon a b c) where { \- typeOf3 = typeOf3Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable2 (tycon a b c d) where { \- typeOf2 = typeOf2Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable1 (tycon a b c d e) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable (tycon a b c d e f) where { \- typeOf = typeOfDefault }--#define INSTANCE_TYPEABLE7(tycon,tcname,str) \-tcname = mkTyCon str; \-instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }; \-instance Typeable a => Typeable6 (tycon a) where { \- typeOf6 = typeOf6Default }; \-instance (Typeable a, Typeable b) => Typeable5 (tycon a b) where { \- typeOf5 = typeOf5Default }; \-instance (Typeable a, Typeable b, Typeable c) => Typeable4 (tycon a b c) where { \- typeOf4 = typeOf4Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable3 (tycon a b c d) where { \- typeOf3 = typeOf3Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable2 (tycon a b c d e) where { \- typeOf2 = typeOf2Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable1 (tycon a b c d e f) where { \- typeOf1 = typeOf1Default }; \-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g) => Typeable (tycon a b c d e f g) where { \- typeOf = typeOfDefault }--#endif /* !__GLASGOW_HASKELL__ */--#endif
@@ -1,11 +0,0 @@-/* - * (c) The University of Glasgow 2002- *- * Directory Runtime Support- */-#ifndef __DIRUTILS_H__-#define __DIRUTILS_H__--extern int __hscore_readdir(DIR *dirPtr, struct dirent **pDirEnt);--#endif /* __DIRUTILS_H__ */
@@ -1,2 +0,0 @@-exposed-modules: Control.Monad Data.Bits Data.Char Data.Either Data.Int Data.IORef Data.List Data.Maybe Data.Typeable Data.Word Debug.Trace Foreign.C.Error Foreign.C.String Foreign.C.Types Foreign.C Foreign.ForeignPtr Foreign.Marshal.Alloc Foreign.Marshal.Array Foreign.Marshal.Error Foreign.Marshal.Pool Foreign.Marshal.Utils Foreign.Marshal Foreign.Ptr Foreign.StablePtr Foreign.Storable Foreign System.IO.Error System.IO.Fix System.IO.Unsafe System.IO System.Posix.Internals System.Posix.Types UHC.Array UHC.Base UHC.Bits UHC.Bounded UHC.BoxArray UHC.ByteArray UHC.Char UHC.Conc UHC.Enum UHC.Eq UHC.Float UHC.ForeignPtr UHC.GC UHC.Generics.Tuple UHC.Generics UHC.Handle UHC.Int UHC.IO UHC.IOBase UHC.Ix UHC.LazyST UHC.MutVar UHC.MVar UHC.OldException UHC.OldIO UHC.Ord UHC.Prims UHC.Ptr UHC.Read UHC.Real UHC.Run UHC.Show UHC.ST UHC.StablePtr UHC.StackTrace UHC.Storable UHC.STRef UHC.Types UHC.Weak UHC.WeakPtr UHC.Word Unsafe.Coerce-build-depends:
binary file changed (absent → 61204 bytes)
binary file changed (absent → 27704 bytes)
binary file changed (absent → 82640 bytes)
binary file changed (absent → 24833 bytes)
binary file changed (absent → 11493 bytes)
binary file changed (absent → 5668 bytes)
binary file changed (absent → 6580 bytes)
binary file changed (absent → 3864 bytes)
binary file changed (absent → 3460 bytes)
binary file changed (absent → 3315 bytes)
binary file changed (absent → 204309 bytes)
binary file changed (absent → 46537 bytes)
binary file changed (absent → 8206 bytes)
binary file changed (absent → 4487 bytes)
binary file changed (absent → 175368 bytes)
binary file changed (absent → 112836 bytes)
binary file changed (absent → 3180 bytes)
binary file changed (absent → 4479 bytes)
binary file changed (absent → 405 bytes)
binary file changed (absent → 3275 bytes)
binary file changed (absent → 149 bytes)
binary file changed (absent → 2259 bytes)
binary file changed (absent → 22836 bytes)
binary file changed (absent → 17797 bytes)
binary file changed (absent → 30548 bytes)
binary file changed (absent → 16760 bytes)
binary file changed (absent → 4750 bytes)
binary file changed (absent → 2294 bytes)
binary file changed (absent → 1004 bytes)
binary file changed (absent → 1984 bytes)
binary file changed (absent → 216779 bytes)
binary file changed (absent → 64601 bytes)
file too large to diff
binary file changed (absent → 950230 bytes)
binary file changed (absent → 13522 bytes)
binary file changed (absent → 5335 bytes)
binary file changed (absent → 122012 bytes)
binary file changed (absent → 60961 bytes)
binary file changed (absent → 29641 bytes)
binary file changed (absent → 21229 bytes)
binary file changed (absent → 5241 bytes)
binary file changed (absent → 1288 bytes)
binary file changed (absent → 8372 bytes)
binary file changed (absent → 4111 bytes)
binary file changed (absent → 107242 bytes)
binary file changed (absent → 66526 bytes)
binary file changed (absent → 58825 bytes)
binary file changed (absent → 4807 bytes)
binary file changed (absent → 688 bytes)
binary file changed (absent → 1259 bytes)
binary file changed (absent → 207 bytes)
binary file changed (absent → 16434 bytes)
binary file changed (absent → 670235 bytes)
binary file changed (absent → 421402 bytes)
binary file changed (absent → 132474 bytes)
binary file changed (absent → 46634 bytes)
binary file changed (absent → 15533 bytes)
binary file changed (absent → 5975 bytes)
binary file changed (absent → 340989 bytes)
binary file changed (absent → 154381 bytes)
binary file changed (absent → 76885 bytes)
binary file changed (absent → 30408 bytes)
binary file changed (absent → 37718 bytes)
binary file changed (absent → 23326 bytes)
binary file changed (absent → 29152 bytes)
binary file changed (absent → 10285 bytes)
binary file changed (absent → 18353 bytes)
binary file changed (absent → 10662 bytes)
binary file changed (absent → 12357 bytes)
binary file changed (absent → 5421 bytes)
binary file changed (absent → 68995 bytes)
binary file changed (absent → 21750 bytes)
binary file changed (absent → 206208 bytes)
binary file changed (absent → 73547 bytes)
binary file changed (absent → 25281 bytes)
binary file changed (absent → 21209 bytes)
binary file changed (absent → 87664 bytes)
binary file changed (absent → 17136 bytes)
binary file changed (absent → 7211 bytes)
binary file changed (absent → 1916 bytes)
binary file changed (absent → 11814 bytes)
binary file changed (absent → 5056 bytes)
binary file changed (absent → 47946 bytes)
binary file changed (absent → 31521 bytes)
binary file changed (absent → 22999 bytes)
binary file changed (absent → 15434 bytes)
binary file changed (absent → 152800 bytes)
binary file changed (absent → 36709 bytes)
binary file changed (absent → 21991 bytes)
binary file changed (absent → 16107 bytes)
binary file changed (absent → 141 bytes)
binary file changed (absent → 1380 bytes)
binary file changed (absent → 69186 bytes)
binary file changed (absent → 51972 bytes)
binary file changed (absent → 27276 bytes)
binary file changed (absent → 18131 bytes)
binary file changed (absent → 13934 bytes)
binary file changed (absent → 9775 bytes)
binary file changed (absent → 140 bytes)
binary file changed (absent → 853 bytes)
@@ -0,0 +1,231 @@+{- --------------------------------------------------------------------------+// Dirty CPP hackery for CTypes/CTypesISO+//+// (c) The FFI task force, 2000+// --------------------------------------------------------------------------+-}++#ifndef CTYPES__H+#define CTYPES__H++#include "Typeable.h"++{-+// As long as there is no automatic derivation of classes for newtypes we resort+// to extremely dirty cpp-hackery. :-P Some care has to be taken when the+// macros below are modified, otherwise the layout rule will bite you.+-}++-- // A hacked version for GHC follows the Haskell 98 version...+#ifndef __GLASGOW_HASKELL__++#define NEWTYPE_TYPE_NODERIVING(T,B) \+newtype T = T B ; ++#define NEWTYPE_TYPE(T,B) \+newtype T = T B deriving (Eq, Ord) ; ++#define ARITHMETIC_TYPE_INSTANCES(T,C,S,B) \+INSTANCE_NUM(T) ; \+INSTANCE_REAL(T) ; \+INSTANCE_READ(T,B) ; \+INSTANCE_SHOW(T,B) ; \+INSTANCE_ENUM(T) ; \+INSTANCE_STORABLE(T) ; \+INSTANCE_TYPEABLE0(T,C,S) ;++#define INTEGRAL_TYPE_INSTANCES(T,C,S,B) \+INSTANCE_BOUNDED(T) ; \+INSTANCE_INTEGRAL(T) ; \+INSTANCE_BITS(T)++#define ARITHMETIC_TYPE(T,C,S,B) \+NEWTYPE_TYPE(T,B) ; \+ARITHMETIC_TYPE_INSTANCES(T,C,S,B) ;++#define INTEGRAL_TYPE(T,C,S,B) \+ARITHMETIC_TYPE(T,C,S,B) ; \+INTEGRAL_TYPE_INSTANCES(T,C,S,B)++#define FLOATING_TYPE(T,C,S,B) \+ARITHMETIC_TYPE(T,C,S,B) ; \+INSTANCE_FRACTIONAL(T) ; \+INSTANCE_FLOATING(T) ; \+INSTANCE_REALFRAC(T) ; \+INSTANCE_REALFLOAT(T)++#ifndef __GLASGOW_HASKELL__+#define fakeMap map+#endif++#define INSTANCE_READ(T,B) \+instance Read T where { \+ readsPrec p s = fakeMap (\(x, t) -> (T x, t)) (readsPrec p s) }++#define INSTANCE_SHOW(T,B) \+instance Show T where { \+ showsPrec p (T x) = showsPrec p x }++#define INSTANCE_NUM(T) \+instance Num T where { \+ (T i) + (T j) = T (i + j) ; \+ (T i) - (T j) = T (i - j) ; \+ (T i) * (T j) = T (i * j) ; \+ negate (T i) = T (negate i) ; \+ abs (T i) = T (abs i) ; \+ signum (T i) = T (signum i) ; \+ fromInteger x = T (fromInteger x) }++#define INSTANCE_EQ(T) \+instance Eq T where { \+ (T x1) == (T x2) = x1 == x2 }++#define INSTANCE_ORD(T) \+instance Ord T where { \+ (T x1) `compare` (T x2) = x1 `compare` x2 }++#define INSTANCE_BOUNDED(T) \+instance Bounded T where { \+ minBound = T minBound ; \+ maxBound = T maxBound }++#define INSTANCE_ENUM(T) \+instance Enum T where { \+ succ (T i) = T (succ i) ; \+ pred (T i) = T (pred i) ; \+ toEnum x = T (toEnum x) ; \+ fromEnum (T i) = fromEnum i ; \+ enumFrom (T i) = fakeMap T (enumFrom i) ; \+ enumFromThen (T i) (T j) = fakeMap T (enumFromThen i j) ; \+ enumFromTo (T i) (T j) = fakeMap T (enumFromTo i j) ; \+ enumFromThenTo (T i) (T j) (T k) = fakeMap T (enumFromThenTo i j k) }++#define INSTANCE_REAL(T) \+instance Real T where { \+ toRational (T i) = toRational i }++#define INSTANCE_INTEGRAL(T) \+instance Integral T where { \+ (T i) `quot` (T j) = T (i `quot` j) ; \+ (T i) `rem` (T j) = T (i `rem` j) ; \+ (T i) `div` (T j) = T (i `div` j) ; \+ (T i) `mod` (T j) = T (i `mod` j) ; \+ (T i) `quotRem` (T j) = let (q,r) = i `quotRem` j in (T q, T r) ; \+ (T i) `divMod` (T j) = let (d,m) = i `divMod` j in (T d, T m) ; \+ toInteger (T i) = toInteger i }++#define INSTANCE_BITS(T) \+instance Bits T where { \+ (T x) .&. (T y) = T (x .&. y) ; \+ (T x) .|. (T y) = T (x .|. y) ; \+ (T x) `xor` (T y) = T (x `xor` y) ; \+ complement (T x) = T (complement x) ; \+ shift (T x) n = T (shift x n) ; \+ rotate (T x) n = T (rotate x n) ; \+ bit n = T (bit n) ; \+ setBit (T x) n = T (setBit x n) ; \+ clearBit (T x) n = T (clearBit x n) ; \+ complementBit (T x) n = T (complementBit x n) ; \+ testBit (T x) n = testBit x n ; \+ bitSize (T x) = bitSize x ; \+ isSigned (T x) = isSigned x }++#define INSTANCE_FRACTIONAL(T) \+instance Fractional T where { \+ (T x) / (T y) = T (x / y) ; \+ recip (T x) = T (recip x) ; \+ fromRational r = T (fromRational r) }++#define INSTANCE_FLOATING(T) \+instance Floating T where { \+ pi = pi ; \+ exp (T x) = T (exp x) ; \+ log (T x) = T (log x) ; \+ sqrt (T x) = T (sqrt x) ; \+ (T x) ** (T y) = T (x ** y) ; \+ (T x) `logBase` (T y) = T (x `logBase` y) ; \+ sin (T x) = T (sin x) ; \+ cos (T x) = T (cos x) ; \+ tan (T x) = T (tan x) ; \+ asin (T x) = T (asin x) ; \+ acos (T x) = T (acos x) ; \+ atan (T x) = T (atan x) ; \+ sinh (T x) = T (sinh x) ; \+ cosh (T x) = T (cosh x) ; \+ tanh (T x) = T (tanh x) ; \+ asinh (T x) = T (asinh x) ; \+ acosh (T x) = T (acosh x) ; \+ atanh (T x) = T (atanh x) }++#define INSTANCE_REALFRAC(T) \+instance RealFrac T where { \+ properFraction (T x) = let (m,y) = properFraction x in (m, T y) ; \+ truncate (T x) = truncate x ; \+ round (T x) = round x ; \+ ceiling (T x) = ceiling x ; \+ floor (T x) = floor x }++#define INSTANCE_REALFLOAT(T) \+instance RealFloat T where { \+ floatRadix (T x) = floatRadix x ; \+ floatDigits (T x) = floatDigits x ; \+ floatRange (T x) = floatRange x ; \+ decodeFloat (T x) = decodeFloat x ; \+ encodeFloat m n = T (encodeFloat m n) ; \+ exponent (T x) = exponent x ; \+ significand (T x) = T (significand x) ; \+ scaleFloat n (T x) = T (scaleFloat n x) ; \+ isNaN (T x) = isNaN x ; \+ isInfinite (T x) = isInfinite x ; \+ isDenormalized (T x) = isDenormalized x ; \+ isNegativeZero (T x) = isNegativeZero x ; \+ isIEEE (T x) = isIEEE x ; \+ (T x) `atan2` (T y) = T (x `atan2` y) }++#define INSTANCE_STORABLE(T) \+instance Storable T where { \+ sizeOf (T x) = sizeOf x ; \+ alignment (T x) = alignment x ; \+ peekElemOff a i = liftM T (peekElemOff (castPtr a) i) ; \+ pokeElemOff a i (T x) = pokeElemOff (castPtr a) i x }++#else /* __GLASGOW_HASKELL__ */++-- // GHC can derive any class for a newtype, so we make use of that here...++#define ARITHMETIC_CLASSES Eq,Ord,Num,Enum,Storable,Real+#define INTEGRAL_CLASSES Bounded,Integral,Bits+#define FLOATING_CLASSES Fractional,Floating,RealFrac,RealFloat++#define ARITHMETIC_TYPE(T,C,S,B) \+newtype T = T B deriving (ARITHMETIC_CLASSES); \+INSTANCE_READ(T,B); \+INSTANCE_SHOW(T,B); \+INSTANCE_TYPEABLE0(T,C,S) ;++#define INTEGRAL_TYPE(T,C,S,B) \+newtype T = T B deriving (ARITHMETIC_CLASSES, INTEGRAL_CLASSES); \+INSTANCE_READ(T,B); \+INSTANCE_SHOW(T,B); \+INSTANCE_TYPEABLE0(T,C,S) ;++#define FLOATING_TYPE(T,C,S,B) \+newtype T = T B deriving (ARITHMETIC_CLASSES, FLOATING_CLASSES); \+INSTANCE_READ(T,B); \+INSTANCE_SHOW(T,B); \+INSTANCE_TYPEABLE0(T,C,S) ;++#define INSTANCE_READ(T,B) \+instance Read T where { \+ readsPrec = unsafeCoerce# (readsPrec :: Int -> ReadS B); \+ readList = unsafeCoerce# (readList :: ReadS [B]); }++#define INSTANCE_SHOW(T,B) \+instance Show T where { \+ showsPrec = unsafeCoerce# (showsPrec :: Int -> B -> ShowS); \+ show = unsafeCoerce# (show :: B -> String); \+ showList = unsafeCoerce# (showList :: [B] -> ShowS); }++#endif /* __GLASGOW_HASKELL__ */++#endif
@@ -0,0 +1,757 @@+/* -----------------------------------------------------------------------------+ *+ * (c) The University of Glasgow 2001-2004+ *+ * Definitions for package `base' which are visible in Haskell land.+ *+ * Adapted for use in EHC+ *+ * ---------------------------------------------------------------------------*/++#ifndef __HSBASE_H__+#define __HSBASE_H__++#include "HsBaseConfig.h"+#ifdef __UHC_BUILDS_O__+#include "rts.h"+#endif++/* ultra-evil... */+#undef PACKAGE_BUGREPORT+#undef PACKAGE_NAME+#undef PACKAGE_STRING+#undef PACKAGE_TARNAME+#undef PACKAGE_VERSION++/* Needed to get the macro version of errno on some OSs (eg. Solaris).+ We must do this, because these libs are only compiled once, but+ must work in both single-threaded and multi-threaded programs. */+#define _REENTRANT 1++#ifndef __UHC__+#include "HsFFI.h"+#endif /* !__UHC__ */++#include <stdio.h>+#include <stdlib.h>+#include <math.h>++#if HAVE_SYS_TYPES_H+#include <sys/types.h>+#endif+#if HAVE_UNISTD_H+#include <unistd.h>+#endif+#if HAVE_SYS_STAT_H+#include <sys/stat.h>+#endif+#if HAVE_FCNTL_H+# include <fcntl.h>+#endif+#if HAVE_TERMIOS_H+#include <termios.h>+#endif+#if HAVE_SIGNAL_H+#include <signal.h>+/* Ultra-ugly: OpenBSD uses broken macros for sigemptyset and sigfillset (missing casts) */+#if __OpenBSD__+#undef sigemptyset+#undef sigfillset+#endif+#endif+#if HAVE_ERRNO_H+#include <errno.h>+#endif+#if HAVE_STRING_H+#include <string.h>+#endif+#if HAVE_DIRENT_H+#include <dirent.h>+#endif+#if HAVE_UTIME_H+#include <utime.h>+#endif+#if HAVE_SYS_UTSNAME_H+#include <sys/utsname.h>+#endif+#if HAVE_GETTIMEOFDAY+# if HAVE_SYS_TIME_H+# include <sys/time.h>+# endif+#elif HAVE_GETCLOCK+# if HAVE_SYS_TIMERS_H+# define POSIX_4D9 1+# include <sys/timers.h>+# endif+#endif+#if HAVE_TIME_H+#include <time.h>+#endif+#if HAVE_SYS_TIMEB_H+#include <sys/timeb.h>+#endif+#if HAVE_WINDOWS_H+#include <windows.h>+#endif+#if HAVE_SYS_TIMES_H+#include <sys/times.h>+#endif+#if HAVE_WINSOCK_H && defined(__MINGW32__)+#include <winsock.h>+#endif+#if HAVE_LIMITS_H+#include <limits.h>+#endif+#if HAVE_WCTYPE_H+#include <wctype.h>+#endif+#if HAVE_INTTYPES_H+# include <inttypes.h>+#elif HAVE_STDINT_H+# include <stdint.h>+#endif++#if !defined(__MINGW32__) && !defined(irix_HOST_OS)+# if HAVE_SYS_RESOURCE_H+# include <sys/resource.h>+# endif+#endif++#if !HAVE_GETRUSAGE && HAVE_SYS_SYSCALL_H+# include <sys/syscall.h>+# if defined(SYS_GETRUSAGE) /* hpux_HOST_OS */+# define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)+# define HAVE_GETRUSAGE 1+# endif+#endif++/* For System */+#if HAVE_SYS_WAIT_H+#include <sys/wait.h>+#endif+#if HAVE_VFORK_H+#include <vfork.h>+#endif++#ifndef __UHC__+#include "dirUtils.h"+#endif+#ifndef __UHC__+#include "WCsubst.h"+#endif /* !__UHC__ */++#if defined(__MINGW32__)+/* in Win32Utils.c */+extern void maperrno (void);+extern HsWord64 getUSecOfDay(void);+#endif++#if defined(__MINGW32__)+#include <io.h>+#include <fcntl.h>+#include <shlobj.h>+#include <share.h>+#endif++#if HAVE_SYS_SELECT_H+#include <sys/select.h>+#endif++/* in inputReady.c */+extern int fdReady(int fd, int write, int msecs, int isSock);++#ifndef __UHC__+/* in Signals.c */+extern HsInt nocldstop;+#endif /* !__UHC__ */++#ifndef __UHC__+/* -----------------------------------------------------------------------------+ 64-bit operations, defined in longlong.c+ -------------------------------------------------------------------------- */++#ifdef SUPPORT_LONG_LONGS++HsBool hs_gtWord64 (HsWord64, HsWord64);+HsBool hs_geWord64 (HsWord64, HsWord64);+HsBool hs_eqWord64 (HsWord64, HsWord64);+HsBool hs_neWord64 (HsWord64, HsWord64);+HsBool hs_ltWord64 (HsWord64, HsWord64);+HsBool hs_leWord64 (HsWord64, HsWord64);++HsBool hs_gtInt64 (HsInt64, HsInt64);+HsBool hs_geInt64 (HsInt64, HsInt64);+HsBool hs_eqInt64 (HsInt64, HsInt64);+HsBool hs_neInt64 (HsInt64, HsInt64);+HsBool hs_ltInt64 (HsInt64, HsInt64);+HsBool hs_leInt64 (HsInt64, HsInt64);++HsWord64 hs_remWord64 (HsWord64, HsWord64);+HsWord64 hs_quotWord64 (HsWord64, HsWord64);++HsInt64 hs_remInt64 (HsInt64, HsInt64);+HsInt64 hs_quotInt64 (HsInt64, HsInt64);+HsInt64 hs_negateInt64 (HsInt64);+HsInt64 hs_plusInt64 (HsInt64, HsInt64);+HsInt64 hs_minusInt64 (HsInt64, HsInt64);+HsInt64 hs_timesInt64 (HsInt64, HsInt64);++HsWord64 hs_and64 (HsWord64, HsWord64);+HsWord64 hs_or64 (HsWord64, HsWord64);+HsWord64 hs_xor64 (HsWord64, HsWord64);+HsWord64 hs_not64 (HsWord64);++HsWord64 hs_uncheckedShiftL64 (HsWord64, HsInt);+HsWord64 hs_uncheckedShiftRL64 (HsWord64, HsInt);+HsInt64 hs_uncheckedIShiftL64 (HsInt64, HsInt);+HsInt64 hs_uncheckedIShiftRA64 (HsInt64, HsInt);+HsInt64 hs_uncheckedIShiftRL64 (HsInt64, HsInt);++HsInt64 hs_intToInt64 (HsInt);+HsInt hs_int64ToInt (HsInt64);+HsWord64 hs_int64ToWord64 (HsInt64);+HsWord64 hs_wordToWord64 (HsWord);+HsWord hs_word64ToWord (HsWord64);+HsInt64 hs_word64ToInt64 (HsWord64);++HsWord64 hs_integerToWord64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);+HsInt64 hs_integerToInt64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);++#endif /* SUPPORT_LONG_LONGS */+#endif /* !__UHC__ */++/* -----------------------------------------------------------------------------+ INLINE functions.++ These functions are given as inlines here for when compiling via C,+ but we also generate static versions into the cbits library for+ when compiling to native code.+ -------------------------------------------------------------------------- */++#ifndef INLINE+# if defined(_MSC_VER)+# define INLINE extern __inline+# else+# define INLINE static inline+# endif+#endif++INLINE int __hscore_get_errno(void) { return errno; }+INLINE void __hscore_set_errno(int e) { errno = e; }++#if !defined(_MSC_VER)+INLINE int __hscore_s_isreg(mode_t m) { return S_ISREG(m); }+INLINE int __hscore_s_isdir(mode_t m) { return S_ISDIR(m); }+INLINE int __hscore_s_isfifo(mode_t m) { return S_ISFIFO(m); }+INLINE int __hscore_s_isblk(mode_t m) { return S_ISBLK(m); }+INLINE int __hscore_s_ischr(mode_t m) { return S_ISCHR(m); }+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)+INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); }+#endif+#endif++#if ( !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) ) || defined(__CYGWIN__)+INLINE int+__hscore_sigemptyset( sigset_t *set )+{ return sigemptyset(set); }++INLINE int+__hscore_sigfillset( sigset_t *set )+{ return sigfillset(set); }++INLINE int+__hscore_sigaddset( sigset_t * set, int s )+{ return sigaddset(set,s); }++INLINE int+__hscore_sigdelset( sigset_t * set, int s )+{ return sigdelset(set,s); }++INLINE int+__hscore_sigismember( sigset_t * set, int s )+{ return sigismember(set,s); }+#endif++INLINE void *+__hscore_memcpy_dst_off( char *dst, int dst_off, char *src, size_t sz )+{ return memcpy(dst+dst_off, src, sz); }++INLINE void *+__hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz )+{ return memcpy(dst, src+src_off, sz); }++INLINE HsBool+__hscore_supportsTextMode()+{+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)+ return HS_BOOL_FALSE;+#else+ return HS_BOOL_TRUE;+#endif+}++INLINE HsInt+__hscore_bufsiz()+{+ return BUFSIZ;+}++INLINE int+__hscore_seek_cur()+{+ return SEEK_CUR;+}++INLINE int+__hscore_o_binary()+{+#if defined(_MSC_VER)+ return O_BINARY;+#else+ return CONST_O_BINARY;+#endif+}++INLINE int+__hscore_o_rdonly()+{+#ifdef O_RDONLY+ return O_RDONLY;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_wronly( void )+{+#ifdef O_WRONLY+ return O_WRONLY;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_rdwr( void )+{+#ifdef O_RDWR+ return O_RDWR;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_append( void )+{+#ifdef O_APPEND+ return O_APPEND;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_creat( void )+{+#ifdef O_CREAT+ return O_CREAT;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_excl( void )+{+#ifdef O_EXCL+ return O_EXCL;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_trunc( void )+{+#ifdef O_TRUNC+ return O_TRUNC;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_noctty( void )+{+#ifdef O_NOCTTY+ return O_NOCTTY;+#else+ return 0;+#endif+}++INLINE int+__hscore_o_nonblock( void )+{+#ifdef O_NONBLOCK+ return O_NONBLOCK;+#else+ return 0;+#endif+}++INLINE int+__hscore_seek_set( void )+{+ return SEEK_SET;+}++INLINE int+__hscore_seek_end( void )+{+ return SEEK_END;+}++INLINE int+__hscore_ftruncate( int fd, off_t where )+{+#if defined(HAVE_FTRUNCATE)+ return ftruncate(fd,where);+#elif defined(HAVE__CHSIZE)+ return _chsize(fd,where);+#else+// ToDo: we should use _chsize_s() on Windows which allows a 64-bit+// offset, but it doesn't seem to be available from mingw at this time +// --SDM (01/2008)+#error at least ftruncate or _chsize functions are required to build+#endif+}++#ifndef __UHC__+INLINE int+__hscore_setmode( int fd, HsBool toBin )+{+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)+ return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);+#else+ return 0;+#endif+}+#endif /* !__UHC__ */++#if __GLASGOW_HASKELL__++INLINE int+__hscore_PrelHandle_write( int fd, void *ptr, HsInt off, int sz )+{+ return write(fd,(char *)ptr + off, sz);+}++INLINE int+__hscore_PrelHandle_read( int fd, void *ptr, HsInt off, int sz )+{+ return read(fd,(char *)ptr + off, sz);++}++#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)+INLINE int+__hscore_PrelHandle_send( int fd, void *ptr, HsInt off, int sz )+{+ return send(fd,(char *)ptr + off, sz, 0);+}++INLINE int+__hscore_PrelHandle_recv( int fd, void *ptr, HsInt off, int sz )+{+ return recv(fd,(char *)ptr + off, sz, 0);+}+#endif++#endif /* __GLASGOW_HASKELL__ */++INLINE int+__hscore_mkdir( char *pathName, int mode )+{+#if ( defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) ) && !defined(__CYGWIN__)+ return mkdir(pathName);+#else+ return mkdir(pathName,mode);+#endif+}++INLINE int+__hscore_lstat( const char *fname, struct stat *st )+{+#if HAVE_LSTAT+ return lstat(fname, st);+#else+ return stat(fname, st);+#endif+}++INLINE char *+__hscore_d_name( struct dirent* d )+{+ return (d->d_name);+}++INLINE int+__hscore_end_of_dir( void )+{+ return READDIR_ERRNO_EOF;+}++INLINE void+__hscore_free_dirent(struct dirent *dEnt)+{+#if HAVE_READDIR_R+ free(dEnt);+#endif+}++#if defined(__MINGW32__)+// We want the versions of stat/fstat/lseek that use 64-bit offsets,+// and you have to ask for those explicitly. Unfortunately there+// doesn't seem to be a 64-bit version of truncate/ftruncate, so while+// hFileSize and hSeek will work with large files, hSetFileSize will not.+#define stat(file,buf) _stati64(file,buf)+#define fstat(fd,buf) _fstati64(fd,buf)+typedef struct _stati64 struct_stat;+typedef off64_t stsize_t;+#else+typedef struct stat struct_stat;+typedef off_t stsize_t;+#endif++INLINE HsInt+__hscore_sizeof_stat( void )+{+ return sizeof(struct_stat);+}++INLINE time_t __hscore_st_mtime ( struct_stat* st ) { return st->st_mtime; }+INLINE stsize_t __hscore_st_size ( struct_stat* st ) { return st->st_size; }+#if !defined(_MSC_VER)+INLINE mode_t __hscore_st_mode ( struct_stat* st ) { return st->st_mode; }+INLINE dev_t __hscore_st_dev ( struct_stat* st ) { return st->st_dev; }+INLINE ino_t __hscore_st_ino ( struct_stat* st ) { return st->st_ino; }+#endif++#if HAVE_TERMIOS_H+INLINE tcflag_t __hscore_lflag( struct termios* ts ) { return ts->c_lflag; }++INLINE void+__hscore_poke_lflag( struct termios* ts, tcflag_t t ) { ts->c_lflag = t; }++INLINE unsigned char*+__hscore_ptr_c_cc( struct termios* ts )+{ return (unsigned char*) &ts->c_cc; }++INLINE HsInt+__hscore_sizeof_termios( void )+{+#ifndef __MINGW32__+ return sizeof(struct termios);+#else+ return 0;+#endif+}+#endif++//sizeof_sigset_t is also use on windows systems which define tcflat_t. Why exclude it?+// #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)+INLINE HsInt+__hscore_sizeof_sigset_t( void )+{+ return sizeof(sigset_t);+}+// #endif++INLINE int+__hscore_echo( void )+{+#ifdef ECHO+ return ECHO;+#else+ return 0;+#endif++}++INLINE int+__hscore_tcsanow( void )+{+#ifdef TCSANOW+ return TCSANOW;+#else+ return 0;+#endif++}++INLINE int+__hscore_icanon( void )+{+#ifdef ICANON+ return ICANON;+#else+ return 0;+#endif+}++INLINE int __hscore_vmin( void )+{+#ifdef VMIN+ return VMIN;+#else+ return 0;+#endif+}++INLINE int __hscore_vtime( void )+{+#ifdef VTIME+ return VTIME;+#else+ return 0;+#endif+}++INLINE int __hscore_sigttou( void )+{+#ifdef SIGTTOU+ return SIGTTOU;+#else+ return 0;+#endif+}++INLINE int __hscore_sig_block( void )+{+#ifdef SIG_BLOCK+ return SIG_BLOCK;+#else+ return 0;+#endif+}++INLINE int __hscore_sig_setmask( void )+{+#ifdef SIG_SETMASK+ return SIG_SETMASK;+#else+ return 0;+#endif+}++INLINE int+__hscore_f_getfl( void )+{+#ifdef F_GETFL+ return F_GETFL;+#else+ return 0;+#endif+}++INLINE int+__hscore_f_setfl( void )+{+#ifdef F_SETFL+ return F_SETFL;+#else+ return 0;+#endif+}++// defined in rts/RtsStartup.c.+extern void* __hscore_get_saved_termios(int fd);+extern void __hscore_set_saved_termios(int fd, void* ts);++INLINE int __hscore_hs_fileno (FILE *f) { return fileno (f); }++INLINE int __hscore_open(char *file, int how, mode_t mode) {+#ifdef __MINGW32__+ if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND))+ return _sopen(file,how,_SH_DENYRW,mode);+ else+ return _sopen(file,how,_SH_DENYWR,mode);+#else+ return open(file,how,mode);+#endif+}++// These are wrapped because on some OSs (eg. Linux) they are+// macros which redirect to the 64-bit-off_t versions when large file+// support is enabled.+//+#if defined(__MINGW32__)+INLINE off64_t __hscore_lseek(int fd, off64_t off, int whence) {+ return (_lseeki64(fd,off,whence));+}+#else+INLINE off_t __hscore_lseek(int fd, off_t off, int whence) {+ return (lseek(fd,off,whence));+}+#endif++INLINE HsInt __hscore_stat(char *file, struct_stat *buf) {+ return (stat(file,buf));+}++INLINE HsInt __hscore_fstat(int fd, struct_stat *buf) {+ return (fstat(fd,buf));+}++// select-related stuff++#if !defined(__MINGW32__)+INLINE int hsFD_SETSIZE(void) { return FD_SETSIZE; }+INLINE int hsFD_ISSET(int fd, fd_set *fds) { return FD_ISSET(fd, fds); }+INLINE void hsFD_SET(int fd, fd_set *fds) { FD_SET(fd, fds); }+INLINE HsInt sizeof_fd_set(void) { return sizeof(fd_set); }+extern void hsFD_ZERO(fd_set *fds);+#endif++// gettimeofday()-related++#if !defined(__MINGW32__)++INLINE HsInt sizeofTimeVal(void) { return sizeof(struct timeval); }++INLINE HsWord64 getUSecOfDay(void)+{+ struct timeval tv;+ gettimeofday(&tv, (struct timezone *) NULL);+ // Don't forget to cast *before* doing the arithmetic, otherwise+ // the arithmetic happens at the type of tv_sec, which is probably+ // only 'int'.+ return ((HsWord64)tv.tv_sec * 1000000 + (HsWord64)tv.tv_usec);+}++INLINE void setTimevalTicks(struct timeval *p, HsWord64 usecs)+{+ p->tv_sec = usecs / 1000000;+ p->tv_usec = usecs % 1000000;+}+#endif /* !defined(__MINGW32__) */++/* ToDo: write a feature test that doesn't assume 'environ' to+ * be in scope at link-time. */+extern char** environ;+INLINE char **__hscore_environ() { return environ; }++/* lossless conversions between pointers and integral types */+INLINE void * __hscore_from_uintptr(uintptr_t n) { return (void *)n; }+INLINE void * __hscore_from_intptr (intptr_t n) { return (void *)n; }+INLINE uintptr_t __hscore_to_uintptr (void *p) { return (uintptr_t)p; }+INLINE intptr_t __hscore_to_intptr (void *p) { return (intptr_t)p; }++void errorBelch2(const char*s, char *t);+void debugBelch2(const char*s, char *t);++#endif /* __HSBASE_H__ */+
@@ -0,0 +1,944 @@+/* ehclib/uhcbase/include/HsBaseConfig.h. Generated from HsBaseConfig.h.in by configure. */+#ifndef HSBASECONFIG_H+#define HSBASECONFIG_H++#include "MachDeps.h"++/********************************************************************/+/**** Sizes ****/+/********************************************************************/++#if SIZEOF_INTPTR_T == 8+#define HTYPE_INTPTR_T Int64+#define HTYPE_UINTPTR_T Word64+#else+#define HTYPE_INTPTR_T Int32+#define HTYPE_UINTPTR_T Word32+#endif++/* also here: typedef int sig_atomic_t+ */+#if SIZEOF_INT == 8+#define HTYPE_INT Int64+#define HTYPE_UNSIGNED_INT Word64+#define HTYPE_SIG_ATOMIC_T Word64+#else+#define HTYPE_INT Int32+#define HTYPE_UNSIGNED_INT Word32+#define HTYPE_SIG_ATOMIC_T Word32+#endif++#if SIZEOF_LONG == 8+#define HTYPE_LONG Int64+#define HTYPE_UNSIGNED_LONG Word64+#else+#define HTYPE_LONG Int32+#define HTYPE_UNSIGNED_LONG Word32+#endif++#if SIZEOF_VOID_P == 8+#define HTYPE_PTRDIFF_T Int64+#else+#define HTYPE_PTRDIFF_T Int32+#endif++#if SIZEOF_CLOCK_T == 8+#define HTYPE_CLOCK_T Word64+#else+#define HTYPE_CLOCK_T Word32+#endif++#if SIZEOF_TIME_T == 8+#define HTYPE_TIME_T Word64+#else+#define HTYPE_TIME_T Word32+#endif++#if SIZEOF_USECONDS_T == 8+#define HTYPE_USECONDS_T Word64+#else+#define HTYPE_USECONDS_T Word32+#endif++#if SIZEOF_SIZE_T == 8+#define HTYPE_SIZE_T Word64+#else+#define HTYPE_SIZE_T Word32+#endif++#if SIZEOF_WCHAR_T == 1+#define HTYPE_WCHAR_T Word8+#elif SIZEOF_WCHAR_T == 2+#define HTYPE_WCHAR_T Word16+#else+#define HTYPE_WCHAR_T Word32+#endif++++/* Define to Haskell type for char */+#define HTYPE_CHAR Int8++/* Define to Haskell type for double */+#define HTYPE_DOUBLE Double++/* Define to Haskell type for float */+#define HTYPE_FLOAT Float++/* Define to Haskell type for intmax_t */+#define HTYPE_INTMAX_T Int64++/* Define to Haskell type for long long */+#define HTYPE_LONG_LONG Int64++/* Define to Haskell type for short */+#define HTYPE_SHORT Int16++/* Define to Haskell type for signed char */+#define HTYPE_SIGNED_CHAR Int8++/* Define to Haskell type for uintmax_t */+#define HTYPE_UINTMAX_T Word64++/* Define to Haskell type for unsigned char */+#define HTYPE_UNSIGNED_CHAR Word8++/* Define to Haskell type for unsigned long long */+#define HTYPE_UNSIGNED_LONG_LONG Word64++/* Define to Haskell type for unsigned short */+#define HTYPE_UNSIGNED_SHORT Word16++++/********************************************************************/+/**** System tupes ****/+/********************************************************************/++#ifdef SIZEOF_DEV_T+# if SIZEOF_DEV_T == 8+# define HTYPE_DEV_T Word64+# elif SIZEOF_DEV_T == 4+# define HTYPE_DEV_T Word32+# elif SIZEOF_DEV_T == 2+# define HTYPE_DEV_T Word16+# else+# endif+#endif++#ifdef SIZEOF_INO_T+# if SIZEOF_INO_T == 8+# define HTYPE_INO_T Word64+# elif SIZEOF_INO_T == 4+# define HTYPE_INO_T Word32+# elif SIZEOF_INO_T == 2+# define HTYPE_INO_T Word16+# else+# endif+#endif++#ifdef SIZEOF_MODE_T+# if SIZEOF_MODE_T == 8+# define HTYPE_MODE_T Word64+# elif SIZEOF_MODE_T == 4+# define HTYPE_MODE_T Word32+# elif SIZEOF_MODE_T == 2+# define HTYPE_MODE_T Word16+# else+# endif+#endif++#ifdef SIZEOF_OFF_T+# if SIZEOF_OFF_T == 8+# define HTYPE_OFF_T Word64+# elif SIZEOF_OFF_T == 4+# define HTYPE_OFF_T Word32+# elif SIZEOF_OFF_T == 2+# define HTYPE_OFF_T Word16+# else+# endif+#endif++#ifdef SIZEOF_PID_T+# if SIZEOF_PID_T == 8+# define HTYPE_PID_T Word64+# elif SIZEOF_PID_T == 4+# define HTYPE_PID_T Word32+# elif SIZEOF_PID_T == 2+# define HTYPE_PID_T Word16+# else+# endif+#endif++#ifdef SIZEOF_SSIZE_T+# if SIZEOF_SSIZE_T == 8+# define HTYPE_SSIZE_T Word64+# elif SIZEOF_SSIZE_T == 4+# define HTYPE_SSIZE_T Word32+# elif SIZEOF_SSIZE_T == 2+# define HTYPE_SSIZE_T Word16+# else+# endif+#endif++#ifdef SIZEOF_GID_T+# if SIZEOF_GID_T == 8+# define HTYPE_GID_T Word64+# elif SIZEOF_GID_T == 4+# define HTYPE_GID_T Word32+# elif SIZEOF_GID_T == 2+# define HTYPE_GID_T Word16+# else+# endif+#endif++#ifdef SIZEOF_NLINK_T+# if SIZEOF_NLINK_T == 8+# define HTYPE_NLINK_T Word64+# elif SIZEOF_NLINK_T == 4+# define HTYPE_NLINK_T Word32+# elif SIZEOF_NLINK_T == 2+# define HTYPE_NLINK_T Word16+# else+# endif+#endif++#ifdef SIZEOF_UID_T+# if SIZEOF_UID_T == 8+# define HTYPE_UID_T Word64+# elif SIZEOF_UID_T == 4+# define HTYPE_UID_T Word32+# elif SIZEOF_UID_T == 2+# define HTYPE_UID_T Word16+# else+# endif+#endif++#ifdef SIZEOF_CC_T+# if SIZEOF_CC_T == 8+# define HTYPE_CC_T Word64+# elif SIZEOF_CC_T == 4+# define HTYPE_CC_T Word32+# elif SIZEOF_CC_T == 2+# define HTYPE_CC_T Word16+# else+# endif+#endif++#ifdef SIZEOF_SPEED_T+# if SIZEOF_SPEED_T == 8+# define HTYPE_SPEED_T Word64+# elif SIZEOF_SPEED_T == 4+# define HTYPE_SPEED_T Word32+# elif SIZEOF_SPEED_T == 2+# define HTYPE_SPEED_T Word16+# else+# endif+#endif++#ifdef SIZEOF_TCFLAG_T+# if SIZEOF_TCFLAG_T == 8+# define HTYPE_TCFLAG_T Word64+# elif SIZEOF_TCFLAG_T == 4+# define HTYPE_TCFLAG_T Word32+# elif SIZEOF_TCFLAG_T == 2+# define HTYPE_TCFLAG_T Word16+# else+# endif+#endif++#ifdef SIZEOF_RLIM_T+# if SIZEOF_RLIM_T == 8+# define HTYPE_RLIM_T Word64+# elif SIZEOF_RLIM_T == 4+# define HTYPE_RLIM_T Word32+# elif SIZEOF_RLIM_T == 2+# define HTYPE_RLIM_T Word16+# else+# endif+#endif++/********************************************************************/+/**** Presence of include files ****/+/********************************************************************/++#define HAVE_DIRENT_H 1+#define HAVE_ERRNO_H 1+#define HAVE_FCNTL_H 1+#define HAVE_INTTYPES_H 1+#define HAVE_LIMITS_H 1+#define HAVE_SIGNAL_H 1+#define HAVE_STDINT_H 1+#define HAVE_STRING_H 1+#define HAVE_SYS_RESOURCE_H 1+#define HAVE_SYS_SELECT_H 1+#define HAVE_SYS_STAT_H 1+#define HAVE_SYS_SYSCALL_H 1+#define HAVE_SYS_TIME_H 1+#define HAVE_SYS_TIMEB_H 1+/* #undef HAVE_SYS_TIMERS_H */+#define HAVE_SYS_TIMES_H 1+#define HAVE_SYS_TYPES_H 1+#define HAVE_SYS_UTSNAME_H 1+#define HAVE_SYS_WAIT_H 1+#define HAVE_TERMIOS_H 1+#define HAVE_TIME_H 1+#define HAVE_UNISTD_H 1+#define HAVE_UTIME_H 1+/* #undef HAVE_VFORK_H */+#define HAVE_WCTYPE_H 1+/* #undef HAVE_WINDOWS_H */+/* #undef HAVE_WINSOCK_H */++/* #undef HAVE__CHSIZE */+#define HAVE_FTRUNCATE 1+/* #undef HAVE_GETCLOCK */+#define HAVE_GETRUSAGE 1+#define HAVE_GETTIMEOFDAY 1+#define HAVE_LSTAT 1+#define HAVE_READDIR_R 1++/********************************************************************/+/**** Runtime types ****/+/********************************************************************/++#ifdef __UHC_BUILDS_O__++#if defined(__UHC_TARGET_BC__) || defined(__UHC_TARGET_C__)+// # define HsBool Word+// # define HsInt Word+// # define HsWord64 Word64+// # define HsWord32 Word32+// # define HsWord16 Word16+// # define HsWord8 Word8+// # ifdef __UHC_TARGET_BC__+// # define HS_BOOL_FALSE gb_False+// # define HS_BOOL_TRUE gb_True+// # else+// # define HS_BOOL_FALSE 0+// # define HS_BOOL_TRUE 1+// # endif+#endif /* __UHC_TARGET_BC__ */++#endif /* __UHC_BUILDS_O__ */++/********************************************************************/+/**** Read dir EOF error ****/+/********************************************************************/++/* See remarks in GHC, libraries/base/aclocal.m4: MinGW platform returns non 0 value. We ignore that */+#define READDIR_ERRNO_EOF 0++/********************************************************************/+/**** C errors ****/+/********************************************************************/++/* (1) Assume errno.h is already included */+/* (2) Error codes like EADV are not present on all platforms, so a dummy value is provided, this should be done for all codes */++/* The value of E2BIG. */+#if !defined(E2BIG)+#define E2BIG 10000+#endif+#define CONST_E2BIG E2BIG++/* The value of EACCES. */+#if !defined(EACCES)+#define EACCES 10000+#endif+#define CONST_EACCES EACCES++/* The value of EADDRINUSE. */+#if !defined(EADDRINUSE)+#define EADDRINUSE 10000+#endif+#define CONST_EADDRINUSE EADDRINUSE++/* The value of EADDRNOTAVAIL. */+#define CONST_EADDRNOTAVAIL EADDRNOTAVAIL++/* The value of EADV. */+#if !defined(EADV)+#define EADV 10000+#endif+#define CONST_EADV EADV++/* The value of EAFNOSUPPORT. */+#if !defined(EAFNOSUPPORT)+#define EAFNOSUPPORT 10000+#endif+#define CONST_EAFNOSUPPORT EAFNOSUPPORT++/* The value of EAGAIN. */+#if !defined(EAGAIN)+#define EAGAIN 10000+#endif+#define CONST_EAGAIN EAGAIN++/* The value of EALREADY. */+#if !defined(EALREADY)+#define EALREADY 10000+#endif+#define CONST_EALREADY EALREADY++/* The value of EBADF. */+#if !defined(EBADF)+#define EBADF 10000+#endif+#define CONST_EBADF EBADF++/* The value of EBADMSG. */+#if !defined(EBADMSG)+#define EBADMSG 10000+#endif+#define CONST_EBADMSG EBADMSG++/* The value of EBADRPC. */+#if !defined(EBADRPC)+#define EBADRPC 10000+#endif+#define CONST_EBADRPC EBADRPC++/* The value of EBUSY. */+#if !defined(EBUSY)+#define EBUSY 10000+#endif+#define CONST_EBUSY EBUSY++/* The value of ECHILD. */+#if !defined(ECHILD)+#define ECHILD 10000+#endif+#define CONST_ECHILD ECHILD++/* The value of ECOMM. */+#if !defined(ECOMM)+#define ECOMM 10000+#endif+#define CONST_ECOMM ECOMM++/* The value of ECONNABORTED. */+#if !defined(ECONNABORTED)+#define ECONNABORTED 10000+#endif+#define CONST_ECONNABORTED ECONNABORTED++/* The value of ECONNREFUSED. */+#if !defined(ECONNREFUSED)+#define ECONNREFUSED 10000+#endif+#define CONST_ECONNREFUSED ECONNREFUSED++/* The value of ECONNRESET. */+#if !defined(ECONNRESET)+#define ECONNRESET 10000+#endif+#define CONST_ECONNRESET ECONNRESET++/* The value of EDEADLK. */+#if !defined(EDEADLK)+#define EDEADLK 10000+#endif+#define CONST_EDEADLK EDEADLK++/* The value of EDESTADDRREQ. */+#if !defined(EDESTADDRREQ)+#define EDESTADDRREQ 10000+#endif+#define CONST_EDESTADDRREQ EDESTADDRREQ++/* The value of EDIRTY. */+#if !defined(EDIRTY)+#define EDIRTY 10000+#endif+#define CONST_EDIRTY EDIRTY++/* The value of EDOM. */+#if !defined(EDOM)+#define EDOM 10000+#endif+#define CONST_EDOM EDOM++/* The value of EDQUOT. */+#if !defined(EDQUOT)+#define EDQUOT 10000+#endif+#define CONST_EDQUOT EDQUOT++/* The value of EEXIST. */+#if !defined(EEXIST)+#define EEXIST 10000+#endif+#define CONST_EEXIST EEXIST++/* The value of EFAULT. */+#if !defined(EFAULT)+#define EFAULT 10000+#endif+#define CONST_EFAULT EFAULT++/* The value of EFBIG. */+#if !defined(EFBIG)+#define EFBIG 10000+#endif+#define CONST_EFBIG EFBIG++/* The value of EFTYPE. */+#if !defined(EFTYPE)+#define EFTYPE 10000+#endif+#define CONST_EFTYPE EFTYPE++/* The value of EHOSTDOWN. */+#if !defined(EHOSTDOWN)+#define EHOSTDOWN 10000+#endif+#define CONST_EHOSTDOWN EHOSTDOWN++/* The value of EHOSTUNREACH. */+#if !defined(EHOSTUNREACH)+#define EHOSTUNREACH 10000+#endif+#define CONST_EHOSTUNREACH EHOSTUNREACH++/* The value of EIDRM. */+#if !defined(EIDRM)+#define EIDRM 10000+#endif+#define CONST_EIDRM EIDRM++/* The value of EILSEQ. */+#if !defined(EILSEQ)+#define EILSEQ 10000+#endif+#define CONST_EILSEQ EILSEQ++/* The value of EINPROGRESS. */+#if !defined(EINPROGRESS)+#define EINPROGRESS 10000+#endif+#define CONST_EINPROGRESS EINPROGRESS++/* The value of EINTR. */+#if !defined(EINTR)+#define EINTR 10000+#endif+#define CONST_EINTR EINTR++/* The value of EINVAL. */+#if !defined(EINVAL)+#define EINVAL 10000+#endif+#define CONST_EINVAL EINVAL++/* The value of EIO. */+#if !defined(EIO)+#define EIO 10000+#endif+#define CONST_EIO EIO++/* The value of EISCONN. */+#if !defined(EISCONN)+#define EISCONN 10000+#endif+#define CONST_EISCONN EISCONN++/* The value of EISDIR. */+#if !defined(EISDIR)+#define EISDIR 10000+#endif+#define CONST_EISDIR EISDIR++/* The value of ELOOP. */+#if !defined(ELOOP)+#define ELOOP 10000+#endif+#define CONST_ELOOP ELOOP++/* The value of EMFILE. */+#if !defined(EMFILE)+#define EMFILE 10000+#endif+#define CONST_EMFILE EMFILE++/* The value of EMLINK. */+#if !defined(EMLINK)+#define EMLINK 10000+#endif+#define CONST_EMLINK EMLINK++/* The value of EMSGSIZE. */+#if !defined(EMSGSIZE)+#define EMSGSIZE 10000+#endif+#define CONST_EMSGSIZE EMSGSIZE++/* The value of EMULTIHOP. */+#if !defined(EMULTIHOP)+#define EMULTIHOP 10000+#endif+#define CONST_EMULTIHOP EMULTIHOP++/* The value of ENAMETOOLONG. */+#if !defined(ENAMETOOLONG)+#define ENAMETOOLONG 10000+#endif+#define CONST_ENAMETOOLONG ENAMETOOLONG++/* The value of ENETDOWN. */+#if !defined(ENETDOWN)+#define ENETDOWN 10000+#endif+#define CONST_ENETDOWN ENETDOWN++/* The value of ENETRESET. */+#if !defined(ENETRESET)+#define ENETRESET 10000+#endif+#define CONST_ENETRESET ENETRESET++/* The value of ENETUNREACH. */+#if !defined(ENETUNREACH)+#define ENETUNREACH 10000+#endif+#define CONST_ENETUNREACH ENETUNREACH++/* The value of ENFILE. */+#if !defined(ENFILE)+#define ENFILE 10000+#endif+#define CONST_ENFILE ENFILE++/* The value of ENOBUFS. */+#if !defined(ENOBUFS)+#define ENOBUFS 10000+#endif+#define CONST_ENOBUFS ENOBUFS++/* The value of ENOCIGAR. */+#if !defined(ENOCIGAR)+#define ENOCIGAR 10000+#endif+#define CONST_ENOCIGAR ENOCIGAR++/* The value of ENODATA. */+#if !defined(ENODATA)+#define ENODATA 10000+#endif+#define CONST_ENODATA ENODATA++/* The value of ENODEV. */+#if !defined(ENODEV)+#define ENODEV 10000+#endif+#define CONST_ENODEV ENODEV++/* The value of ENOENT. */+#if !defined(ENOENT)+#define ENOENT 10000+#endif+#define CONST_ENOENT ENOENT++/* The value of ENOEXEC. */+#if !defined(ENOEXEC)+#define ENOEXEC 10000+#endif+#define CONST_ENOEXEC ENOEXEC++/* The value of ENOLCK. */+#if !defined(ENOLCK)+#define ENOLCK 10000+#endif+#define CONST_ENOLCK ENOLCK++/* The value of ENOLINK. */+#if !defined(ENOLINK)+#define ENOLINK 10000+#endif+#define CONST_ENOLINK ENOLINK++/* The value of ENOMEM. */+#if !defined(ENOMEM)+#define ENOMEM 10000+#endif+#define CONST_ENOMEM ENOMEM++/* The value of ENOMSG. */+#if !defined(ENOMSG)+#define ENOMSG 10000+#endif+#define CONST_ENOMSG ENOMSG++/* The value of ENONET. */+#if !defined(ENONET)+#define ENONET 10000+#endif+#define CONST_ENONET ENONET++/* The value of ENOPROTOOPT. */+#if !defined(ENOPROTOOPT)+#define ENOPROTOOPT 10000+#endif+#define CONST_ENOPROTOOPT ENOPROTOOPT++/* The value of ENOSPC. */+#if !defined(ENOSPC)+#define ENOSPC 10000+#endif+#define CONST_ENOSPC ENOSPC++/* The value of ENOSR. */+#if !defined(ENOSR)+#define ENOSR 10000+#endif+#define CONST_ENOSR ENOSR++/* The value of ENOSTR. */+#if !defined(ENOSTR)+#define ENOSTR 10000+#endif+#define CONST_ENOSTR ENOSTR++/* The value of ENOSYS. */+#if !defined(ENOSYS)+#define ENOSYS 10000+#endif+#define CONST_ENOSYS ENOSYS++/* The value of ENOTBLK. */+#if !defined(ENOTBLK)+#define ENOTBLK 10000+#endif+#define CONST_ENOTBLK ENOTBLK++/* The value of ENOTCONN. */+#if !defined(ENOTCONN)+#define ENOTCONN 10000+#endif+#define CONST_ENOTCONN ENOTCONN++/* The value of ENOTDIR. */+#if !defined(ENOTDIR)+#define ENOTDIR 10000+#endif+#define CONST_ENOTDIR ENOTDIR++/* The value of ENOTEMPTY. */+#if !defined(ENOTEMPTY)+#define ENOTEMPTY 10000+#endif+#define CONST_ENOTEMPTY ENOTEMPTY++/* The value of ENOTSOCK. */+#if !defined(ENOTSOCK)+#define ENOTSOCK 10000+#endif+#define CONST_ENOTSOCK ENOTSOCK++/* The value of ENOTTY. */+#if !defined(ENOTTY)+#define ENOTTY 10000+#endif+#define CONST_ENOTTY ENOTTY++/* The value of ENXIO. */+#if !defined(ENXIO)+#define ENXIO 10000+#endif+#define CONST_ENXIO ENXIO++/* The value of EOPNOTSUPP. */+#if !defined(EOPNOTSUPP)+#define EOPNOTSUPP 10000+#endif+#define CONST_EOPNOTSUPP EOPNOTSUPP++/* The value of EPERM. */+#if !defined(EPERM)+#define EPERM 10000+#endif+#define CONST_EPERM EPERM++/* The value of EPFNOSUPPORT. */+#if !defined(EPFNOSUPPORT)+#define EPFNOSUPPORT 10000+#endif+#define CONST_EPFNOSUPPORT EPFNOSUPPORT++/* The value of EPIPE. */+#if !defined(EPIPE)+#define EPIPE 10000+#endif+#define CONST_EPIPE EPIPE++/* The value of EPROCLIM. */+#if !defined(EPROCLIM)+#define EPROCLIM 10000+#endif+#define CONST_EPROCLIM EPROCLIM++/* The value of EPROCUNAVAIL. */+#if !defined(EPROCUNAVAIL)+#define EPROCUNAVAIL 10000+#endif+#define CONST_EPROCUNAVAIL EPROCUNAVAIL++/* The value of EPROGMISMATCH. */+#if !defined(EPROGMISMATCH)+#define EPROGMISMATCH 10000+#endif+#define CONST_EPROGMISMATCH EPROGMISMATCH++/* The value of EPROGUNAVAIL. */+#if !defined(EPROGUNAVAIL)+#define EPROGUNAVAIL 10000+#endif+#define CONST_EPROGUNAVAIL EPROGUNAVAIL++/* The value of EPROTO. */+#if !defined(EPROTO)+#define EPROTO 10000+#endif+#define CONST_EPROTO EPROTO++/* The value of EPROTONOSUPPORT. */+#if !defined(EPROTONOSUPPORT)+#define EPROTONOSUPPORT 10000+#endif+#define CONST_EPROTONOSUPPORT EPROTONOSUPPORT++/* The value of EPROTOTYPE. */+#if !defined(EPROTOTYPE)+#define EPROTOTYPE 10000+#endif+#define CONST_EPROTOTYPE EPROTOTYPE++/* The value of ERANGE. */+#if !defined(ERANGE)+#define ERANGE 10000+#endif+#define CONST_ERANGE ERANGE++/* The value of EREMCHG. */+#if !defined(EREMCHG)+#define EREMCHG 10000+#endif+#define CONST_EREMCHG EREMCHG++/* The value of EREMOTE. */+#if !defined(EREMOTE)+#define EREMOTE 10000+#endif+#define CONST_EREMOTE EREMOTE++/* The value of EROFS. */+#if !defined(EROFS)+#define EROFS 10000+#endif+#define CONST_EROFS EROFS++/* The value of ERPCMISMATCH. */+#if !defined(ERPCMISMATCH)+#define ERPCMISMATCH 10000+#endif+#define CONST_ERPCMISMATCH ERPCMISMATCH++/* The value of ERREMOTE. */+#if !defined(ERREMOTE)+#define ERREMOTE 10000+#endif+#define CONST_ERREMOTE ERREMOTE++/* The value of ESHUTDOWN. */+#if !defined(ESHUTDOWN)+#define ESHUTDOWN 10000+#endif+#define CONST_ESHUTDOWN ESHUTDOWN++/* The value of ESOCKTNOSUPPORT. */+#if !defined(ESOCKTNOSUPPORT)+#define ESOCKTNOSUPPORT 10000+#endif+#define CONST_ESOCKTNOSUPPORT ESOCKTNOSUPPORT++/* The value of ESPIPE. */+#if !defined(ESPIPE)+#define ESPIPE 10000+#endif+#define CONST_ESPIPE ESPIPE++/* The value of ESRCH. */+#if !defined(ESRCH)+#define ESRCH 10000+#endif+#define CONST_ESRCH ESRCH++/* The value of ESRMNT. */+#if !defined(ESRMNT)+#define ESRMNT 10000+#endif+#define CONST_ESRMNT ESRMNT++/* The value of ESTALE. */+#if !defined(ESTALE)+#define ESTALE 10000+#endif+#define CONST_ESTALE ESTALE++/* The value of ETIME. */+#if !defined(ETIME)+#define ETIME 10000+#endif+#define CONST_ETIME ETIME++/* The value of ETIMEDOUT. */+#if !defined(ETIMEDOUT)+#define ETIMEDOUT 10000+#endif+#define CONST_ETIMEDOUT ETIMEDOUT++/* The value of ETOOMANYREFS. */+#if !defined(ETOOMANYREFS)+#define ETOOMANYREFS 10000+#endif+#define CONST_ETOOMANYREFS ETOOMANYREFS++/* The value of ETXTBSY. */+#if !defined(ETXTBSY)+#define ETXTBSY 10000+#endif+#define CONST_ETXTBSY ETXTBSY++/* The value of EUSERS. */+#if !defined(EUSERS)+#define EUSERS 10000+#endif+#define CONST_EUSERS EUSERS++/* The value of EWOULDBLOCK. */+#if !defined(EWOULDBLOCK)+#define EWOULDBLOCK 10000+#endif+#define CONST_EWOULDBLOCK EWOULDBLOCK++/* The value of EXDEV. */+#if !defined(EXDEV)+#define EXDEV 10000+#endif+#define CONST_EXDEV EXDEV++/* The value of O_BINARY. */+#if !defined(O_BINARY)+#define O_BINARY 10000+#endif+#define CONST_O_BINARY O_BINARY++/* The value of SIGINT. */+#if !defined(SIGINT)+#define SIGINT 10000+#endif+#define CONST_SIGINT SIGINT+++#endif+
@@ -0,0 +1,242 @@+{- --------------------------------------------------------------------------+// Macros to help make various instances for Int like types (Int8, ...).+//+// Primitives are defined by 2 forms of macros:+// - starting with PRIMS_ : name of Haskell function and primitive is the same+// - starting with PRIMS2_ : name of primitive is given explicitly, to allow sharing between primitives+// --------------------------------------------------------------------------+-}++-- define conversion primitives+#define PRIMS_CONVERSION_INTEGER(tycon,primIntegerTo,primToInteger) \+foreign import prim primIntegerTo :: Integer -> tycon ; \+foreign import prim primToInteger :: tycon -> Integer ++#define PRIMS2_CONVERSION_INTEGER(tycon,primIntegerTo,primIntegerToNm,primToInteger,primToIntegerNm) \+foreign import prim primIntegerToNm primIntegerTo :: Integer -> tycon ; \+foreign import prim primToIntegerNm primToInteger :: tycon -> Integer ++#define PRIMS_CONVERSION_INT(tycon,primIntTo,primToInt) \+foreign import prim primIntTo :: Int -> tycon ; \+foreign import prim primToInt :: tycon -> Int +++-- define Eq primitives+#define PRIMS_EQ(tycon,primEq,primNe) \+foreign import prim primEq :: tycon -> tycon -> Bool ; \+foreign import prim primNe :: tycon -> tycon -> Bool ++#define PRIMS2_EQ(tycon,primEq,primEqNm,primNe,primNeNm) \+foreign import prim primEqNm primEq :: tycon -> tycon -> Bool ; \+foreign import prim primNeNm primNe :: tycon -> tycon -> Bool+++-- define Eq instance+#define INSTANCE_EQ(tycon,primEq,primNe) \+instance Eq tycon where \+ { (==) = primEq ; \+ (/=) = primNe \+ }+++-- define Ord primitives++#define PRIMS_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \+foreign import prim primCmp :: tycon -> tycon -> Ordering ; \+foreign import prim primLt :: tycon -> tycon -> Bool ; \+foreign import prim primGt :: tycon -> tycon -> Bool ; \+foreign import prim primLe :: tycon -> tycon -> Bool ; \+foreign import prim primGe :: tycon -> tycon -> Bool ++#define PRIMS2_ORD(tycon,primCmp,primCmpNm,primLt,primLtNm,primGt,primGtNm,primLe,primLeNm,primGe,primGeNm) \+foreign import prim primCmpNm primCmp :: tycon -> tycon -> Ordering ; \+foreign import prim primLtNm primLt :: tycon -> tycon -> Bool ; \+foreign import prim primGtNm primGt :: tycon -> tycon -> Bool ; \+foreign import prim primLeNm primLe :: tycon -> tycon -> Bool ; \+foreign import prim primGeNm primGe :: tycon -> tycon -> Bool +++-- define Ord instance++#define INSTANCE_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \+instance Ord tycon where \+ { compare = primCmp \+ ; (<) = primLt \+ ; (>) = primGt \+ ; (<=) = primLe \+ ; (>=) = primGe \+ }+++-- define Bounded primitives+#define PRIMS_BOUNDED(tycon,primMin,primMax) \+foreign import prim primMin :: tycon ; \+foreign import prim primMax :: tycon +++-- define Bounded instance+#define INSTANCE_BOUNDED(tycon,primMin,primMax) \+instance Bounded tycon where \+ { minBound = primMin \+ ; maxBound = primMax \+ }+++-- define Num primitives+#define PRIMS_NUM(tycon,primAdd,primSub,primMul,primNeg) \+foreign import prim primAdd :: tycon -> tycon -> tycon ; \+foreign import prim primSub :: tycon -> tycon -> tycon ; \+foreign import prim primMul :: tycon -> tycon -> tycon ; \+foreign import prim primNeg :: tycon -> tycon ++#define PRIMS2_NUM(tycon,primAdd,primAddNm,primSub,primSubNm,primMul,primMulNm,primNeg,primNegNm) \+foreign import prim primAddNm primAdd :: tycon -> tycon -> tycon ; \+foreign import prim primSubNm primSub :: tycon -> tycon -> tycon ; \+foreign import prim primMulNm primMul :: tycon -> tycon -> tycon ; \+foreign import prim primNegNm primNeg :: tycon -> tycon +++-- define Num instance+#define INSTANCE_NUM(tycon,primAdd,primSub,primMul,primNeg,primIntegerTo,primIntTo) \+instance Num tycon where \+ { (+) = primAdd \+ ; (-) = primSub \+ ; (*) = primMul \+ ; negate = primNeg \+ ; fromInteger = primIntegerTo \+ ; fromInt = primIntTo \+ ; abs = absReal \+ ; signum = signumReal \+ }+++-- define Enum instance+#define INSTANCE_ENUM(tycon,primToEnum,primFromEnum) \+instance Enum tycon where \+ { succ = boundedSucc \+ ; pred = boundedPred \+ ; toEnum = primToEnum \+ ; fromEnum = primFromEnum \+ ; enumFrom = boundedEnumFrom \+ ; enumFromTo = boundedEnumFromTo \+ ; enumFromThen = boundedEnumFromThen \+ ; enumFromThenTo = boundedEnumFromThenTo \+ }+++-- define Real instance+#define INSTANCE_REAL(tycon) \+instance Real tycon where \+ { toRational x = toInteger x % 1 \+ }+++-- define Integral primitives+#define PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) \+foreign import prim primDiv :: tycon -> tycon -> tycon ; \+foreign import prim primMod :: tycon -> tycon -> tycon ; \+foreign import prim primQuot :: tycon -> tycon -> tycon ; \+foreign import prim primRem :: tycon -> tycon -> tycon ++#define PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primRemNm) \+foreign import prim primDivNm primDiv :: tycon -> tycon -> tycon ; \+foreign import prim primModNm primMod :: tycon -> tycon -> tycon ; \+foreign import prim primQuotNm primQuot :: tycon -> tycon -> tycon ; \+foreign import prim primRemNm primRem :: tycon -> tycon -> tycon ++#define PRIMS_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem) \+PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) ; \+foreign import prim primDivMod :: tycon -> tycon -> (tycon,tycon) ; \+foreign import prim primQuotRem :: tycon -> tycon -> (tycon,tycon) ++#define PRIMS2_INTEGRAL2(tycon,primDiv,primDivNm,primMod,primModNm,primDivMod,primDivModNm,primQuot,primQuotNm,primRem,primRemNm,primQuotRem,primQuotRemNm) \+PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primQuotRemNm) ; \+foreign import prim primDivModNm primDivMod :: tycon -> tycon -> (tycon,tycon) ; \+foreign import prim primQuotRemNm primQuotRem :: tycon -> tycon -> (tycon,tycon) +++-- define Integral instance, assume default for divMod+#define INSTANCE_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem,primToInteger,primToInt) \+instance Integral tycon where \+ { quotRem d m \+ = (primQuot d m, primRem d m) \+ ; div = primDiv \+ ; quot = primQuot \+ ; rem = primRem \+ ; mod = primMod \+ ; toInteger = primToInteger \+ ; toInt = primToInt \+ }++#define INSTANCE_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem,primToInteger,primToInt) \+instance Integral tycon where \+ { divMod = primDivMod \+ ; quotRem = primQuotRem \+ ; div = primDiv \+ ; quot = primQuot \+ ; rem = primRem \+ ; mod = primMod \+ ; toInteger = primToInteger \+ ; toInt = primToInt \+ }+++-- define Show instance+#define INSTANCE_SHOW(tycon) \+instance Show tycon where \+ { show = show . toInteger \+ }+++-- define Read instance+#define INSTANCE_READ(tycon) \+instance Read tycon where \+ { readsPrec p = readSigned readDec \+ }+++-- define Bits primitives+#define PRIMS_BITLOGIC(tycon,primAnd,primOr,primXor) \+foreign import prim primAnd :: tycon -> tycon -> tycon ; \+foreign import prim primOr :: tycon -> tycon -> tycon ; \+foreign import prim primXor :: tycon -> tycon -> tycon++#define PRIMS_BITSHIFT(tycon,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \+foreign import prim primComplement :: tycon -> tycon ; \+foreign import prim primShiftLeft :: tycon -> Int -> tycon ; \+foreign import prim primShiftRight :: tycon -> Int -> tycon ; \+foreign import prim primRotateLeft :: tycon -> Int -> tycon ; \+foreign import prim primRotateRight :: tycon -> Int -> tycon++#define PRIMS2_BITLOGIC(tycon,primAnd,primAndNm,primOr,primOrNm,primXor,primXorNm) \+foreign import prim primAndNm primAnd :: tycon -> tycon -> tycon ; \+foreign import prim primOrNm primOr :: tycon -> tycon -> tycon ; \+foreign import prim primXorNm primXor :: tycon -> tycon -> tycon++#define PRIMS2_BITSHIFT(tycon,primComplement,primComplementNm,primShiftLeft,primShiftLeftNm,primShiftRight,primShiftRightNm,primRotateLeft,primRotateLeftNm,primRotateRight,primRotateRightNm) \+foreign import prim primComplementNm primComplement :: tycon -> tycon ; \+foreign import prim primShiftLeftNm primShiftLeft :: tycon -> Int -> tycon ; \+foreign import prim primShiftRightNm primShiftRight :: tycon -> Int -> tycon ; \+foreign import prim primRotateLeftNm primRotateLeft :: tycon -> Int -> tycon ; \+foreign import prim primRotateRightNm primRotateRight :: tycon -> Int -> tycon++-- define Bits instance+#define INSTANCE_BITS1(tycon,size,signed,primAnd,primOr,primXor,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \+instance Bits tycon where \+ { (.&.) = primAnd \+ ; (.|.) = primOr \+ ; xor = primXor \+ ; complement = primComplement \+ ; shiftL = primShiftLeft \+ ; shiftR = primShiftRight \+ ; rotateL = primRotateLeft \+ ; rotateR = primRotateRight \+ ; bitSize _ = size \+ ; isSigned _ = signed \+ }++++++
@@ -0,0 +1,125 @@+/* ehclib/uhcbase/include/MachDeps.h. Generated from MachDeps.h.in by configure. */+#ifndef MACHDEPS_H+#define MACHDEPS_H++#define SIZEOF_INTPTR_T 8+#define SIZEOF_CHAR 1+#define SIZEOF_SHORT 2+#define SIZEOF_INT 4+#define SIZEOF_LONG 8+#define SIZEOF_LONG_LONG 8+#define SIZEOF_FLOAT 4+#define SIZEOF_DOUBLE 8+#define SIZEOF_UNSIGNED_CHAR 1+#define SIZEOF_UNSIGNED_SHORT 2+#define SIZEOF_UNSIGNED_INT 4+#define SIZEOF_UNSIGNED_LONG 8+#define SIZEOF_UNSIGNED_LONG_LONG 8+#define SIZEOF_VOID_P 8++#define SIZEOF_DEV_T 4+#define SIZEOF_INO_T 8+#define SIZEOF_OFF_T 8+#define SIZEOF_MODE_T 2+#define SIZEOF_PID_T 4+#define SIZEOF_SSIZE_T 8+#define SIZEOF_GID_T 4+#define SIZEOF_NLINK_T 2+#define SIZEOF_UID_T 4+#define SIZEOF_RLIM_T 8+#define SIZEOF_CLOCK_T 8+#define SIZEOF_TIME_T 8+#define SIZEOF_SIZE_T 8+#define SIZEOF_WCHAR_T 4++#define SIZEOF_CC_T 1+#define SIZEOF_SPEED_T 8+#define SIZEOF_TCFLAG_T 8++#define ALIGNOF_INTPTR_T 8+#define ALIGNOF_CHAR 1+#define ALIGNOF_SHORT 2+#define ALIGNOF_INT 4+#define ALIGNOF_LONG 8+#define ALIGNOF_LONG_LONG 8+#define ALIGNOF_FLOAT 4+#define ALIGNOF_DOUBLE 8+#define ALIGNOF_UNSIGNED_CHAR 1+#define ALIGNOF_UNSIGNED_SHORT 2+#define ALIGNOF_UNSIGNED_INT 4+#define ALIGNOF_UNSIGNED_LONG 8+#define ALIGNOF_UNSIGNED_LONG_LONG 8+#define ALIGNOF_VOID_P 8++#define ALIGNOF_UINT8_T 1+#define ALIGNOF_UINT16_T 2+#define ALIGNOF_UINT32_T 4+#define ALIGNOF_UINT64_T 8++#if SIZEOF_INTPTR_T == 8+#define USE_64_BITS 1+#define USE_32_BITS 0+#else+#define USE_64_BITS 0+#define USE_32_BITS 1+#endif++#ifdef __UHC_TARGET_BC__+#define BITSIZEOF_WORDTAG 1+#else+#define BITSIZEOF_WORDTAG 0+#endif++#define SIZEOF_HSCHAR SIZEOF_INTPTR_T+#define ALIGNMENT_HSCHAR ALIGNOF_UINT32_T++#define SIZEOF_HSINT SIZEOF_INTPTR_T+#define ALIGNMENT_HSINT ALIGNOF_INTPTR_T++#define SIZEOF_HSWORD SIZEOF_INTPTR_T+#define ALIGNMENT_HSWORD ALIGNOF_INTPTR_T++#define SIZEOF_HSDOUBLE SIZEOF_DOUBLE+#define ALIGNMENT_HSDOUBLE ALIGNOF_DOUBLE++#define SIZEOF_HSFLOAT SIZEOF_FLOAT+#define ALIGNMENT_HSFLOAT ALIGNOF_FLOAT++#define SIZEOF_HSPTR SIZEOF_VOID_P+#define ALIGNMENT_HSPTR ALIGNOF_VOID_P++#define SIZEOF_HSFUNPTR SIZEOF_VOID_P+#define ALIGNMENT_HSFUNPTR ALIGNOF_VOID_P++#define SIZEOF_HSFOREIGNPTR SIZEOF_VOID_P+#define ALIGNMENT_HSFOREIGNPTR ALIGNOF_VOID_P++#define SIZEOF_HSSTABLEPTR SIZEOF_VOID_P+#define ALIGNMENT_HSSTABLEPTR ALIGNOF_VOID_P++#define SIZEOF_INT8 8+#define ALIGNMENT_INT8 ALIGNOF_UINT8_T++#define SIZEOF_WORD8 8+#define ALIGNMENT_WORD8 ALIGNOF_UINT8_T++#define SIZEOF_INT16 16+#define ALIGNMENT_INT16 ALIGNOF_UINT16_T++#define SIZEOF_WORD16 16+#define ALIGNMENT_WORD16 ALIGNOF_UINT16_T++#define SIZEOF_INT32 32+#define ALIGNMENT_INT32 ALIGNOF_UINT32_T++#define SIZEOF_WORD32 32+#define ALIGNMENT_WORD32 ALIGNOF_UINT32_T++#define SIZEOF_INT64 64+#define ALIGNMENT_INT64 ALIGNOF_UINT64_T++#define SIZEOF_WORD64 64+#define ALIGNMENT_WORD64 ALIGNOF_UINT64_T+++#endif
@@ -0,0 +1,147 @@+{- --------------------------------------------------------------------------+// Macros to help make various instances for tuples.+// A kind of poor mans deriving.+//+// --------------------------------------------------------------------------+-}++#define COMMA ,++{- --------------------------------------------------------------------------+// 2 tuple, 1 unary op+// --------------------------------------------------------------------------+-}+#define TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+instance (clscon a, clscon b) => clscon (a,b) where \+ { op1 op1preArg (a,b) op1postArg \+ = pre \+ op1subop a \+ sep op1subop b \+ post \+ }++{- --------------------------------------------------------------------------+// 3 tuple, 1 unary op+// --------------------------------------------------------------------------+-}+#define TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \+ { op1 op1preArg (a,b,c) op1postArg \+ = pre \+ op1subop a \+ sep op1subop b \+ sep op1subop c \+ post \+ }++{- --------------------------------------------------------------------------+// 4 tuple, 1 unary op+// --------------------------------------------------------------------------+-}+#define TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \+ { op1 op1preArg (a,b,c,d) op1postArg \+ = pre \+ op1subop a \+ sep op1subop b \+ sep op1subop c \+ sep op1subop d \+ post \+ }++{- --------------------------------------------------------------------------+// 5 tuple, 1 unary op+// --------------------------------------------------------------------------+-}+#define TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \+ { op1 op1preArg (a,b,c,d,e) op1postArg \+ = pre \+ op1subop a \+ sep op1subop b \+ sep op1subop c \+ sep op1subop d \+ sep op1subop e \+ post \+ }++{- --------------------------------------------------------------------------+// Set of 2..n tuple, 1 unary op+// --------------------------------------------------------------------------+-}+#define TUPLE_UNOP1_INSTANCES(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+{ TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\+ TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\+ TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\+ TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \+}++{- --------------------------------------------------------------------------+// 2 tuple, 1 binary op+// --------------------------------------------------------------------------+-}+#define TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \+instance (clscon a, clscon b) => clscon (a,b) where \+ { (a1,b1) op1 (a2,b2) \+ = pre \+ a1 op1subop a2 \+ sep b1 op1subop b2 \+ post \+ }++{- --------------------------------------------------------------------------+// 3 tuple, 1 binary op+// --------------------------------------------------------------------------+-}+#define TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \+ { (a1,b1,c1) op1 (a2,b2,c2) \+ = pre \+ a1 op1subop a2 \+ sep b1 op1subop b2 \+ sep c1 op1subop c2 \+ post \+ }++{- --------------------------------------------------------------------------+// 4 tuple, 1 binary op+// --------------------------------------------------------------------------+-}+#define TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \+ { (a1,b1,c1,d1) op1 (a2,b2,c2,d2) \+ = pre \+ a1 op1subop a2 \+ sep b1 op1subop b2 \+ sep c1 op1subop c2 \+ sep d1 op1subop d2 \+ post \+ }++{- --------------------------------------------------------------------------+// 5 tuple, 1 binary op+// --------------------------------------------------------------------------+-}+#define TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \+instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \+ { (a1,b1,c1,d1,e1) op1 (a2,b2,c2,d2,e2) \+ = pre \+ a1 op1subop a2 \+ sep b1 op1subop b2 \+ sep c1 op1subop c2 \+ sep d1 op1subop d2 \+ sep e1 op1subop e2 \+ post \+ }++{- --------------------------------------------------------------------------+// Set of 2..n tuple, 1 binary op+// --------------------------------------------------------------------------+-}+#define TUPLE_BINOP1_INSTANCES(clscon,op1,op1subop,pre,sep,post) \+{ TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\+ TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\+ TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\+ TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \+}+
@@ -0,0 +1,149 @@+{- --------------------------------------------------------------------------+// Macros to help make Typeable instances.+//+// INSTANCE_TYPEABLEn(tc,tcname,"tc") defines+//+// instance Typeable/n/ tc+// instance Typeable a => Typeable/n-1/ (tc a)+// instance (Typeable a, Typeable b) => Typeable/n-2/ (tc a b)+// ...+// instance (Typeable a1, ..., Typeable an) => Typeable (tc a1 ... an)+// --------------------------------------------------------------------------+-}++#ifndef TYPEABLE_H+#define TYPEABLE_H++#define INSTANCE_TYPEABLE0(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable tycon where { typeOf _ = mkTyConApp tcname [] }++#ifdef __GLASGOW_HASKELL__++-- // For GHC, the extra instances follow from general instance declarations+-- // defined in Data.Typeable.++#define INSTANCE_TYPEABLE1(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE2(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE3(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE4(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE5(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE6(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }++#define INSTANCE_TYPEABLE7(tycon,tcname,str) \+tcname :: TyCon; \+tcname = mkTyCon str; \+instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }++#else /* !__GLASGOW_HASKELL__ */++#define INSTANCE_TYPEABLE1(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable (tycon a) where { typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE2(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable1 (tycon a) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b) => Typeable (tycon a b) where { \+ typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE3(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable2 (tycon a) where { \+ typeOf2 = typeOf2Default }; \+instance (Typeable a, Typeable b) => Typeable1 (tycon a b) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b, Typeable c) => Typeable (tycon a b c) where { \+ typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE4(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable3 (tycon a) where { \+ typeOf3 = typeOf3Default }; \+instance (Typeable a, Typeable b) => Typeable2 (tycon a b) where { \+ typeOf2 = typeOf2Default }; \+instance (Typeable a, Typeable b, Typeable c) => Typeable1 (tycon a b c) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable (tycon a b c d) where { \+ typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE5(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable4 (tycon a) where { \+ typeOf4 = typeOf4Default }; \+instance (Typeable a, Typeable b) => Typeable3 (tycon a b) where { \+ typeOf3 = typeOf3Default }; \+instance (Typeable a, Typeable b, Typeable c) => Typeable2 (tycon a b c) where { \+ typeOf2 = typeOf2Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable1 (tycon a b c d) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable (tycon a b c d e) where { \+ typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE6(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable5 (tycon a) where { \+ typeOf5 = typeOf5Default }; \+instance (Typeable a, Typeable b) => Typeable4 (tycon a b) where { \+ typeOf4 = typeOf4Default }; \+instance (Typeable a, Typeable b, Typeable c) => Typeable3 (tycon a b c) where { \+ typeOf3 = typeOf3Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable2 (tycon a b c d) where { \+ typeOf2 = typeOf2Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable1 (tycon a b c d e) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable (tycon a b c d e f) where { \+ typeOf = typeOfDefault }++#define INSTANCE_TYPEABLE7(tycon,tcname,str) \+tcname = mkTyCon str; \+instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }; \+instance Typeable a => Typeable6 (tycon a) where { \+ typeOf6 = typeOf6Default }; \+instance (Typeable a, Typeable b) => Typeable5 (tycon a b) where { \+ typeOf5 = typeOf5Default }; \+instance (Typeable a, Typeable b, Typeable c) => Typeable4 (tycon a b c) where { \+ typeOf4 = typeOf4Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable3 (tycon a b c d) where { \+ typeOf3 = typeOf3Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable2 (tycon a b c d e) where { \+ typeOf2 = typeOf2Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable1 (tycon a b c d e f) where { \+ typeOf1 = typeOf1Default }; \+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g) => Typeable (tycon a b c d e f g) where { \+ typeOf = typeOfDefault }++#endif /* !__GLASGOW_HASKELL__ */++#endif
@@ -0,0 +1,11 @@+/* + * (c) The University of Glasgow 2002+ *+ * Directory Runtime Support+ */+#ifndef __DIRUTILS_H__+#define __DIRUTILS_H__++extern int __hscore_readdir(DIR *dirPtr, struct dirent **pDirEnt);++#endif /* __DIRUTILS_H__ */
@@ -0,0 +1,2 @@+exposed-modules: Control.Monad Data.Bits Data.Char Data.Either Data.Int Data.IORef Data.List Data.Maybe Data.Typeable Data.Word Debug.Trace Foreign.C.Error Foreign.C.String Foreign.C.Types Foreign.C Foreign.ForeignPtr Foreign.Marshal.Alloc Foreign.Marshal.Array Foreign.Marshal.Error Foreign.Marshal.Pool Foreign.Marshal.Utils Foreign.Marshal Foreign.Ptr Foreign.StablePtr Foreign.Storable Foreign System.IO.Error System.IO.Fix System.IO.Unsafe System.IO System.Posix.Internals System.Posix.Types UHC.Array UHC.Base UHC.Bits UHC.Bounded UHC.BoxArray UHC.ByteArray UHC.Char UHC.Conc UHC.Enum UHC.Eq UHC.Float UHC.ForeignPtr UHC.GC UHC.Generics.Tuple UHC.Generics UHC.Handle UHC.Int UHC.IO UHC.IOBase UHC.Ix UHC.LazyST UHC.MutVar UHC.MVar UHC.OldException UHC.OldIO UHC.Ord UHC.Prims UHC.Ptr UHC.Read UHC.Real UHC.Run UHC.Show UHC.ST UHC.StablePtr UHC.StackTrace UHC.Storable UHC.STRef UHC.Types UHC.Weak UHC.WeakPtr UHC.Word Unsafe.Coerce+build-depends:
@@ -2,12 +2,15 @@ ## 1.1.8.5 -- +- [uhcr] Can run Core directly, on the fly compilation to CoreRun.+- [corerun] Generic (un)marshalling for CoreRun FFI.+- [core, api] Export of data types, new Core AST/API to express this.+- [corerun] Better fix for CoreRun access of globals during global init. ## 1.1.8.4 - 20150120 -- [corerun] Fix for module references during module setup (came up during CCO)-- [corerun] work on FFI bindings+- [corerun] Fix for module references during module setup (came up during CCO).+- [corerun] Work on FFI bindings. ## 1.1.8.3 - 20141226
@@ -1,9 +1,10 @@ module Main where import UHC.Light.Compiler.EHC.Main+import UHC.Light.Compiler.Opts {-# LINE 21 "src/ehc/EHC.chs" #-} -- | Top level main. TBD: hooks & customization main :: IO ()-main = mainEHC+main = mainEHC defaultEHCOpts
@@ -1,11 +1,13 @@ module Main where+import UHC.Light.Compiler.EHC.Main import UHC.Light.Compiler.EHC.Main.Utils import UHC.Light.Compiler.Base.API import UHC.Light.Compiler.CoreRun.API import UHC.Util.Pretty import UHC.Util.FPath import System.Exit+import System.FilePath import System.Console.GetOpt import System.IO import Control.Monad@@ -25,14 +27,24 @@ opts = maybe opts0 id o case ehcOptImmQuit opts of- Just immq -> handleImmQuitOption ehcrunCmdLineOpts ["rcr"] immq opts+ Just immq -> handleImmQuitOption ehcrunCmdLineOpts ["rcr", "cr"] immq opts _ -> case (n,errs) of- ([fname], []) -> run opts fname+ ([fname], []) -> do+ let (bname,ext) = splitExtension fname+ case ext of+ ".rcr" -> runRCR opts fname+ ".cr" -> mainEHC $ opts+ { ehcOptMbTarget = JustOk Target_None_Core_AsIs+ , ehcOptCoreOpts = CoreOpt_Run : ehcOptCoreOpts opts+ , ehcOptOptimizationScope = OptimizationScope_WholeCore+ , ehcOptVerbosity = VerboseQuiet+ }+ _ -> return () (_ , es) -> do putStr (head errs) exitFailure - where run opts fname = do+ where runRCR opts fname = do inp <- B.readFile fname case parseModFromString $ B.unpack inp of Left es -> forM_ es putStrLn@@ -41,8 +53,4 @@ case res of Left e -> putStrLn $ show $ pp e Right val -> putStrLn $ show $ pp val-{-- _ ->- putStrLn $ "Usage: " ++ progName ++ " file.rcr"--}
@@ -6,7 +6,7 @@ ( -- * Opts -- | Options to the compiler.- EHCOpts+ EHCOpts(..) , defaultEHCOpts -- * Names@@ -26,9 +26,17 @@ , HsName , HSNM(mkHNm) + -- * Possible targets, optimization, ...+ , Target(..)+ , OptimizationScope(..)+ -- * Error , Err + -- * Utility datatypes+ , MaybeOk(..)+ , Verbosity(..)+ -- * Misc , hsnEhcRunMain , hsnMain@@ -38,6 +46,8 @@ import UHC.Light.Compiler.Base.Common import UHC.Light.Compiler.Base.HsName import UHC.Light.Compiler.Base.HsName.Builtin+import UHC.Light.Compiler.Base.Target+import UHC.Light.Compiler.Base.Optimize import UHC.Light.Compiler.Opts import UHC.Light.Compiler.Error
@@ -1,6 +1,8 @@ module UHC.Light.Compiler.Base.CfgPP-( CfgPP (..)+( ppScanoptsNm+, CfgPP (..) , CfgPP_Plain (..), CfgPP_Core (..), CfgPP_Grin (..), CfgPP_TyCore (..)+, ppCoreNm , ppCTag', ppCTagExtensive' , ppCTagsMp ) where@@ -12,8 +14,15 @@ import Data.Char import qualified Data.Set as Set import UHC.Util.Pretty+import UHC.Util.ScanUtils -{-# LINE 37 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 39 "src/ehc/Base/CfgPP.chs" #-}+-- | Prettyprint 'HsName' with scanopts, taking care of properly escaping based on scan info (used when parsing)+ppScanoptsNm :: ScanOpts -> HsName -> PP_Doc+ppScanoptsNm copts n = fst $ ppHsnEscapeWith '$' (hsnOkChars '$' $ copts) (hsnNotOkStrs copts) (`Set.member` leaveAsIs) n+ where leaveAsIs = Set.fromList [hsnRowEmpty]++{-# LINE 50 "src/ehc/Base/CfgPP.chs" #-} class CfgPP x where cfgppHsName :: x -> HsName -> PP_Doc cfgppConHsName :: x -> HsName -> PP_Doc@@ -35,37 +44,44 @@ cfgppFollowAST _ = False cfgppTyPPVarDflt = \x pre tv mbpp -> cfgppVarHsName x (Just $ mkHNm $ pre ++ "_" ++ show tv) (Just tv) Nothing mbpp -{-# LINE 60 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 73 "src/ehc/Base/CfgPP.chs" #-} data CfgPP_Plain = CfgPP_Plain data CfgPP_Core = CfgPP_Core data CfgPP_TyCore = CfgPP_TyCore data CfgPP_Grin = CfgPP_Grin -{-# LINE 67 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 80 "src/ehc/Base/CfgPP.chs" #-} instance CfgPP CfgPP_Plain -{-# LINE 71 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 84 "src/ehc/Base/CfgPP.chs" #-} instance CfgPP CfgPP_Core where+ {- cfgppHsName _ n = fst $ ppHsnEscapeWith '$' (hsnOkChars '$' $ copts) (hsnNotOkStrs copts) (`Set.member` leaveAsIs) n where copts = coreScanOpts emptyEHCOpts leaveAsIs = Set.fromList [hsnRowEmpty]+ -}+ cfgppHsName _ n = ppScanoptsNm (coreScanOpts emptyEHCOpts) n cfgppConHsName = cfgppHsName cfgppFollowAST = const True cfgppUID _ u = ppUIDParseable u cfgppVarHsName x _ (Just u) _ _ = cfgppUID x u cfgppVarHsName x mn mu mi mp = cfgppVarHsNameFallback x mn mu mi mp -{-# LINE 83 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 99 "src/ehc/Base/CfgPP.chs" #-} ppNmTyCore = ppHsnEscaped (Right $ Set.fromList ['0'..'9']) '$' (hsnEscapeeChars '$' tycoreScanOpts) instance CfgPP CfgPP_TyCore where cfgppHsName _ = ppNmTyCore -{-# LINE 90 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 106 "src/ehc/Base/CfgPP.chs" #-} instance CfgPP CfgPP_Grin where cfgppHsName _ = ppHsnNonAlpha grinScanOpts -{-# LINE 99 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 115 "src/ehc/Base/CfgPP.chs" #-}+ppCoreNm :: HsName -> PP_Doc+ppCoreNm = cfgppHsName CfgPP_Core++{-# LINE 124 "src/ehc/Base/CfgPP.chs" #-} tnUniqRepr :: Int -> String tnUniqRepr = lrepr@@ -75,7 +91,7 @@ in (repr d : lrepr r) repr = (chr . (97+)) -{-# LINE 114 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 139 "src/ehc/Base/CfgPP.chs" #-} -- intended for parsing ppCTag' :: CfgPP x => x -> CTag -> PP_Doc ppCTag' x t@@ -92,7 +108,7 @@ CTag ty nm tag arity mxarity -> ppCurlysCommas' [ppNm ty, ppNm nm, pp tag, pp arity, pp mxarity] where ppNm n = cfgppHsName x n -{-# LINE 132 "src/ehc/Base/CfgPP.chs" #-}+{-# LINE 157 "src/ehc/Base/CfgPP.chs" #-} ppCTagsMp :: CfgPP x => x -> CTagsMp -> PP_Doc ppCTagsMp x = mkl (mkl (ppCTag' x))
@@ -64,12 +64,12 @@ , verMajor = "1" , verMinor = "1" , verMinorMinor = "8"- , verMinorMinorMinor = "4"+ , verMinorMinorMinor = "5" , verQuality = "alpha" , verShort = "1.1" , verMedium = "1.1.8"- , verFull = "1.1.8.4"- , verAsNumber = "1184"+ , verFull = "1.1.8.5"+ , verAsNumber = "1185" , verProg = "ehc" }
@@ -11,7 +11,7 @@ cppOpts = fst $ parseCmdLineOpts Cmd_CPP "-Wno-invalid-pp-token" -- cppOpts = showCmdLineOpts cppOpts' -ehcSvnRevision = "master@fe26215c8d"+ehcSvnRevision = "master@c63beca5b2" ehcDefaultInplaceInstallDir = "/Volumes/Work/Programming/uhc/EHC/install"
@@ -18,5 +18,5 @@ internalVersionHI = mkInternalVersion 1 -- | For binary/serialized Core .cr/.bcr etc files-internalVersionCore = mkInternalVersion 11+internalVersionCore = mkInternalVersion 14
@@ -38,7 +38,7 @@ , cmodSetImports , cbindAspectMbExpr, cbindExprs , cLevIntern-, cModMerge+, cModMergeByConcat , CDbBindLetInfo , CDbBindRef, CDbModuleBindMp , CModuleDatabase (..), emptyCModuleDatabase@@ -333,8 +333,8 @@ -- | merge by concatenation-cModMerge :: [CModule] -> CModule-cModMerge mL+cModMergeByConcat :: [CModule] -> CModule+cModMergeByConcat mL = foldr1 cmb mL where get (CExpr_Let c b e) = CExpr_Let c b . get e get _ = id@@ -533,11 +533,13 @@ 0 -> -} liftM5 CModule_Mod sget sget sget sget sget instance Serialize CExport where- sput (CExport_Export a ) = {- sputWord8 0 >> -} sput a+ sput (CExport_Export a ) = sputWord8 0 >> sput a+ sput (CExport_ExportData a b) = sputWord8 1 >> sput a >> sput b sget- = do {- t <- sgetWord8+ = do t <- sgetWord8 case t of- 0 -> -} liftM CExport_Export sget+ 0 -> liftM CExport_Export sget+ 1 -> liftM2 CExport_ExportData sget sget instance Serialize CImport where sput (CImport_Import a ) = {- sputWord8 0 >> -} sput a@@ -752,6 +754,7 @@ type CDeclMetaL = [CDeclMeta] -- CExport ----------------------------------------------------- data CExport = CExport_Export {nm_CExport_Export :: !(HsName)}+ | CExport_ExportData {nm_CExport_ExportData :: !(HsName),mbConNmL_CExport_ExportData :: !((Maybe [HsName]))} deriving ( Data,Eq,Ord,Typeable) -- CExportL ---------------------------------------------------- type CExportL = [CExport]
@@ -104,6 +104,7 @@ , mkModule , mkImport , mkExport+ , mkExportData , mkMetaData , mkMetaDataCon , mkMetaDataConFromCTag@@ -363,8 +364,19 @@ -> EC.CImport mkImport = EC.CImport_Import +-- | Create a plain export.+-- Exported names are unqualified, implicitly qualified by module name. mkExport :: HsName -> EC.CExport mkExport = EC.CExport_Export++-- | Create an export for data.+-- Exported names are unqualified, implicitly qualified by module name.+-- Constructor name exports may not overlap with plain exported names.+mkExportData+ :: HsName -- ^ type name+ -> Maybe [HsName] -- ^ constructor names, if Nothing then all are exported+ -> EC.CExport+mkExportData = EC.CExport_ExportData -- | Creates the metadata for one datatype. mkMetaData :: HsName -- ^ The name of the dataype.
@@ -780,17 +780,27 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ =+ ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ = ( ) -- CExportL ---------------------------------------------------- {-
@@ -288,7 +288,7 @@ (case (_bindAspectsIisFreeOfLam) of { _lhsOisFreeOfLam -> (case (let o = IdOcc nm_ IdOcc_Val- in Rel.fromList [ (hsnQualified (ioccNm o), ModEnt IdOcc_Val o Set.empty emptyRange) ]) of+ in Rel.fromList [ (hsnQualified (ioccNm o), ModEnt (ioccKind o) o Set.empty emptyRange) ]) of { _lhsOmodDefsRel -> (case (nm_) of { _lhsOnm ->@@ -951,6 +951,7 @@ {- visit 0: synthesized attributes:+ dataConNmL : [HsName] dataConstrTagMp : DataConstrTagMp errs : ErrSq undefNmMp : UndefNmMp@@ -968,28 +969,31 @@ sem_CDataCon (CDataCon_Con _conNm _tagNr _arity) = (sem_CDataCon_Con _conNm _tagNr _arity) -- semantic domain-type T_CDataCon = ( DataConstrTagMp,ErrSq,UndefNmMp)+type T_CDataCon = ( ([HsName]),DataConstrTagMp,ErrSq,UndefNmMp) sem_CDataCon_Con :: HsName -> Int -> Int -> T_CDataCon sem_CDataCon_Con conNm_ tagNr_ arity_ =- (case (emptyDataTagInfo- { dtiConNm = conNm_- , dtiCTag = mkOnlyConInfoCTag conNm_ tagNr_ arity_- }) of- { _dti ->- (case (Map.singleton conNm_ _dti) of- { _lhsOdataConstrTagMp ->- (case (Seq.empty) of- { _lhsOerrs ->- (case (Map.empty) of- { _lhsOundefNmMp ->- ( _lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) }) })+ (case ([conNm_]) of+ { _lhsOdataConNmL ->+ (case (emptyDataTagInfo+ { dtiConNm = conNm_+ , dtiCTag = mkOnlyConInfoCTag conNm_ tagNr_ arity_+ }) of+ { _dti ->+ (case (Map.singleton conNm_ _dti) of+ { _lhsOdataConstrTagMp ->+ (case (Seq.empty) of+ { _lhsOerrs ->+ (case (Map.empty) of+ { _lhsOundefNmMp ->+ ( _lhsOdataConNmL,_lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) }) }) }) -- CDataConL --------------------------------------------------- {- visit 0: synthesized attributes:+ dataConNmL : [HsName] dataConstrTagMp : DataConstrTagMp errs : ErrSq undefNmMp : UndefNmMp@@ -1005,37 +1009,42 @@ sem_CDataConL list = (Prelude.foldr sem_CDataConL_Cons sem_CDataConL_Nil (Prelude.map sem_CDataCon list)) -- semantic domain-type T_CDataConL = ( DataConstrTagMp,ErrSq,UndefNmMp)+type T_CDataConL = ( ([HsName]),DataConstrTagMp,ErrSq,UndefNmMp) sem_CDataConL_Cons :: T_CDataCon -> T_CDataConL -> T_CDataConL sem_CDataConL_Cons hd_ tl_ = (case (tl_) of- { ( _tlIdataConstrTagMp,_tlIerrs,_tlIundefNmMp) ->+ { ( _tlIdataConNmL,_tlIdataConstrTagMp,_tlIerrs,_tlIundefNmMp) -> (case (hd_) of- { ( _hdIdataConstrTagMp,_hdIerrs,_hdIundefNmMp) ->- (case (_hdIdataConstrTagMp `Map.union` _tlIdataConstrTagMp) of- { _lhsOdataConstrTagMp ->- (case (_hdIerrs `Seq.union` _tlIerrs) of- { _lhsOerrs ->- (case (_hdIundefNmMp `undefmpUnion` _tlIundefNmMp) of- { _lhsOundefNmMp ->- ( _lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) }) }) })+ { ( _hdIdataConNmL,_hdIdataConstrTagMp,_hdIerrs,_hdIundefNmMp) ->+ (case (_hdIdataConNmL ++ _tlIdataConNmL) of+ { _lhsOdataConNmL ->+ (case (_hdIdataConstrTagMp `Map.union` _tlIdataConstrTagMp) of+ { _lhsOdataConstrTagMp ->+ (case (_hdIerrs `Seq.union` _tlIerrs) of+ { _lhsOerrs ->+ (case (_hdIundefNmMp `undefmpUnion` _tlIundefNmMp) of+ { _lhsOundefNmMp ->+ ( _lhsOdataConNmL,_lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) }) }) }) }) sem_CDataConL_Nil :: T_CDataConL sem_CDataConL_Nil =- (case (Map.empty) of- { _lhsOdataConstrTagMp ->- (case (Seq.empty) of- { _lhsOerrs ->- (case (Map.empty) of- { _lhsOundefNmMp ->- ( _lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) })+ (case ([]) of+ { _lhsOdataConNmL ->+ (case (Map.empty) of+ { _lhsOdataConstrTagMp ->+ (case (Seq.empty) of+ { _lhsOerrs ->+ (case (Map.empty) of+ { _lhsOundefNmMp ->+ ( _lhsOdataConNmL,_lhsOdataConstrTagMp,_lhsOerrs,_lhsOundefNmMp) }) }) }) }) -- CDeclMeta --------------------------------------------------- {- visit 0: synthesized attributes: errs : ErrSq gathDataGam : DataGam+ modDefsRel : ModEntRel undefNmMp : UndefNmMp alternatives: alternative Data:@@ -1048,26 +1057,31 @@ sem_CDeclMeta (CDeclMeta_Data _tyNm _dataCons) = (sem_CDeclMeta_Data _tyNm (sem_CDataConL _dataCons)) -- semantic domain-type T_CDeclMeta = ( ErrSq,DataGam,UndefNmMp)+type T_CDeclMeta = ( ErrSq,DataGam,ModEntRel,UndefNmMp) sem_CDeclMeta_Data :: HsName -> T_CDataConL -> T_CDeclMeta sem_CDeclMeta_Data tyNm_ dataCons_ = (case (dataCons_) of- { ( _dataConsIdataConstrTagMp,_dataConsIerrs,_dataConsIundefNmMp) ->+ { ( _dataConsIdataConNmL,_dataConsIdataConstrTagMp,_dataConsIerrs,_dataConsIundefNmMp) -> (case (_dataConsIerrs) of { _lhsOerrs -> (case (gamSingleton tyNm_ $ mkDGIForCodegenOnly tyNm_ _dataConsIdataConstrTagMp) of { _lhsOgathDataGam ->- (case (_dataConsIundefNmMp) of- { _lhsOundefNmMp ->- ( _lhsOerrs,_lhsOgathDataGam,_lhsOundefNmMp) }) }) }) })+ (case (let to = IdOcc ( tyNm_) IdOcc_Data+ subs = [ ModEnt (ioccKind o) o Set.empty emptyRange | cn <- _dataConsIdataConNmL, let o = IdOcc ( cn) IdOcc_Val ]+ in Rel.singleton (hsnQualified (ioccNm to)) (ModEnt (ioccKind to) to (Set.fromList subs) emptyRange)) of+ { _lhsOmodDefsRel ->+ (case (_dataConsIundefNmMp) of+ { _lhsOundefNmMp ->+ ( _lhsOerrs,_lhsOgathDataGam,_lhsOmodDefsRel,_lhsOundefNmMp) }) }) }) }) }) -- CDeclMetaL -------------------------------------------------- {- visit 0: synthesized attributes: errs : ErrSq gathDataGam : DataGam+ modDefsRel : ModEntRel undefNmMp : UndefNmMp alternatives: alternative Cons:@@ -1081,31 +1095,35 @@ sem_CDeclMetaL list = (Prelude.foldr sem_CDeclMetaL_Cons sem_CDeclMetaL_Nil (Prelude.map sem_CDeclMeta list)) -- semantic domain-type T_CDeclMetaL = ( ErrSq,DataGam,UndefNmMp)+type T_CDeclMetaL = ( ErrSq,DataGam,ModEntRel,UndefNmMp) sem_CDeclMetaL_Cons :: T_CDeclMeta -> T_CDeclMetaL -> T_CDeclMetaL sem_CDeclMetaL_Cons hd_ tl_ = (case (tl_) of- { ( _tlIerrs,_tlIgathDataGam,_tlIundefNmMp) ->+ { ( _tlIerrs,_tlIgathDataGam,_tlImodDefsRel,_tlIundefNmMp) -> (case (hd_) of- { ( _hdIerrs,_hdIgathDataGam,_hdIundefNmMp) ->+ { ( _hdIerrs,_hdIgathDataGam,_hdImodDefsRel,_hdIundefNmMp) -> (case (_hdIerrs `Seq.union` _tlIerrs) of { _lhsOerrs -> (case (_hdIgathDataGam `gamUnion` _tlIgathDataGam) of { _lhsOgathDataGam ->- (case (_hdIundefNmMp `undefmpUnion` _tlIundefNmMp) of- { _lhsOundefNmMp ->- ( _lhsOerrs,_lhsOgathDataGam,_lhsOundefNmMp) }) }) }) }) })+ (case (_hdImodDefsRel `Rel.union` _tlImodDefsRel) of+ { _lhsOmodDefsRel ->+ (case (_hdIundefNmMp `undefmpUnion` _tlIundefNmMp) of+ { _lhsOundefNmMp ->+ ( _lhsOerrs,_lhsOgathDataGam,_lhsOmodDefsRel,_lhsOundefNmMp) }) }) }) }) }) }) sem_CDeclMetaL_Nil :: T_CDeclMetaL sem_CDeclMetaL_Nil = (case (Seq.empty) of { _lhsOerrs -> (case (emptyGam) of { _lhsOgathDataGam ->- (case (Map.empty) of- { _lhsOundefNmMp ->- ( _lhsOerrs,_lhsOgathDataGam,_lhsOundefNmMp) }) }) })+ (case (Rel.empty) of+ { _lhsOmodDefsRel ->+ (case (Map.empty) of+ { _lhsOundefNmMp ->+ ( _lhsOerrs,_lhsOgathDataGam,_lhsOmodDefsRel,_lhsOundefNmMp) }) }) }) }) -- CExport ----------------------------------------------------- {- visit 0:@@ -1116,12 +1134,17 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ErrSq,([ModExp]),UndefNmMp) sem_CExport_Export :: HsName ->@@ -1129,11 +1152,22 @@ sem_CExport_Export nm_ = (case (Seq.empty) of { _lhsOerrs ->- (case ([ModExpEnt (ModEntSpec nm_ emptyRange Nothing)]) of+ (case ([ModExpEnt (ModEntSpec (hsnQualified nm_) emptyRange Nothing)]) of { _lhsOmodExpL -> (case (Map.empty) of { _lhsOundefNmMp -> ( _lhsOerrs,_lhsOmodExpL,_lhsOundefNmMp) }) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (Seq.empty) of+ { _lhsOerrs ->+ (case ([ModExpEnt (ModEntSpec (hsnQualified nm_) emptyRange (fmap (ModEntSubs . map hsnQualified) mbConNmL_))]) of+ { _lhsOmodExpL ->+ (case (Map.empty) of+ { _lhsOundefNmMp ->+ ( _lhsOerrs,_lhsOmodExpL,_lhsOundefNmMp) }) }) }) -- CExportL ---------------------------------------------------- {- visit 0:@@ -2962,7 +2996,7 @@ (case (_lhsIlev) of { _exprOlev -> (case (declMetas_) of- { ( _declMetasIerrs,_declMetasIgathDataGam,_declMetasIundefNmMp) ->+ { ( _declMetasIerrs,_declMetasIgathDataGam,_declMetasImodDefsRel,_declMetasIundefNmMp) -> (case (_lhsIdataGam `gamUnion` _declMetasIgathDataGam) of { _dataGam -> (case (_dataGam) of@@ -2991,7 +3025,9 @@ { _lhsOisFreeOfLam -> (case (moduleNm_) of { _realModuleNm ->- (case (Mod _realModuleNm (Just _realModuleNm) (Just _exportsImodExpL) _importsImodImpL _exprImodDefsRel Rel.empty []) of+ (case (Mod _realModuleNm (Just _realModuleNm) (Just _exportsImodExpL) _importsImodImpL+ (_declMetasImodDefsRel `Rel.union` _exprImodDefsRel)+ Rel.empty []) of { _lhsOmod -> (case (_exprInotYetTransformed) of { _lhsOnotYetTransformed ->
@@ -678,17 +678,27 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ =+ ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ = ( ) -- CExportL ---------------------------------------------------- {-
@@ -513,17 +513,27 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ =+ ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ = ( ) -- CExportL ---------------------------------------------------- {-
@@ -562,18 +562,34 @@ child nm : {HsName} visit 0: local copy : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local copy : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _copy ->+ (case (_copy) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _copy -> (case (_copy) of { _lhsOcopy ->
@@ -62,7 +62,12 @@ pCExport :: CParser CExport pCExport- = CExport_Export <$ pEXPORT <*> pDollNm <* pSEMI+ -- = CExport_Export <$ pEXPORT <*> pDollNm <* pSEMI+ = pEXPORT *>+ ( CExport_ExportData <$ pDATA <*> pDollNm <*> pMb (pParens_pCommas pDollNm)+ <|> CExport_Export <$> pDollNm+ )+ <* pSEMI pCImport :: CParser CImport pCImport
@@ -73,7 +73,7 @@ ppCNm :: HsName -> PP_Doc-ppCNm = cfgppHsName CfgPP_Core+ppCNm = ppCoreNm @@ -1289,12 +1289,17 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = EHCOpts -> ( PP_Doc)@@ -1303,6 +1308,14 @@ sem_CExport_Export nm_ = (\ _lhsIopts -> (case ("export" >#< ppCNm nm_) of+ { _lhsOpp ->+ ( _lhsOpp) }))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (\ _lhsIopts ->+ (case ("export data" >#< ppMbPost ppParensCommas mbConNmL_ (ppCNm nm_)) of { _lhsOpp -> ( _lhsOpp) })) -- CExportL ----------------------------------------------------
@@ -975,18 +975,34 @@ child nm : {HsName} visit 0: local cRepl : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cRepl : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cRepl ->+ (case (_cRepl) of+ { _lhsOcRepl ->+ ( _lhsOcRepl) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cRepl -> (case (_cRepl) of { _lhsOcRepl ->
@@ -1,7 +1,7 @@ -- UUAGC 0.9.50.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/ToCoreRun)-module UHC.Light.Compiler.Core.ToCoreRun(cmod2CoreRun', cmod2CoreRun) where+module UHC.Light.Compiler.Core.ToCoreRun(cmod2CoreRun', cmod2CoreRunWithModNr, cmod2CoreRun) where import UHC.Light.Compiler.Base.Common import UHC.Light.Compiler.Base.TermLike@@ -59,9 +59,12 @@ , nm2ref_Inh_CodeAGItf = nm2ref }) +cmod2CoreRunWithModNr :: Int -> CModule -> CR.Mod+cmod2CoreRunWithModNr nr m = m'+ where (m',_) = cmod2CoreRun' defaultEHCOpts nr Map.empty m+ cmod2CoreRun :: CModule -> CR.Mod-cmod2CoreRun m = m'- where (m',_) = cmod2CoreRun' defaultEHCOpts 0 Map.empty m+cmod2CoreRun = cmod2CoreRunWithModNr 0 @@ -1430,6 +1433,9 @@ ( _lhsOcrb,_lhsOnm2refGath,_lhsOrefOffset,_lhsOrefOffsetMax,_lhsOstackDepth,_lhsOstackDepthMax) }) }) }) }) }) })) -- CDataCon ---------------------------------------------------- {-+ visit 0:+ synthesized attribute:+ crdc : [CR.DataCon] alternatives: alternative Con: child conNm : {HsName}@@ -1442,15 +1448,20 @@ sem_CDataCon (CDataCon_Con _conNm _tagNr _arity) = (sem_CDataCon_Con _conNm _tagNr _arity) -- semantic domain-type T_CDataCon = ( )+type T_CDataCon = ( ([CR.DataCon])) sem_CDataCon_Con :: HsName -> Int -> Int -> T_CDataCon sem_CDataCon_Con conNm_ tagNr_ arity_ =- ( )+ (case ([CR.DataCon_Con (hsnQualified conNm_) tagNr_]) of+ { _lhsOcrdc ->+ ( _lhsOcrdc) }) -- CDataConL --------------------------------------------------- {-+ visit 0:+ synthesized attribute:+ crdc : [CR.DataCon] alternatives: alternative Cons: child hd : CDataCon @@ -1463,17 +1474,28 @@ sem_CDataConL list = (Prelude.foldr sem_CDataConL_Cons sem_CDataConL_Nil (Prelude.map sem_CDataCon list)) -- semantic domain-type T_CDataConL = ( )+type T_CDataConL = ( ([CR.DataCon])) sem_CDataConL_Cons :: T_CDataCon -> T_CDataConL -> T_CDataConL sem_CDataConL_Cons hd_ tl_ =- ( )+ (case (tl_) of+ { ( _tlIcrdc) ->+ (case (hd_) of+ { ( _hdIcrdc) ->+ (case (_hdIcrdc ++ _tlIcrdc) of+ { _lhsOcrdc ->+ ( _lhsOcrdc) }) }) }) sem_CDataConL_Nil :: T_CDataConL sem_CDataConL_Nil =- ( )+ (case ([]) of+ { _lhsOcrdc ->+ ( _lhsOcrdc) }) -- CDeclMeta --------------------------------------------------- {-+ visit 0:+ synthesized attribute:+ crmt : [CR.Meta] alternatives: alternative Data: child tyNm : {HsName}@@ -1485,14 +1507,21 @@ sem_CDeclMeta (CDeclMeta_Data _tyNm _dataCons) = (sem_CDeclMeta_Data _tyNm (sem_CDataConL _dataCons)) -- semantic domain-type T_CDeclMeta = ( )+type T_CDeclMeta = ( ([CR.Meta])) sem_CDeclMeta_Data :: HsName -> T_CDataConL -> T_CDeclMeta sem_CDeclMeta_Data tyNm_ dataCons_ =- ( )+ (case (dataCons_) of+ { ( _dataConsIcrdc) ->+ (case ([CR.Meta_Data tyNm_ _dataConsIcrdc]) of+ { _lhsOcrmt ->+ ( _lhsOcrmt) }) }) -- CDeclMetaL -------------------------------------------------- {-+ visit 0:+ synthesized attribute:+ crmt : [CR.Meta] alternatives: alternative Cons: child hd : CDeclMeta @@ -1505,32 +1534,50 @@ sem_CDeclMetaL list = (Prelude.foldr sem_CDeclMetaL_Cons sem_CDeclMetaL_Nil (Prelude.map sem_CDeclMeta list)) -- semantic domain-type T_CDeclMetaL = ( )+type T_CDeclMetaL = ( ([CR.Meta])) sem_CDeclMetaL_Cons :: T_CDeclMeta -> T_CDeclMetaL -> T_CDeclMetaL sem_CDeclMetaL_Cons hd_ tl_ =- ( )+ (case (tl_) of+ { ( _tlIcrmt) ->+ (case (hd_) of+ { ( _hdIcrmt) ->+ (case (_hdIcrmt ++ _tlIcrmt) of+ { _lhsOcrmt ->+ ( _lhsOcrmt) }) }) }) sem_CDeclMetaL_Nil :: T_CDeclMetaL sem_CDeclMetaL_Nil =- ( )+ (case ([]) of+ { _lhsOcrmt ->+ ( _lhsOcrmt) }) -- CExport ----------------------------------------------------- {- alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ ( ) -- CExportL ---------------------------------------------------- {- alternatives:@@ -5178,13 +5225,15 @@ { _crmBinds -> (case (_exprIcre) of { _creMod ->- (case (CR.Mod_Mod (CR.nm2RefMpInverse _nm2refNew)- moduleNm_ _lhsImodNr (_exprIstackDepthMax + 2 )- _crmBinds (CR.mkEval _creMod)) of- { _lhsOcrm ->- (case (_exprInm2refGath) of- { _lhsOnm2refGath ->- ( _lhsOcrm,_lhsOnm2refGath) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }))+ (case (declMetas_) of+ { ( _declMetasIcrmt) ->+ (case (CR.Mod_Mod (CR.nm2RefMpInverse _nm2refNew)+ moduleNm_ _lhsImodNr (_exprIstackDepthMax + 2 )+ _declMetasIcrmt _crmBinds (CR.mkEval _creMod)) of+ { _lhsOcrm ->+ (case (_exprInm2refGath) of+ { _lhsOnm2refGath ->+ ( _lhsOcrm,_lhsOnm2refGath) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) -- CPat -------------------------------------------------------- {- visit 0:
@@ -1426,17 +1426,27 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ =+ ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ = ( ) -- CExportL ---------------------------------------------------- {-
@@ -2230,12 +2230,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -2245,6 +2252,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -3681,12 +3681,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -3696,6 +3703,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -971,18 +971,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -2545,12 +2545,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -2560,6 +2567,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -887,18 +887,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -638,18 +638,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -994,18 +994,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -960,18 +960,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -929,18 +929,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -1827,12 +1827,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -1842,6 +1849,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -644,18 +644,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -1130,18 +1130,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -2029,12 +2029,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -2044,6 +2051,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -2786,12 +2786,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -2801,6 +2808,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -858,18 +858,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -677,18 +677,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf ->+ (case (_cTrf) of+ { _lhsOcTrf ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf -> (case (_cTrf) of { _lhsOcTrf ->
@@ -940,18 +940,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -1237,12 +1237,19 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName ->@@ -1252,6 +1259,18 @@ -- self rule _cTrf = CExport_Export nm_+ -- self rule+ _lhsOcTrf =+ _cTrf+ in ( _lhsOcTrf))+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (let _lhsOcTrf :: CExport+ -- self rule+ _cTrf =+ CExport_ExportData nm_ mbConNmL_ -- self rule _lhsOcTrf = _cTrf
@@ -1345,18 +1345,34 @@ child nm : {HsName} visit 0: local cTrf : _+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]}+ visit 0:+ local cTrf : _ -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( CExport) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ = (case (CExport_Export nm_) of+ { _cTrf | _cTrf `seq` (True) ->+ (case (_cTrf) of+ { _lhsOcTrf | _lhsOcTrf `seq` (True) ->+ ( _lhsOcTrf) }) })+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ =+ (case (CExport_ExportData nm_ mbConNmL_) of { _cTrf | _cTrf `seq` (True) -> (case (_cTrf) of { _lhsOcTrf | _lhsOcTrf `seq` (True) ->
@@ -468,17 +468,27 @@ alternatives: alternative Export: child nm : {HsName}+ alternative ExportData:+ child nm : {HsName}+ child mbConNmL : {Maybe [HsName]} -} -- cata sem_CExport :: CExport -> T_CExport sem_CExport (CExport_Export _nm) = (sem_CExport_Export _nm)+sem_CExport (CExport_ExportData _nm _mbConNmL) =+ (sem_CExport_ExportData _nm _mbConNmL) -- semantic domain type T_CExport = ( ) sem_CExport_Export :: HsName -> T_CExport sem_CExport_Export nm_ =+ ( )+sem_CExport_ExportData :: HsName ->+ (Maybe [HsName]) ->+ T_CExport+sem_CExport_ExportData nm_ mbConNmL_ = ( ) -- CExportL ---------------------------------------------------- {-
@@ -3,6 +3,7 @@ -- UUAGC 0.9.50.2 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun.ag) module UHC.Light.Compiler.CoreRun(module UHC.Light.Compiler.CoreRun.Prim , Mod (..), SExp (..), Exp (..), Alt (..), Pat (..)+, Meta (..), MetaL, DataCon (..), DataConL , CRArray, CRMArray, emptyCRArray, crarrayToList, crarrayFromList, craLength, craAssocs, craAssocs', craReverseAssocs' , Bind , dbgs, dbg@@ -11,12 +12,13 @@ , RRef (..), noRRef , rrefToDif , Ref2Nm-, Nm2RefMp, nm2RefMpInverse, ref2nmEmpty, ref2nmUnion+, Nm2RefMp, emptyNm2RefMp, nm2refUnion, nm2RefMpInverse, ref2nmEmpty, ref2nmUnion , mkLocLevRef, mkLocDifRef, mkGlobRef , mkExp, mkVar, mkVar', mkInt, mkInt', mkChar, mkChar', mkString, mkString' , mkDbg, mkDbg' , mkApp, mkApp', mkTup, mkTup', mkEval, mkTail, mkCase, mkLam, mkLam', mkLet, mkLet', mkFFI, mkFFI'-, mkMod, mkMod'+, mkMetaDataCon, mkMetaDataType+, mkMod, mkMod', mkMod'' , mkInteger, mkInteger') where import UHC.Light.Compiler.Base.Common@@ -55,17 +57,12 @@ ++ -- | Fast access sequence-type CRArray x = V.Vector x+type CRArray x = V.Vector x type CRMArray x = MV.IOVector x -{---- | Make array with lowerbound-mkCRArrayLwb :: Int -> [x] -> CRArray x-mkCRArrayLwb lwb xs = listArray (lwb,lwb+l-1) xs- where l = length xs--}- -- | Wrapper (rename) around vector<->list conversion crarrayFromList :: [x] -> CRArray x -- crarrayFromList = mkCRArrayLwb 0@@ -141,7 +138,7 @@ { rrefMod :: !Int -- ^ module , rrefEntry :: !Int -- ^ entry inside module }- -- | local reference to on stack value, not interpreted during running+ -- | local reference to on stack value, not interpreted during running, if used must be converted with 'rrefToDif' before running; may become obsolete. | RRef_Loc { rrefLev :: !Int -- ^ level when used statically , rrefEntry :: !Int -- ^ entry inside level@@ -151,7 +148,7 @@ { rrefLevDiff :: !Int -- ^ offset/difference in levels when used at runtime , rrefEntry :: !Int -- ^ entry inside level }- -- | tag of memory/constructor node referred to by other ref (not yet used)+ -- | tag of memory/constructor node referred to by other ref | RRef_Tag { rrefRef :: !RRef -- ^ of what this is the tag }@@ -190,6 +187,12 @@ -- | HsName to RRef mapping for resolving references during translation to CoreRun type Nm2RefMp = Map.Map HsName RRef +emptyNm2RefMp :: Nm2RefMp+emptyNm2RefMp = Map.empty++nm2refUnion :: Nm2RefMp -> Nm2RefMp -> Nm2RefMp+nm2refUnion = Map.union+ -- | Inverse of a `Nm2RefMp` nm2RefMpInverse :: Nm2RefMp -> Ref2Nm nm2RefMpInverse m@@ -371,9 +374,41 @@ -- **************************************+-- Construction: Meta info+-- **************************************++-- | Meta: datatype constructor info+mkMetaDataCon+ :: HsName -- ^ constructor name (without module qualifier, name must be globally unique)+ -> Int -- ^ constructor tag+ -> DataCon+mkMetaDataCon = DataCon_Con++-- | Meta: datatype constructor info+mkMetaDataType+ :: HsName -- ^ datatype name (fully qualified)+ -> [DataCon] -- ^ constructor tag+ -> Meta+mkMetaDataType = Meta_Data+++++-- ************************************** -- Construction: Top level module -- ************************************** +-- | Module, with meta info+mkMod''+ :: HsName -- ^ module name+ -> Int -- ^ module number+ -> Int -- ^ total stack size, including globals of module, their setup (see semantics), and the main startup part kicking of evaluation+ -> [Meta] -- ^ meta info+ -> CRArray Bind -- ^ bound expressions+ -> Exp -- ^ body of main+ -> Mod+mkMod'' modNm modNr stkDepth metas binds body = Mod_Mod ref2nmEmpty modNm modNr stkDepth metas binds body+ -- | Module mkMod' :: HsName -- ^ module name@@ -382,7 +417,7 @@ -> CRArray Bind -- ^ bound expressions -> Exp -- ^ body of main -> Mod-mkMod' modNm modNr stkDepth binds body = Mod_Mod ref2nmEmpty modNm modNr stkDepth binds body+mkMod' modNm modNr stkDepth binds body = mkMod'' modNm modNr stkDepth [] binds body -- | Module mkMod@@ -396,6 +431,10 @@ -- Alt --------------------------------------------------------- data Alt = Alt_Alt {ref2nm_Alt_Alt :: !(Ref2Nm),expr_Alt_Alt :: !(Exp)}+-- DataCon -----------------------------------------------------+data DataCon = DataCon_Con {conNm_DataCon_Con :: !(HsName),tagNr_DataCon_Con :: !(Int)}+-- DataConL ----------------------------------------------------+type DataConL = [DataCon] -- Exp --------------------------------------------------------- data Exp = Exp_SExp {sexpr_Exp_SExp :: !(SExp)} | Exp_Tup {tag_Exp_Tup :: !(Int),args_Exp_Tup :: !((CRArray SExp))}@@ -406,8 +445,12 @@ | Exp_Tail {expr_Exp_Tail :: !(Exp)} | Exp_Case {expr_Exp_Case :: !(SExp),alts_Exp_Case :: !((CRArray Alt))} | Exp_FFI {prim_Exp_FFI :: !(RunPrim),args_Exp_FFI :: !((CRArray SExp))}+-- Meta --------------------------------------------------------+data Meta = Meta_Data {tyNm_Meta_Data :: !(HsName),dataCons_Meta_Data :: !(DataConL)}+-- MetaL -------------------------------------------------------+type MetaL = [Meta] -- Mod ----------------------------------------------------------data Mod = Mod_Mod {ref2nm_Mod_Mod :: !(Ref2Nm),moduleNm_Mod_Mod :: !(HsName),moduleNr_Mod_Mod :: !(Int),stkDepth_Mod_Mod :: !(Int),binds_Mod_Mod :: !((CRArray Bind)),body_Mod_Mod :: !(Exp)}+data Mod = Mod_Mod {ref2nm_Mod_Mod :: !(Ref2Nm),moduleNm_Mod_Mod :: !(HsName),moduleNr_Mod_Mod :: !(Int),stkDepth_Mod_Mod :: !(Int),metas_Mod_Mod :: !(MetaL),binds_Mod_Mod :: !((CRArray Bind)),body_Mod_Mod :: !(Exp)} -- Pat --------------------------------------------------------- data Pat = Pat_Con {tag_Pat_Con :: !(Int)} | Pat_BoolExpr {expr_Pat_BoolExpr :: !(Exp)}
@@ -19,15 +19,20 @@ -- , Pat , Bind , RRef+ , Meta+ , DataCon -- * Utilities , CRArray -- * Construction functions++ -- ** References , mkLocLevRef , mkLocDifRef , mkGlobRef + -- ** Expressions , mkExp , mkVar, mkVar'@@ -46,7 +51,11 @@ , mkLet, mkLet' , mkFFI, mkFFI' - , mkMod, mkMod'+ -- ** Meta+ , mkMetaDataCon, mkMetaDataType++ -- ** Modules+ , mkMod, mkMod', mkMod'' -- * Conversion , rrefToDif
@@ -19,6 +19,8 @@ , SExp(..) , Alt(..) , Pat(..)+ , DataCon(..)+ , Meta(..) , RRef(..) -- * Utilities
@@ -20,15 +20,29 @@ (_, errs) -> Left $ map show errs {-# LINE 41 "src/ehc/CoreRun/Parser.chs" #-}+pDifficultNm :: CRParser HsName+pDifficultNm = (\s -> {- parseHsName [s] -} mkHNm s) <$> pStr++{-# LINE 50 "src/ehc/CoreRun/Parser.chs" #-} type CRParser hp = PlainParser Token hp -{-# LINE 45 "src/ehc/CoreRun/Parser.chs" #-}+{-# LINE 54 "src/ehc/CoreRun/Parser.chs" #-} -- | Parse module 'Mod' pMod :: CRParser Mod pMod- = (\nm nr sz main bs -> mkMod nm nr sz bs main)+ = (\nm nr sz main ms bs -> mkMod'' nm nr sz ms (crarrayFromList bs) main) <$ pMODULE <*> pMaybe (mkHNm "Main") id pDollNm <*> pInt <* pCOMMA <*> pInt <* pRARROW <*> pExp <* pSEMI+ <*> pList (pMeta <* pSEMI) <*> pList (pExp <* pSEMI)++-- | Parse 'Meta'+pMeta :: CRParser Meta+pMeta+ = Meta_Data <$ pDATA <*> pDifficultNm <* pEQUAL <*> pListSep pCOMMA pDataCon++-- | Parse 'DataCon'+pDataCon :: CRParser DataCon+pDataCon = DataCon_Con <$> pDifficultNm <* pRARROW <*> pInt -- | Parse simple expression 'SExp' pSExp :: CRParser SExp
@@ -11,6 +11,8 @@ import UHC.Light.Compiler.CoreRun import UHC.Light.Compiler.CoreRun.Prim import UHC.Light.Compiler.Ty.Pretty+import UHC.Light.Compiler.Base.CfgPP+import UHC.Light.Compiler.Scanner.Common import qualified Data.Vector as V import UHC.Light.Compiler.Foreign import UHC.Light.Compiler.Foreign.Pretty@@ -24,6 +26,8 @@ ++ -- | Not all AST datatypes are expressed as AG, inherited info therefore implemented manually data InhPP = InhPP@@ -51,6 +55,11 @@ +ppDifficultNm :: HsName -> PP_Doc+ppDifficultNm = pp . show . show -- . ppCoreNm -- ppScanoptsNm corerunScanOpts+++ -- | Print extra/verbose info in cmt ppCmtExtra' :: (PP_Doc -> PP_Doc -> PP_Doc) -> InhPP -> PP_Doc -> (PP_Doc -> PP_Doc) ppCmtExtra' align (InhPP {optsInhPP=opts}) x@@ -129,8 +138,11 @@ +ppBindItems :: [PP_Doc] -> PP_Doc+ppBindItems bs = vlist [ ppSemi b | b <- bs ]+ ppBinds''' :: InhPP -> (Int -> PP_Doc) -> Int -> AssocL Int PP_Doc -> PP_Doc-ppBinds''' inhpp mkr off bs = vlist [ ppSemi $ ppCmtExtra inhpp ((mkr $ off+i)) e | (i,e) <- bs ]+ppBinds''' inhpp mkr off bs = ppBindItems [ ppCmtExtra inhpp ((mkr $ off+i)) e | (i,e) <- bs ] ppBinds'' :: InhPP -> (Int -> RRef) -> Int -> CRArray Bind -> PP_Doc ppBinds'' inhpp mkr off bs = ppBinds''' inhpp (ppRRef inhpp . mkr) off [ (i, ppExp'' inhpp e) | (i,e) <- craAssocs bs ]@@ -179,6 +191,69 @@ (case ("->" >#< _exprIpp) of { _lhsOpp -> ( _lhsOpp) }) }) }) }))+-- DataCon -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Con:+ child conNm : {HsName}+ child tagNr : {Int}+-}+-- cata+sem_DataCon :: DataCon ->+ T_DataCon+sem_DataCon (DataCon_Con _conNm _tagNr) =+ (sem_DataCon_Con _conNm _tagNr)+-- semantic domain+type T_DataCon = ( PP_Doc)+sem_DataCon_Con :: HsName ->+ Int ->+ T_DataCon+sem_DataCon_Con conNm_ tagNr_ =+ (case (ppDifficultNm conNm_ >#< "->" >#< tagNr_) of+ { _lhsOpp ->+ ( _lhsOpp) })+-- DataConL ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ pp : PP_Doc+ ppL : [PP_Doc]+ alternatives:+ alternative Cons:+ child hd : DataCon + child tl : DataConL + alternative Nil:+-}+-- cata+sem_DataConL :: DataConL ->+ T_DataConL+sem_DataConL list =+ (Prelude.foldr sem_DataConL_Cons sem_DataConL_Nil (Prelude.map sem_DataCon list))+-- semantic domain+type T_DataConL = ( PP_Doc,([PP_Doc]))+sem_DataConL_Cons :: T_DataCon ->+ T_DataConL ->+ T_DataConL+sem_DataConL_Cons hd_ tl_ =+ (case (tl_) of+ { ( _tlIpp,_tlIppL) ->+ (case (hd_) of+ { ( _hdIpp) ->+ (case (_hdIpp >-< _tlIpp) of+ { _lhsOpp ->+ (case (_hdIpp : _tlIppL) of+ { _lhsOppL ->+ ( _lhsOpp,_lhsOppL) }) }) }) })+sem_DataConL_Nil :: T_DataConL+sem_DataConL_Nil =+ (case (empty) of+ { _lhsOpp ->+ (case ([]) of+ { _lhsOppL ->+ ( _lhsOpp,_lhsOppL) }) }) -- Exp --------------------------------------------------------- {- visit 0:@@ -359,6 +434,71 @@ (case ("ffi" >#< show (showRunPrim prim_) >|< ppParensCommas (map (ppSExp'' _lhsIinhpp) $ V.toList args_)) of { _lhsOpp -> ( _lhsOpp) }))+-- Meta --------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Data:+ child tyNm : {HsName}+ child dataCons : DataConL +-}+-- cata+sem_Meta :: Meta ->+ T_Meta+sem_Meta (Meta_Data _tyNm _dataCons) =+ (sem_Meta_Data _tyNm (sem_DataConL _dataCons))+-- semantic domain+type T_Meta = ( PP_Doc)+sem_Meta_Data :: HsName ->+ T_DataConL ->+ T_Meta+sem_Meta_Data tyNm_ dataCons_ =+ (case (dataCons_) of+ { ( _dataConsIpp,_dataConsIppL) ->+ (case ("data" >#< ppDifficultNm tyNm_ >#< "=" >#< ppBlockWithStringsH "" "" ", " _dataConsIppL) of+ { _lhsOpp ->+ ( _lhsOpp) }) })+-- MetaL -------------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ pp : PP_Doc+ ppL : [PP_Doc]+ alternatives:+ alternative Cons:+ child hd : Meta + child tl : MetaL + alternative Nil:+-}+-- cata+sem_MetaL :: MetaL ->+ T_MetaL+sem_MetaL list =+ (Prelude.foldr sem_MetaL_Cons sem_MetaL_Nil (Prelude.map sem_Meta list))+-- semantic domain+type T_MetaL = ( PP_Doc,([PP_Doc]))+sem_MetaL_Cons :: T_Meta ->+ T_MetaL ->+ T_MetaL+sem_MetaL_Cons hd_ tl_ =+ (case (tl_) of+ { ( _tlIpp,_tlIppL) ->+ (case (hd_) of+ { ( _hdIpp) ->+ (case (_hdIpp >-< _tlIpp) of+ { _lhsOpp ->+ (case (_hdIpp : _tlIppL) of+ { _lhsOppL ->+ ( _lhsOpp,_lhsOppL) }) }) }) })+sem_MetaL_Nil :: T_MetaL+sem_MetaL_Nil =+ (case (empty) of+ { _lhsOpp ->+ (case ([]) of+ { _lhsOppL ->+ ( _lhsOpp,_lhsOppL) }) }) -- Mod --------------------------------------------------------- {- visit 0:@@ -372,6 +512,7 @@ child moduleNm : {HsName} child moduleNr : {Int} child stkDepth : {Int}+ child metas : MetaL child binds : {CRArray Bind} child body : Exp visit 0:@@ -380,8 +521,8 @@ -- cata sem_Mod :: Mod -> T_Mod-sem_Mod (Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth _binds _body) =- (sem_Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth _binds (sem_Exp _body))+sem_Mod (Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth _metas _binds _body) =+ (sem_Mod_Mod _ref2nm _moduleNm _moduleNr _stkDepth (sem_MetaL _metas) _binds (sem_Exp _body)) -- semantic domain type T_Mod = InhPP -> ( PP_Doc)@@ -397,10 +538,11 @@ HsName -> Int -> Int ->+ T_MetaL -> (CRArray Bind) -> T_Exp -> T_Mod-sem_Mod_Mod ref2nm_ moduleNm_ moduleNr_ stkDepth_ binds_ body_ =+sem_Mod_Mod ref2nm_ moduleNm_ moduleNr_ stkDepth_ metas_ binds_ body_ = (\ _lhsIinhpp -> (case (r2nAdd ref2nm_ _lhsIinhpp) of { _inhpp ->@@ -408,10 +550,13 @@ { _bodyOinhpp -> (case (body_ _bodyOinhpp) of { ( _bodyIpp) ->- (case ((ppSemi $ "module" >#< moduleNm_ >#< ppCommas [moduleNr_, stkDepth_] >#< "->" >#< _bodyIpp)- >-< ppBinds'' _inhpp (RRef_Glb moduleNr_) 0 binds_) of- { _lhsOpp ->- ( _lhsOpp) }) }) }) }))+ (case (metas_) of+ { ( _metasIpp,_metasIppL) ->+ (case ((ppSemi $ "module" >#< ppCoreNm moduleNm_ >#< ppCommas [moduleNr_, stkDepth_] >#< "->" >#< _bodyIpp)+ >-< ppBindItems _metasIppL+ >-< ppBinds'' _inhpp (RRef_Glb moduleNr_) 0 binds_) of+ { _lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) -- Pat --------------------------------------------------------- {- visit 0:
@@ -10,24 +10,69 @@ -- Assumption: name of primitive starts with 3 choosable char + exact name of prim data RunPrim =- -- Int arithmetic- RP_primAddInt+ -- Unsafe stuff+ RP_primUnsafeId++ -- Char+ | RP_primEqChar+ | RP_primCmpChar++ | RP_primCharToInt+ | RP_primIntToChar++ -- Int+ | RP_primAddInt | RP_primSubInt | RP_primMulInt | RP_primDivInt+ | RP_primQuotInt+ | RP_primRemInt+ | RP_primModInt+ | RP_primNegInt++ | RP_primDivModInt+ | RP_primQuotRemInt++ | RP_primMinInt+ | RP_primMaxInt+ | RP_primEqInt- | RP_primLeInt | RP_primNeInt + | RP_primCmpInt+ | RP_primLeInt+ | RP_primLtInt+ | RP_primGeInt+ | RP_primGtInt++ | RP_primIntToInteger+ | RP_primIntegerToInt++ -- Integer+ | RP_primAddInteger+ | RP_primSubInteger+ | RP_primMulInteger+ | RP_primDivInteger+ | RP_primQuotInteger+ | RP_primRemInteger+ | RP_primModInteger+ | RP_primNegInteger++ | RP_primDivModInteger+ | RP_primQuotRemInteger++ | RP_primEqInteger+ | RP_primNeInteger++ | RP_primCmpInteger+ | RP_primLeInteger+ | RP_primLtInteger+ | RP_primGeInteger+ | RP_primGtInteger+ -- UHC.IOBase: Exception handling | RP_primCatchException - -- UHC.MutVar- | RP_primNewMutVar- | RP_primReadMutVar- | RP_primWriteMutVar- | RP_primSameMutVar- -- UHC.Base | RP_primPackedStringToInteger | RP_primPackedStringNull -- :: PackedString -> Bool@@ -35,21 +80,12 @@ | RP_primPackedStringTail -- :: PackedString -> PackedString | RP_primShowInteger - -- UHC.Base: Bounded- | RP_primMaxInt- | RP_primMinInt- -- UHC.Prims: conversion | RP_primIntegerToInt32- | RP_primIntToInteger- | RP_primIntegerToInt -- System.IO --- * The IO monad - -- IO -- instance MonadFix- | RP_fixIO -- :: (a -> IO a) -> IO a- --- * Files and handles -- FilePath -- :: String@@ -69,7 +105,7 @@ --- ** Opening files - | RP_withFile+ -- | RP_withFile | RP_openFile -- :: FilePath -> IOMode -> IO Handle -- IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), @@ -81,9 +117,9 @@ -- | These functions are also exported by the "Prelude". - | RP_readFile -- :: FilePath -> IO String- | RP_writeFile -- :: FilePath -> String -> IO ()- | RP_appendFile -- :: FilePath -> String -> IO ()+ -- | RP_readFile -- :: FilePath -> IO String+ -- | RP_writeFile -- :: FilePath -> String -> IO ()+ -- | RP_appendFile -- :: FilePath -> String -> IO () --- ** File locking @@ -112,8 +148,6 @@ --- ** Repositioning handles - | RP_hGetPosn -- :: Handle -> IO HandlePosn- | RP_hSetPosn -- :: HandlePosn -> IO () -- HandlePosn, -- abstract, instance of: Eq, Show. | RP_hSeek -- :: Handle -> SeekMode -> Integer -> IO ()@@ -149,7 +183,6 @@ --- ** Text input | RP_hWaitForInput -- :: Handle -> Int -> IO Bool- | RP_hReady -- :: Handle -> IO Bool | RP_hGetChar -- :: Handle -> IO Char | RP_hGetLine -- :: Handle -> IO [Char] | RP_hLookAhead -- :: Handle -> IO Char@@ -158,14 +191,11 @@ | RP_hPutChar -- :: Handle -> Char -> IO () | RP_hPutStr -- :: Handle -> [Char] -> IO ()- | RP_hPutStrLn -- :: Handle -> [Char] -> IO ()- | RP_hPrint -- :: Show a => Handle -> a -> IO () --- ** Special cases for standard input and output -- | These functions are also exported by the "Prelude". - | RP_interact -- :: (String -> String) -> IO () -- putChar -- :: Char -> IO () -- putStr -- :: String -> IO () -- putStrLn -- :: String -> IO ()@@ -173,11 +203,8 @@ -- getChar -- :: IO Char -- getLine -- :: IO String -- getContents -- :: IO String- | RP_readIO -- :: Read a => String -> IO a- | RP_readLn -- :: Read a => IO a --- * Binary input and output- | RP_withBinaryFile | RP_openBinaryFile -- :: FilePath -> IOMode -> IO Handle | RP_hSetBinaryMode -- :: Handle -> Bool -> IO () | RP_hPutBuf -- :: Handle -> Ptr a -> Int -> IO ()@@ -197,12 +224,12 @@ deriving (Show, Eq, Ord, Enum, Bounded) -{-# LINE 214 "src/ehc/CoreRun/Prim.chs" #-}+{-# LINE 241 "src/ehc/CoreRun/Prim.chs" #-} -- | Show prim without initial 3 chars showRunPrim :: RunPrim -> String showRunPrim p = drop 3 $ show p -{-# LINE 220 "src/ehc/CoreRun/Prim.chs" #-}+{-# LINE 247 "src/ehc/CoreRun/Prim.chs" #-} allRunPrimMp :: Map.Map String RunPrim allRunPrimMp = Map.fromList [ (showRunPrim p, p) | p <- [ minBound .. maxBound ] ]
@@ -57,7 +57,7 @@ rsemInitial :: m (r,s,a) -- | Setup whatever needs to be setup- rsemSetup :: EHCOpts -> [Mod] -> Mod -> RunT' r s v m ()+ rsemSetup :: EHCOpts -> [Mod] -> Mod -> RunT' r s v m r -- | Setup tracing rsemSetupTracing :: EHCOpts -> RunT' r s v m ()@@ -143,12 +143,13 @@ -- r = error "runCoreRun.Reader" (e, _, _) <- runRWST (runErrorT $ do- rsemSetup opts modImpL mod- (m >>= rsemPop >>= rsemDeref >>= rsemPop))+ r' <- rsemSetup opts modImpL mod+ local (const r') $+ (m >>= rsemPop >>= rsemDeref >>= rsemPop)) r s return e -{-# LINE 193 "src/ehc/CoreRun/Run.chs" #-}+{-# LINE 194 "src/ehc/CoreRun/Run.chs" #-} modifyIORefM :: IORef a -> (a -> IO a) -> IO () modifyIORefM r m = readIORef r >>= m >>= writeIORef r {-# INLINE modifyIORefM #-}
@@ -1,5 +1,5 @@ {-# LANGUAGE MagicHash #-}-{-# LANGUAGE DefaultSignatures, DeriveGeneric, TypeOperators #-}+{-# LANGUAGE DefaultSignatures, DeriveGeneric, TypeOperators, KindSignatures #-} -- {-# OPTIONS_GHC -O3 #-} module UHC.Light.Compiler.CoreRun.Run.Val@@ -16,6 +16,7 @@ , RValCxt (..), emptyRValCxt , rvalTrEnterLam , mustReturn, needNotReturn, rvalRetEvl, rvalPrimargEvl+, rcxtUpdDatatypes , vecReverseForM_ , mvecAllocInit, mvecAlloc, mvecFillFromV, mvecReverseFillFromV, mvecFillFromMV, mvecAllocFillFromV, mvecAppend, mvecToList , mvecReverseForM_@@ -36,6 +37,7 @@ import UHC.Light.Compiler.CoreRun.Run import UHC.Light.Compiler.CoreRun.Pretty import UHC.Util.Pretty as PP+import UHC.Util.Utils import Control.Monad.Primitive import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV@@ -53,8 +55,10 @@ import GHC.Exts (Addr#) import GHC.Generics import Control.Applicative+import qualified Data.Map as Map+import Data.Maybe -{-# LINE 68 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 73 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Representation of run value data RVal =@@ -193,7 +197,7 @@ instance PP RVal where pp rval = unsafePerformIO (ppRVal rval) -{-# LINE 208 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 213 "src/ehc/CoreRun/Run/Val.chs" #-} mkTuple :: (RunSem RValCxt RValEnv RVal m a) => [RVal] -> RValT m a mkTuple vs = liftIO (mvecAllocFillFromV $ crarrayFromList vs) >>= rsemNode 0 >>= rsemPush {-# INLINE mkTuple #-}@@ -202,38 +206,47 @@ mkUnit = mkTuple [] {-# INLINE mkUnit #-} -{-# LINE 218 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 223 "src/ehc/CoreRun/Run/Val.chs" #-} -- Vector of RVal type RValV = CRArray RVal -- Mutable vector of RVal type RValMV = CRMArray RVal -{-# LINE 231 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 236 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Marshalling from/to Haskell values class HSMarshall hs where -- | Marshall to Haskell value, also parameterized by evaluator hsMarshall :: (RunSem RValCxt RValEnv RVal m a) => (RVal -> RValT m a) -> RVal -> RValT m hs+ default hsMarshall :: (Generic hs, GHSMarshall (Rep hs), RunSem RValCxt RValEnv RVal m a) => (RVal -> RValT m a) -> RVal -> RValT m hs+ hsMarshall evl v = to <$> ghsMarshall evl v+ {-# INLINE hsMarshall #-} -- | Unmarshall from Haskell value hsUnmarshall :: (RunSem RValCxt RValEnv RVal m a) => hs -> RValT m a+ default hsUnmarshall :: (Generic hs, GHSMarshall (Rep hs), RunSem RValCxt RValEnv RVal m a) => hs -> RValT m a+ hsUnmarshall = ghsUnmarshall . from+ {-# INLINE hsUnmarshall #-} -{-# LINE 241 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 252 "src/ehc/CoreRun/Run/Val.chs" #-} instance HSMarshall Int where hsMarshall _ (RVal_Int v) = return v+ hsMarshall _ v = err $ "CoreRun.Run.Val.HSMarshall Int:" >#< v hsUnmarshall v = rsemPush $ RVal_Int v {-# INLINE hsUnmarshall #-} instance HSMarshall Integer where hsMarshall _ (RVal_Integer v) = return v+ hsMarshall _ v = err $ "CoreRun.Run.Val.HSMarshall Integer:" >#< v hsUnmarshall v = rsemPush $ RVal_Integer v {-# INLINE hsUnmarshall #-} -instance HSMarshall Bool where+instance HSMarshall Bool {- where hsMarshall _ (RVal_NodeMV t _) = return $ t == tagBoolTrue hsMarshall _ v = err $ "CoreRun.Run.Val.HSMarshall Bool:" >#< v hsUnmarshall b = liftIO (mvecAllocFillFromV emptyCRArray) >>= rsemNode (if b then tagBoolTrue else tagBoolFalse) >>= rsemPush {-# INLINE hsUnmarshall #-}+ -} instance HSMarshall Char where hsMarshall _ (RVal_Char v) = return v@@ -247,6 +260,13 @@ hsUnmarshall (Ptr v) = rsemPush $ RHsV_Addr v {-# INLINE hsUnmarshall #-} +instance HSMarshall Handle where+ hsMarshall _ (RHsV_Handle v) = return v+ hsMarshall _ v = err $ "CoreRun.Run.Val.HSMarshall Handle:" >#< v+ hsUnmarshall v = rsemPush $ RHsV_Handle v+ {-# INLINE hsUnmarshall #-}++{- instance HSMarshall [RVal] where hsMarshall evl (RVal_NodeMV t as) | t == tagListCons = liftIO (MV.read as 1) >>= evl >>= rsemPop >>= hsMarshall evl >>= \tl -> liftIO (MV.read as 0) >>= \hd -> return (hd : tl)@@ -262,10 +282,13 @@ hsUnmarshall v = forM v (\e -> hsUnmarshall e >>= rsemPop) >>= hsUnmarshall {-# INLINE hsUnmarshall #-}+-} -{-# LINE 287 "src/ehc/CoreRun/Run/Val.chs" #-}--- Generic variant of marshalling to cater for arbitrary datatype; 20141227 under construction+{-+-}+instance HSMarshall x => HSMarshall [x] +{-# LINE 313 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Generic marshalling from/to Haskell values class GHSMarshall hs where -- | Marshall to Haskell value, also parameterized by evaluator@@ -274,34 +297,175 @@ -- | Unmarshall from Haskell value ghsUnmarshall :: (RunSem RValCxt RValEnv RVal m a) => hs x -> RValT m a - -- | The tag as used for dispatching in generic code, which is different from the one used at runtime (hence a mapping between these is used elsewhere).- -- The returned value should be the same as computed during (un)marshall (bit of code duplication thus).- ghsMarshallTag :: hs x -> Int+instance (Datatype d, MarshallSum hs) => GHSMarshall (D1 d hs) where+ --+ ghsMarshall evl v = do+ dtmp <- asks rcxtDatatypeMp+ let nm = datatypeName (undefined :: t d hs p)+ case Map.lookup nm dtmp of+ Nothing -> err $ "Marshall to HS lacks datatype info, datatype=" ++ nm+ Just (RValDataconstrInfo {rdciMods=mods@(_:_:_)}) ->+ err $ "Marshall to HS datatype info in multiple modules, datatype=" ++ nm ++ ", mods=" ++ show mods+ Just (RValDataconstrInfo {rdciTg2Nm=tg2con}) -> do+ r <- sumExtrTagged evl tg2con v+ maybe (err $ "sumExtrTagged") (return . M1) r+ --+ ghsUnmarshall (M1 x) = do+ dtmp <- asks rcxtDatatypeMp+ let nm = datatypeName (undefined :: t d hs p)+ case Map.lookup nm dtmp of+ Nothing -> err $ "Marshall from HS lacks datatype info, datatype=" ++ nm+ Just (RValDataconstrInfo {rdciMods=mods@(_:_:_)}) ->+ err $ "Marshall from HS datatype info in multiple modules, datatype=" ++ nm ++ ", mods=" ++ show mods+ Just (RValDataconstrInfo {rdciNm2Tg=con2tg}) ->+ sumFillTagged con2tg x -instance GHSMarshall U1 where- ghsMarshall _ _ = return U1- ghsUnmarshall U1 = mkUnit- ghsMarshallTag U1 = 0+{-# LINE 346 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Marshall util: extract values from sum+class MarshallSum hs where+ --+ sumFillTagged+ :: (RunSem RValCxt RValEnv RVal m a)+ => RValDataconstrInfoNm2Tg -- ^ mapping from constructor name to tag+ -> hs x -- ^ Haskell value+ -> RValT m a+ --+ sumExtrTagged+ :: (RunSem RValCxt RValEnv RVal m a)+ => (RVal -> RValT m a) -- ^ force evaluation for nested fields+ -> RValDataconstrInfoTg2Nm -- ^ mapping from constructor name to tag+ -> RVal -- ^ the 'RVal_NodeMV' holding tag and fields+ -> RValT m (Maybe (hs x)) -instance (GHSMarshall a, GHSMarshall b) => GHSMarshall (a :+: b) where- -- TBD: dispatch on tag- ghsMarshall evl v@(RVal_NodeMV {rvalTag=t})- | even t = L1 <$> ghsMarshall evl v'- | otherwise = R1 <$> ghsMarshall evl v'- where v' = v {rvalTag = t `shiftR` 1}- -- TBD: set tag- ghsUnmarshall (L1 x) = ghsUnmarshall x >>= (rsemTopUpd $ \v -> v {rvalTag = (rvalTag v `shiftL` 1) })- ghsUnmarshall (R1 x) = ghsUnmarshall x >>= (rsemTopUpd $ \v -> v {rvalTag = (rvalTag v `shiftL` 1) + 1})+instance ( MarshallProduct hs, ProductSize hs, Constructor c ) => MarshallSum (C1 c hs) where --- ghsMarshallTag (L1 x) = ghsMarshallTag x `shiftL` 1- ghsMarshallTag (R1 x) = (ghsMarshallTag x `shiftL` 1) + 1+ sumFillTagged con2tg (M1 x) = do+ v <- liftIO $ MV.unsafeNew len+ productFillMVec v 0 len x+ let nm = conName (undefined :: t c hs p)+ mt = Map.lookup nm con2tg+ when (isNothing mt) $ err $ "Marshall from HS lacks constructor info, constructor=" ++ nm+ rsemNode (fromJust mt) v >>= rsemPush+ where+ len = (unTagged2 :: Tagged2 hs Int -> Int) productSize+ tag = Map.findWithDefault 0 (conName (undefined :: t c hs p)) con2tg+ {-# INLINE sumFillTagged #-}+ --+ sumExtrTagged evl tg2con v@(RVal_NodeMV {rvalTag=t, rvalNdMVals=mv})+ | t >= V.length tg2con = err $ "Marshall to HS illegal tag value, con=" ++ nmc ++ ", tag=" ++ show t+ | nmc == nmt = (Just . M1) <$> productExtrMVec evl mv 0 len+ | otherwise = return $ Nothing -- Left $ "Marshall to HS lacks constructor info, con=" ++ nmc ++ "/" ++ nmt ++ ", tag=" ++ show t+ where+ len = (unTagged2 :: Tagged2 hs Int -> Int) productSize+ nmc = conName (undefined :: t c hs p)+ nmt = tg2con V.! t+ {-# INLINE sumExtrTagged #-} +instance ( MarshallSum a, MarshallSum b ) => MarshallSum (a :+: b) where+ --+ sumFillTagged con2tg (L1 x) = sumFillTagged con2tg x+ sumFillTagged con2tg (R1 x) = sumFillTagged con2tg x+ {-# INLINE sumFillTagged #-}+ --+ -- sumExtrTagged evl tg2con v = (fmap L1 <$> sumExtrTagged evl tg2con v) <|> (fmap R1 <$> sumExtrTagged evl tg2con v)+ sumExtrTagged evl tg2con v = do+ l <- sumExtrTagged evl tg2con v+ case l of+ Just l' -> return $ fmap L1 l+ _ -> fmap R1 <$> sumExtrTagged evl tg2con v+ {-# INLINE sumExtrTagged #-} -{-# LINE 342 "src/ehc/CoreRun/Run/Val.chs" #-}-deriving instance Typeable IOMode-deriving instance Data IOMode -{-# LINE 351 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 403 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Marshall util: extract values from product (inspired by Aeson library)+class MarshallProduct hs where+ -- | Fill vector from product+ productFillMVec+ :: (RunSem RValCxt RValEnv RVal m a)+ => CRMArray RVal -- ^ fields vector+ -> Int -- ^ index+ -> Int -- ^ length+ -> hs x -- ^ Haskell value+ -> RValT m ()+ -- | Extract product from vector+ productExtrMVec+ :: (RunSem RValCxt RValEnv RVal m a)+ => (RVal -> RValT m a) -- ^ force evaluation for nested fields+ -> CRMArray RVal -- ^ fields vector+ -> Int -- ^ index+ -> Int -- ^ length+ -> RValT m (hs x)++instance (MarshallProduct a, MarshallProduct b) => MarshallProduct (a :*: b) where+ productFillMVec mv ix len (a :*: b) = do+ productFillMVec mv ix lenL a+ productFillMVec mv ixR lenR b+ where+ lenL = len `unsafeShiftR` 1+ ixR = ix + lenL+ lenR = len - lenL+ {-# INLINE productFillMVec #-}++ productExtrMVec evl mv ix len =+ (:*:) <$> productExtrMVec evl mv ix lenL+ <*> productExtrMVec evl mv ixR lenR+ where+ lenL = len `unsafeShiftR` 1+ ixR = ix + lenL+ lenR = len - lenL+ {-# INLINE productExtrMVec #-}++instance MarshallProduct hs => MarshallProduct (S1 s hs) where+ productFillMVec mv ix l (M1 x) = productFillMVec mv ix l x+ {-# INLINE productFillMVec #-}++ productExtrMVec evl mv ix l = M1 <$> productExtrMVec evl mv ix l+ {-# INLINE productExtrMVec #-}++instance HSMarshall x => MarshallProduct (K1 i x) where+ productFillMVec mv ix _ (K1 x) = do+ x' <- rsemPop =<< hsUnmarshall x+ liftIO $ MV.unsafeWrite mv ix x'+ {-# INLINE productFillMVec #-}++ productExtrMVec evl mv ix _ = do+ v <- (liftIO $ MV.read mv ix) >>= evl >>= rsemPop+ K1 <$> hsMarshall evl v+ {-# INLINE productExtrMVec #-}++instance MarshallProduct U1 where+ productFillMVec mv ix _ U1 = return ()+ {-# INLINE productFillMVec #-}++ productExtrMVec evl mv ix _ = return U1+ {-# INLINE productExtrMVec #-}++{-# LINE 468 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Phantom type tagging (from Aeson lib)+newtype Tagged s b = Tagged {unTagged :: b}++-- | Phantom type tagging for higher kinds (from Aeson lib)+newtype Tagged2 (s :: * -> *) b = Tagged2 {unTagged2 :: b}++{-# LINE 476 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Size (nr of fields) of data type constructors (from Aeson lib)+class ProductSize f where+ productSize :: Tagged2 f Int++instance (ProductSize a, ProductSize b) => ProductSize (a :*: b) where+ productSize = Tagged2 $ unTagged2 (productSize :: Tagged2 a Int) ++ unTagged2 (productSize :: Tagged2 b Int)+ {-# INLINE productSize #-}++instance ProductSize (S1 s a) where+ productSize = Tagged2 1+ {-# INLINE productSize #-}++instance ProductSize U1 where+ productSize = Tagged2 0+ {-# INLINE productSize #-}++{-# LINE 514 "src/ehc/CoreRun/Run/Val.chs" #-} -- | HpPtr is index into a heap type HpPtr = Int @@ -325,7 +489,7 @@ ml <- newIORef 1.5 return $ Heap vs 0 fr ml -{-# LINE 376 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 539 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Garbage collect heap (TBD) heapGcM :: (RunSem RValCxt RValEnv RVal m x) => RVal -> RValT m RVal -- heapGcM = err $ "CoreRun.Run.Val.heapGcM: GC not yet implemented"@@ -333,7 +497,10 @@ -- rsemSetTrace True -- rsemTr' True $ "GC starts, curV=" >#< curV -- rsemTr $ "GC starts"- env@(RValEnv {renvHeap=hp@(Heap {hpVals=vsOld, hpSemispaceMultiplier=mlRef, hpFirst=offOld, hpFree=hpFrRef}), renvGcRootStack=rootStkRef, renvTopFrame=topFrRef, renvStack=stkRef, renvGlobals=globals}) <- get+ env@(RValEnv {renvHeap=hp@(Heap {hpVals=vsOld, hpSemispaceMultiplier=mlRef, hpFirst=offOld, hpFree=hpFrRef})+ , renvGcRootStack=rootStkRef, renvTopFrame=topFrRef, renvStack=stkRef+ , renvGlobalsMV=globals+ }) <- get env' <- liftIO $ do ml <- readIORef mlRef let szOld = MV.length vsOld@@ -400,7 +567,7 @@ modifyIORefM stkRef $ mapM copyp -- initial copy: globals- globals' <- V.forM globals copyp+ mvecLoop 0 (MV.length globals) (\v i -> MV.read v i >>= copyp >>= MV.write v i) globals -- initial copy: the RVal to be put on the heap copyv curV@@ -412,7 +579,7 @@ readIORef greyref >>= follow offNew >>= \p -> writeIORef hpFrRef (p - offNew) -- final:- return $ env {renvGlobals = globals', renvHeap = hp {hpVals=vsNew, hpFirst=offNew}}+ return $ env { renvHeap = hp {hpVals=vsNew, hpFirst=offNew}} put env' -- rsemTr $ "GC done"@@ -420,7 +587,7 @@ -- rsemSetTrace False return curV -{-# LINE 472 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 638 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Allocate on the heap heapAllocM :: (RunSem RValCxt RValEnv RVal m x) => RVal -> RValT m HpPtr heapAllocM v = do@@ -487,22 +654,75 @@ heapUpdM' hp p f {-# INLINE heapUpdM #-} -{-# LINE 544 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 710 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Mapping between constr name and tag+type RValDataconstrInfoNm2Tg = Map.Map String Int -- from constructor name to tag+type RValDataconstrInfoTg2Nm = CRArray String -- from tag to constructor Name++-- | Mapping between constr name and tag+data RValDataconstrInfo+ = RValDataconstrInfo+ { rdciNm2Tg :: RValDataconstrInfoNm2Tg -- from constructor name to tag+ , rdciTg2Nm :: RValDataconstrInfoTg2Nm -- from tag to constructor Name+ , rdciMods :: [HsName] -- modules (if any in which possibly multiple defs occur, >1 being an error when actually used)+ }+ deriving Show++emptyRValDataconstrInfo = RValDataconstrInfo Map.empty emptyCRArray []++-- | Mapping from type name to constr info+type RValDatatypeMp+ = Map.Map+ String -- type name+ RValDataconstrInfo -- data constr info++-- | Union+rvalDatatypeMpUnion :: RValDatatypeMp -> RValDatatypeMp -> RValDatatypeMp+rvalDatatypeMpUnion = Map.unionWith (\l r -> l {rdciMods = rdciMods l ++ rdciMods r})++-- | Unions+rvalDatatypeMpUnions1 :: [RValDatatypeMp] -> RValDatatypeMp+rvalDatatypeMpUnions1 = foldr1 rvalDatatypeMpUnion++-- | Extract datatype mapping from module+rvalDatatypeMpFromMod :: Mod -> RValDatatypeMp+rvalDatatypeMpFromMod (Mod_Mod {metas_Mod_Mod=metas})+ = Map.fromList+ [ ( show tn'+ , emptyRValDataconstrInfo+ { rdciNm2Tg = Map.fromList cts+ , rdciTg2Nm = crarrayFromList $ map fst $ sortOn snd cts+ , rdciMods = mods+ })+ | Meta_Data {tyNm_Meta_Data=tn, dataCons_Meta_Data=constrs} <- metas+ , let cts = assocLMapKey show $ candtg constrs+ (tn',mods) = splitTN tn+ ]+ where candtg cs = [ (cn,t) | DataCon_Con {conNm_DataCon_Con=cn, tagNr_DataCon_Con=t} <- cs ]+ splitTN n = (hsnQualified n, maybe [] (:[]) $ hsnQualifier n)++{-# LINE 766 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Environment: context/reader data RValCxt = RValCxt { rcxtInRet :: !Bool -- ^ in returning context, True by default , rcxtCallCxt :: [Maybe HsName] -- ^ calling context stack, for debugging only+ , rcxtDatatypeMp :: RValDatatypeMp -- ^ dataype info for ffi }+ deriving Show emptyRValCxt :: RValCxt-emptyRValCxt = RValCxt True []+emptyRValCxt = RValCxt True [] m+ where m = rvalDatatypeMpUnions1+ [ Map.singleton n (emptyRValDataconstrInfo {rdciNm2Tg = Map.singleton n 0, rdciTg2Nm = crarrayFromList [n]})+ | tuparity <- [2..15], let n = "(" ++ replicate (tuparity-1) ',' ++ ")"+ ] -{-# LINE 556 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 784 "src/ehc/CoreRun/Run/Val.chs" #-} rvalTrEnterLam :: RunSem RValCxt RValEnv RVal m x => Maybe HsName -> RValT m a -> RValT m a rvalTrEnterLam s = local (\r -> r {rcxtCallCxt = s : rcxtCallCxt r}) -{-# LINE 561 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 789 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Set return context to True mustReturn :: RunSem RValCxt RValEnv RVal m x => RValT m a -> RValT m a mustReturn = local (\r -> r {rcxtInRet = True})@@ -523,7 +743,16 @@ rvalPrimargEvl x = rvalRetEvl x >>= rsemPop >>= rsemDeref {-# INLINE rvalPrimargEvl #-} -{-# LINE 587 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 811 "src/ehc/CoreRun/Run/Val.chs" #-}+-- | Update with datatype info+rcxtUpdDatatypes :: RunSem RValCxt RValEnv RVal m x => [Mod] -> RValT m RValCxt+rcxtUpdDatatypes mods = do+ cx@(RValCxt {rcxtDatatypeMp=m}) <- ask+ let cx' = cx {rcxtDatatypeMp = rvalDatatypeMpUnions1 $ m : map rvalDatatypeMpFromMod mods}+ -- liftIO $ print cx'+ return cx'++{-# LINE 825 "src/ehc/CoreRun/Run/Val.chs" #-} {- -- | Loop over a vector, starting at lower bound 'l', ending before 'h' vecLoop :: Monad m => Int -> Int -> (V.Vector a -> Int -> m b) -> V.Vector a -> m ()@@ -541,13 +770,13 @@ {-# INLINE vecLoopReverse #-} -{-# LINE 606 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 844 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Right to left forM_ vecReverseForM_ :: Monad m => V.Vector a -> (a -> m x) -> m () vecReverseForM_ v m = vecLoopReverse 0 (V.length v) (\_ i -> m (v V.! i)) v {-# INLINE vecReverseForM_ #-} -{-# LINE 617 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 855 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Allocate a mutable vector of given size mvecAllocWith :: PrimMonad m => Int -> a -> m (MV.MVector (PrimState m) a) mvecAllocWith = MV.replicate@@ -653,13 +882,13 @@ l2 = MV.length v2 l12 = l1 + l2 -{-# LINE 724 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 962 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Right to left forM_ mvecReverseForM_ :: PrimMonad m => MV.MVector (PrimState m) a -> (a -> m x) -> m () mvecReverseForM_ v m = mvecLoopReverse 0 (MV.length v) (\v i -> MV.read v i >>= m) v >> return () {-# INLINE mvecReverseForM_ #-} -{-# LINE 735 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 973 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Dereference a possibly RVal_Ptr ptr2valM :: (RunSem RValCxt RValEnv RVal m x) => RVal -> RValT m RVal ptr2valM v = case v of@@ -676,7 +905,7 @@ env <- get case r of RRef_Glb m e -> do- modFrame <- heapGetM (renvGlobals env V.! m)+ modFrame <- heapGetM =<< liftIO (MV.read (renvGlobalsMV env) m) liftIO $ MV.read (rvalFrVals modFrame) e {- RRef_Loc l o -> do@@ -720,7 +949,7 @@ _ -> err $ "CoreRun.Run.Val.ref2valM.r:" >#< r {-# INLINE ref2valM #-} -{-# LINE 802 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1040 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Frame holding locals indexed by RRef_Loc type RValFrame = HpPtr -- points to heap to a RVal_Frame @@ -730,7 +959,7 @@ -- | Environment: state data RValEnv = RValEnv- { renvGlobals :: !(CRArray RValFrame) -- ^ per module frame of globals+ { renvGlobalsMV :: !(CRMArray RValFrame) -- ^ per module frame of globals , renvStack :: !(IORef RValStack) -- ^ stack of frames, except for the top , renvTopFrame :: !(IORef RValFrame) -- ^ current frame, the actual top of the stack -- , renvFrSP :: !(IORef Int) -- ^ top of expr stack embedded in higher end of top frame@@ -747,9 +976,10 @@ hp <- newHeap hpSz -- sp <- newIORef 0 rtst <- newIORef []- return $ RValEnv V.empty st tp hp False False rtst+ gl <- MV.new 0+ return $ RValEnv gl st tp hp False False rtst -{-# LINE 832 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1071 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Get the top most frame from the stack, 'nullPtr' if absent renvTopFrameM :: (RunSem RValCxt RValEnv RVal m x) => RValT m HpPtr renvTopFrameM = do@@ -757,7 +987,7 @@ liftIO $ readIORef tf {-# INLINE renvTopFrameM #-} -{-# LINE 841 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1080 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Get all non empty stack frames, still split up in (possibly null) top frame and rest of stack renvAllFrameM' :: (RunSem RValCxt RValEnv RVal m x) => RValT m (Maybe HpPtr,[HpPtr]) renvAllFrameM' = do@@ -772,7 +1002,7 @@ (mbtop,st) <- renvAllFrameM' return $ maybe [] (:[]) mbtop ++ st -{-# LINE 857 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1096 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Dump environment dumpPpEnvM :: (RunSem RValCxt RValEnv RVal m x) => Bool -> RValT m PP_Doc dumpPpEnvM extensive = do@@ -788,7 +1018,7 @@ header2 = ppCurly $ "Heap =" >|< hpfr >|< "/" >|< MV.length (hpVals hp) >|< ", CallCxt=" >|< ppBracketsCommas callcxt >|< ", Stack=" >|< ppBracketsCommas stkfrspp footer1 = dash hpPP <- dumpHeap hp hpfr- glPP <- dumpGlobals hp (renvGlobals env)+ glPP <- dumpGlobalsMV hp (renvGlobalsMV env) frPPs <- forM stkfrs $ dumpFrame hp if extensive then return $ header1 >-< header2 >-< hpPP >-< glPP >-< "====== Frames ======" >-< (indent 2 $ vlist frPPs) >-< footer1@@ -803,9 +1033,8 @@ sp <- liftIO $ readIORef spref -- pps <- ppa 0 hp sp vs (liftIO $ ppRValWithHp hp fr) >>= \frpp -> return $ "Frame ptr=" >|< fp >|< " sp=" >|< sp >-< (indent 2 $ frpp) -- >-< (indent 2 $ vlist pps))- dumpGlobals hp glbls = do- pps <- forM [0 .. V.length glbls - 1] $ \i -> do- dumpFrame hp (glbls V.! i)+ dumpGlobalsMV hp glbls = do+ pps <- liftIO (mvecToList glbls) >>= \l -> forM l $ dumpFrame hp return $ "====== Globals ======" >-< indent 2 (vlist pps) dumpHeap hp@(Heap {hpFirst=off}) hpfr = do pps <- ppa off hp hpfr (hpVals hp)@@ -813,18 +1042,18 @@ ppb hp k v = (liftIO $ ppRValWithHp hp v) >>= \vpp -> return $ k >|< ":" >#< vpp ppa off hp sz vs = forM [0 .. sz - 1] $ \i -> liftIO (MV.read vs i) >>= ppb hp (i + off) -{-# LINE 899 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1137 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Dump environment dumpEnvM :: (RunSem RValCxt RValEnv RVal m x) => Bool -> RValT m () dumpEnvM extensive = dumpPpEnvM extensive >>= \p -> liftIO $ putPPLn p >> hFlush stdout -{-# LINE 909 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1147 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Update top frame updTopFrameM :: (RunSem RValCxt RValEnv RVal m x) => (RVal -> RValT m RVal) -> RValT m () updTopFrameM f = renvTopFrameM >>= flip heapUpdM f {-# INLINE updTopFrameM #-} -{-# LINE 921 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1159 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Push on the stack embedded in the top frame renvFrStkPush' :: RunSem RValCxt RValEnv RVal m x => (Int -> RValMV -> v -> IO Int) -> v -> RValT m () renvFrStkPush' pushvOn v = do@@ -860,7 +1089,7 @@ renvFrStkReversePushV = renvFrStkPush' (\sp frvs vs -> mvecReverseFillFromV sp frvs vs >> return (sp + V.length vs)) {-# INLINE renvFrStkReversePushV #-} -{-# LINE 958 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1196 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Pop from the stack embedded in the top frame renvFrStkPop' :: RunSem RValCxt RValEnv RVal m x => (RValMV -> Int -> IO v) -> Int -> RValT m v renvFrStkPop' popvFrom sz = do@@ -904,7 +1133,7 @@ renvFrStkReversePopMV sz = (liftIO $ mvecAlloc sz) >>= \vs -> renvFrStkReversePopInMV 0 sz vs >> return vs {-# INLINE renvFrStkReversePopMV #-} -{-# LINE 1007 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1245 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Trace rsemTr' :: (PP msg, RunSem RValCxt RValEnv RVal m x) => Bool -> msg -> RValT m () rsemTr' dumpExtensive msg = do@@ -920,7 +1149,7 @@ rsemTr = rsemTr' False {- INLINE rsemTr #-} -{-# LINE 1028 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 1266 "src/ehc/CoreRun/Run/Val.chs" #-} -- | RunT' variant for Val type RValT m a = RunT' RValCxt RValEnv RVal m a -- type RValT m a = RunT' () () RValEnv m a
@@ -1,4 +1,4 @@--- {-# LANGUAGE MagicHash #-}+{-# LANGUAGE DeriveGeneric #-} -- {-# OPTIONS_GHC -O2 #-} module UHC.Light.Compiler.CoreRun.Run.Val.Prim@@ -12,8 +12,9 @@ import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV import qualified Data.ByteString.Char8 as BSC8+import GHC.Generics -{-# LINE 35 "src/ehc/CoreRun/Run/Val/Prim.chs" #-}+{-# LINE 38 "src/ehc/CoreRun/Run/Val/Prim.chs" #-} -- | Apply primitive to arguments rvalPrim :: (RunSem RValCxt RValEnv RVal m a) => RunPrim -> RValV -> RValT m a rvalPrim pr as = do@@ -21,26 +22,69 @@ -- let as' = V.toList as -- rsemTr $ "Prim:" >#< show pr >|< ppParensCommas as' case (pr, as') of- -- Int arithmetic+ -- Unsafe stuff+ (RP_primUnsafeId, [x]) -> rsemPush x++ -- Char+ (RP_primEqChar, [RVal_Char i1, RVal_Char i2]) -> hsUnmarshall $ i1 == i2+ (RP_primCmpChar, [RVal_Char i1, RVal_Char i2]) -> hsUnmarshall $ i1 `compare` i2++ (RP_primCharToInt , [RVal_Char x]) -> rsemPush $ RVal_Int $ fromEnum x+ (RP_primIntToChar , [RVal_Int x]) -> rsemPush $ RVal_Char $ toEnum x++ -- Int (RP_primAddInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 + i2 (RP_primSubInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 - i2 (RP_primMulInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 * i2 (RP_primDivInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 `div` i2+ (RP_primQuotInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 `quot` i2+ (RP_primRemInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 `rem` i2+ (RP_primModInt, [RVal_Int i1, RVal_Int i2]) -> rsemPush $ RVal_Int $ i1 `mod` i2+ (RP_primNegInt, [RVal_Int i1]) -> rsemPush $ RVal_Int (-i1)++ (RP_primDivModInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 `divMod` i2+ (RP_primQuotRemInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 `quotRem` i2++ (RP_primMinInt, []) -> rsemPush $ RVal_Int minBound+ (RP_primMaxInt, []) -> rsemPush $ RVal_Int maxBound+ (RP_primEqInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 == i2- (RP_primLeInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 <= i2 (RP_primNeInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 /= i2 + (RP_primCmpInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 `compare` i2+ (RP_primLeInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 <= i2+ (RP_primLtInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 < i2+ (RP_primGeInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 >= i2+ (RP_primGtInt, [RVal_Int i1, RVal_Int i2]) -> hsUnmarshall $ i1 > i2++ (RP_primIntToInteger , [RVal_Int x]) -> rsemPush $ RVal_Integer $ fromIntegral x+ (RP_primIntegerToInt , [RVal_Integer x]) -> rsemPush $ RVal_Int $ fromIntegral x++ -- Integer+ (RP_primAddInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 + i2+ (RP_primSubInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 - i2+ (RP_primMulInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 * i2+ (RP_primDivInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 `div` i2+ (RP_primQuotInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 `quot` i2+ (RP_primRemInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 `rem` i2+ (RP_primModInteger, [RVal_Integer i1, RVal_Integer i2]) -> rsemPush $ RVal_Integer $ i1 `mod` i2+ (RP_primNegInteger, [RVal_Integer i1]) -> rsemPush $ RVal_Integer (-i1)++ (RP_primDivModInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 `divMod` i2+ (RP_primQuotRemInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 `quotRem` i2++ (RP_primEqInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 == i2+ (RP_primNeInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 /= i2++ (RP_primCmpInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 `compare` i2+ (RP_primLeInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 <= i2+ (RP_primLtInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 < i2+ (RP_primGeInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 >= i2+ (RP_primGtInteger, [RVal_Integer i1, RVal_Integer i2]) -> hsUnmarshall $ i1 > i2+ -- Exception handling (RP_primCatchException, [x, hdl]) -> rsemEvl x -- err $ "Not impl: RP_primCatchException" -- TBD - -- MutVar- {-- (RP_primNewMutVar, [x, s]) -> (liftIO $ newIORef x) >>= \mv -> mkTuple [s, RHsV_MutVar mv]- (RP_primReadMutVar, [RHsV_MutVar mv, s]) -> (liftIO $ readIORef mv) >>= \v -> mkTuple [s, v]- (RP_primWriteMutVar, [RHsV_MutVar mv, v, s]) -> (liftIO $ writeIORef mv v) >> rsemPush s- (RP_primSameMutVar, _) -> err $ "Not impl: RP_primSameMutVar" -- TBD- -}- -- Base (RP_primPackedStringToInteger, [RVal_PackedString x]) -> rsemPush $ RVal_Integer $ read $ BSC8.unpack x (RP_primPackedStringNull, [RVal_PackedString x]) -> hsUnmarshall $ BSC8.null x@@ -48,74 +92,49 @@ (RP_primPackedStringTail, [RVal_PackedString x]) -> rsemPush $ RVal_PackedString $ BSC8.tail x (RP_primShowInteger, [RVal_Integer x]) -> hsUnmarshall $ show x - -- Base: Bounded- (RP_primMaxInt, _) -> rsemPush $ RVal_Int $ maxBound- (RP_primMinInt, _) -> rsemPush $ RVal_Int $ minBound- -- Prims: conversion (RP_primIntegerToInt32, [RVal_Integer x]) -> rsemPush $ RVal_Int32 $ fromIntegral x- (RP_primIntToInteger , [RVal_Int x]) -> rsemPush $ RVal_Integer $ fromIntegral x- (RP_primIntegerToInt , [RVal_Integer x]) -> rsemPush $ RVal_Int $ fromIntegral x -- IO {-- -- * The IO monad+ --- * The IO monad - -- IO -- instance MonadFix- | RP_fixIO -- :: (a -> IO a) -> IO a+-} - -- * Files and handles+ --- * Files and handles -- FilePath -- :: String -- Handle -- abstract, instance of: Eq, Show. - -- ** Standard handles+ --- ** Standard handles - -- | Three handles are allocated during program initialisation,+ --- | Three handles are allocated during program initialisation, -- and are initially open. --} --- | RP_stdin, RP_stdout, RP_stderr -- :: Handle (RP_stdin , _) -> rsemPush $ RHsV_Handle stdin (RP_stdout, _) -> rsemPush $ RHsV_Handle stdout (RP_stderr, _) -> rsemPush $ RHsV_Handle stderr-{- - -- * Opening and closing files-- -- ** Opening files+ --- | RP_openFile -- :: FilePath -> IOMode -> IO Handle+ (RP_openFile, [fp, md]) -> primIO_2ArgVal1ResVal openFile fp md+ --- | RP_openBinaryFile -- :: FilePath -> IOMode -> IO Handle+ (RP_openBinaryFile, [fp, md]) -> primIO_2ArgVal1ResVal openBinaryFile fp md - | RP_withFile- | RP_openFile -- :: FilePath -> IOMode -> IO Handle -- IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), --} --- ** Closing files --- | RP_hClose -- :: Handle -> IO () (RP_hClose, [RHsV_Handle h]) -> primIO (hClose h) -{-- -- ** Special cases-- -- | These functions are also exported by the "Prelude".-- | RP_readFile -- :: FilePath -> IO String- | RP_writeFile -- :: FilePath -> String -> IO ()- | RP_appendFile -- :: FilePath -> String -> IO ()-- -- ** File locking-- -- $locking--}- --- * Operations on handles --- ** Determining and changing the size of a file --- | RP_hFileSize -- :: Handle -> IO Integer- (RP_hFileSize, [RHsV_Handle h]) -> primInputIO (hFileSize h)+ (RP_hFileSize, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hFileSize h) --- #ifdef __GLASGOW_HASKELL__ --- | RP_hSetFileSize -- :: Handle -> Integer -> IO () (RP_hSetFileSize, [RHsV_Handle h, RVal_Integer i]) -> primIO (hSetFileSize h i)@@ -124,44 +143,51 @@ --- ** Detecting the end of input --- | RP_hIsEOF -- :: Handle -> IO Bool- (RP_hIsEOF, [RHsV_Handle h]) -> primInputIO (hIsEOF h)-{-- | RP_isEOF -- :: IO Bool--}+ (RP_hIsEOF, [h]) -> primIO_1ArgVal1ResVal hIsEOF h+ --- ** Buffering operations -{- -- BufferMode(NoBuffering,LineBuffering,BlockBuffering),- -- | RP_hSetBuffering -- :: Handle -> BufferMode -> IO ()- (RP_hSetBuffering, [RHsV_Handle h, RVal_Int m]) -> primInputIO (hSetBuffering h m)- | RP_hGetBuffering -- :: Handle -> IO BufferMode--}+ --- | RP_hSetBuffering -- :: Handle -> BufferMode -> IO ()+ (RP_hSetBuffering, [h, m]) -> primIO_2ArgVal0Res hSetBuffering h m+ --- | RP_hGetBuffering -- :: Handle -> IO BufferMode+ (RP_hGetBuffering, [h]) -> primIO_1ArgVal1ResVal hGetBuffering h --- | RP_hFlush -- :: Handle -> IO () (RP_hFlush, [RHsV_Handle h]) -> primIO (hFlush h) -{-- -- ** Repositioning handles+ --- ** Repositioning handles - | RP_hGetPosn -- :: Handle -> IO HandlePosn- | RP_hSetPosn -- :: HandlePosn -> IO () -- HandlePosn, -- abstract, instance of: Eq, Show. - | RP_hSeek -- :: Handle -> SeekMode -> Integer -> IO () -- SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd),+ --- | RP_hSeek -- :: Handle -> SeekMode -> Integer -> IO ()+ (RP_hSeek, [h, m, i]) -> primIO_3ArgVal0Res hSeek h m i -- #if !defined(__NHC__)- | RP_hTell -- :: Handle -> IO Integer+ --- | RP_hTell -- :: Handle -> IO Integer+ (RP_hTell, [h]) -> primIO_1ArgVal1ResVal hTell h -- #endif - -- ** Handle properties+ --- ** Handle properties - | RP_hIsOpen- | RP_hIsClosed -- :: Handle -> IO Bool- | RP_hIsReadable- | RP_hIsWritable -- :: Handle -> IO Bool- | RP_hIsSeekable -- :: Handle -> IO Bool+ --- | RP_hIsOpen+ (RP_hIsOpen, [h]) -> primIO_1ArgVal1ResVal hIsOpen h - -- ** Terminal operations (not portable: GHC\/Hugs only)+ --- | RP_hIsClosed -- :: Handle -> IO Bool+ (RP_hIsClosed, [h]) -> primIO_1ArgVal1ResVal hIsClosed h + --- | RP_hIsReadable+ (RP_hIsReadable, [h]) -> primIO_1ArgVal1ResVal hIsReadable h++ --- | RP_hIsWritable -- :: Handle -> IO Bool+ (RP_hIsWritable, [h]) -> primIO_1ArgVal1ResVal hIsWritable h++ --- | RP_hIsSeekable -- :: Handle -> IO Bool+ (RP_hIsSeekable, [h]) -> primIO_1ArgVal1ResVal hIsSeekable h+++{-+ --- ** Terminal operations (not portable: GHC\/Hugs only)+ --- #if !defined(__NHC__) | RP_hIsTerminalDevice -- :: Handle -> IO Bool @@ -169,83 +195,62 @@ | RP_hGetEcho -- :: Handle -> IO Bool --- #endif - -- ** Showing handle state (not portable: GHC only)+ --- ** Showing handle state (not portable: GHC only) -- #ifdef __GLASGOW_HASKELL__ -} --- | RP_hShow -- :: Handle -> IO String- (RP_hShow, [RHsV_Handle h]) -> primInputIO (hShow h)+ (RP_hShow, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hShow h) {- --- #endif - -- * Text input and output+ --- * Text input and output - -- ** Text input+ --- ** Text input -} --- | RP_hWaitForInput -- :: Handle -> Int -> IO Bool- (RP_hWaitForInput, [RHsV_Handle h, RVal_Int i]) -> primInputIO (hWaitForInput h i)-{-- | RP_hReady -- :: Handle -> IO Bool--}+ (RP_hWaitForInput, [RHsV_Handle h, RVal_Int i]) -> primIO_0Arg1ResVal (hWaitForInput h i) --- | RP_hGetChar -- :: Handle -> IO Char- (RP_hGetChar, [RHsV_Handle h]) -> primInputIO (hGetChar h)+ (RP_hGetChar, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hGetChar h) --- | RP_hGetLine -- :: Handle -> IO [Char]- (RP_hGetLine, [RHsV_Handle h]) -> primInputIO (hGetLine h)+ (RP_hGetLine, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hGetLine h) --- | RP_hLookAhead -- :: Handle -> IO Char- (RP_hLookAhead, [RHsV_Handle h]) -> primInputIO (hLookAhead h)+ (RP_hLookAhead, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hLookAhead h) --- | RP_hGetContents -- :: Handle -> IO [Char]- (RP_hGetContents, [RHsV_Handle h]) -> primInputIO (hGetContents h)+ (RP_hGetContents, [RHsV_Handle h]) -> primIO_0Arg1ResVal (hGetContents h) {-- -- ** Text output+ --- ** Text output -} --- | RP_hPutChar -- :: Handle -> Char -> IO ()- (RP_hPutChar, [RHsV_Handle h, x]) -> primOutputIO (hPutChar h) x+ (RP_hPutChar, [RHsV_Handle h, x]) -> primIO_1ArgVal0Res (hPutChar h) x --- | RP_hPutStr -- :: Handle -> [Char] -> IO ()- (RP_hPutStr, [RHsV_Handle h, x]) -> primOutputIO (hPutStr h) x-{-- | RP_hPutStrLn -- :: Handle -> [Char] -> IO ()- | RP_hPrint -- :: Show a => Handle -> a -> IO ()-- -- ** Special cases for standard input and output-- -- | These functions are also exported by the "Prelude".-- | RP_interact -- :: (String -> String) -> IO ()- -- putChar -- :: Char -> IO ()- -- putStr -- :: String -> IO ()- -- putStrLn -- :: String -> IO ()- -- print -- :: Show a => a -> IO ()- -- getChar -- :: IO Char- -- getLine -- :: IO String- -- getContents -- :: IO String- | RP_readIO -- :: Read a => String -> IO a- | RP_readLn -- :: Read a => IO a+ (RP_hPutStr, [RHsV_Handle h, x]) -> primIO_1ArgVal0Res (hPutStr h) x - -- * Binary input and output- | RP_withBinaryFile- | RP_openBinaryFile -- :: FilePath -> IOMode -> IO Handle--}+ --- * Binary input and output --- | RP_hSetBinaryMode -- :: Handle -> Bool -> IO ()- (RP_hSetBinaryMode, [RHsV_Handle h, b]) -> primOutputIO (hSetBinaryMode h) b+ (RP_hSetBinaryMode, [RHsV_Handle h, b]) -> primIO_1ArgVal0Res (hSetBinaryMode h) b --- | RP_hPutBuf -- :: Handle -> Ptr a -> Int -> IO () (RP_hPutBuf, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primIO (hPutBuf h (Ptr a) i) --- | RP_hGetBuf -- :: Handle -> Ptr a -> Int -> IO Int- (RP_hGetBuf, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primInputIO (hGetBuf h (Ptr a) i)+ (RP_hGetBuf, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primIO_0Arg1ResVal (hGetBuf h (Ptr a) i) {- --- #if !defined(__NHC__) && !defined(__HUGS__) -} --- | RP_hPutBufNonBlocking -- :: Handle -> Ptr a -> Int -> IO Int (RP_hPutBufNonBlocking, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primIO (hPutBufNonBlocking h (Ptr a) i) --- | RP_hGetBufNonBlocking -- :: Handle -> Ptr a -> Int -> IO Int- (RP_hGetBufNonBlocking, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primInputIO (hGetBufNonBlocking h (Ptr a) i)+ (RP_hGetBufNonBlocking, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primIO_0Arg1ResVal (hGetBufNonBlocking h (Ptr a) i) {- --- #endif- -- * Temporary files-- | RP_openTempFile- | RP_openBinaryTempFile -}+ --- * Temporary files++ --- | RP_openTempFile -- :: FilePath -> String -> IO (FilePath, Handle)+ (RP_openTempFile, [fp, tmpl]) -> primIO_2ArgVal1ResVal openTempFile fp tmpl+ --- | RP_openBinaryTempFile -- :: FilePath -> String -> IO (FilePath, Handle)+ (RP_openBinaryTempFile, [fp, tmpl]) -> primIO_2ArgVal1ResVal openBinaryTempFile fp tmpl+ --- * Additional ones --- | RP_primShowHandle -- :: Handle -> String (RP_primShowHandle, [RHsV_Handle h]) -> hsUnmarshall $ show h@@ -254,7 +259,7 @@ (pr, _) -> err $ "CoreRun.Run.Val.Prim:" >#< show pr -{-# LINE 281 "src/ehc/CoreRun/Run/Val/Prim.chs" #-}+{-# LINE 288 "src/ehc/CoreRun/Run/Val/Prim.chs" #-} -- | Voidify IO on RVal level, i.e. make IO () -- rvalVoid :: (RunSem RValCxt RValEnv RVal m RVal) => RValT m a -> RValT m RVal rvalVoid :: (RunSem RValCxt RValEnv RVal m a) => RValT m b -> RValT m a@@ -266,13 +271,64 @@ primIO io = rvalVoid $ liftIO $ io -- {-# INLINE primIO #-} --- | Input-like IO-primInputIO :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x) => IO x -> RValT m a-primInputIO io = (liftIO $ io) >>= hsUnmarshall--- {-# INLINE primInputIO #-}+-- | IO, taking 0 arg yielding a result+primIO_0Arg1ResVal :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x) => IO x -> RValT m a+primIO_0Arg1ResVal io = (liftIO $ io) >>= hsUnmarshall+-- {-# INLINE primIO_0Arg1ResVal #-} --- | Output-like IO-primOutputIO :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x) => (x -> IO ()) -> RVal -> RValT m a-primOutputIO io x = rvalVoid $ hsMarshall rvalPrimargEvl x >>= (liftIO . io)--- {-# INLINE primOutputIO #-}+-- | IO, taking 1 (still to marshall) arg yielding ()+primIO_1ArgVal0Res :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x) => (x -> IO ()) -> RVal -> RValT m a+primIO_1ArgVal0Res io x = do+ x' <- hsMarshall rvalPrimargEvl x+ rvalVoid $ liftIO $ io x'+-- {-# INLINE primIO_1ArgVal0Res #-}++-- | IO, taking 2 (still to marshall) arg yielding ()+primIO_2ArgVal0Res :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x, HSMarshall y) => (x -> y -> IO ()) -> RVal -> RVal -> RValT m a+primIO_2ArgVal0Res io x y = do+ x' <- hsMarshall rvalPrimargEvl x+ y' <- hsMarshall rvalPrimargEvl y+ rvalVoid $ liftIO $ io x' y'+-- {-# INLINE primIO_2ArgVal0Res #-}++-- | IO, taking 3 (still to marshall) arg yielding ()+primIO_3ArgVal0Res :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x, HSMarshall y, HSMarshall z) => (x -> y -> z -> IO ()) -> RVal -> RVal -> RVal -> RValT m a+primIO_3ArgVal0Res io x y z = do+ x' <- hsMarshall rvalPrimargEvl x+ y' <- hsMarshall rvalPrimargEvl y+ z' <- hsMarshall rvalPrimargEvl z+ rvalVoid $ liftIO $ io x' y' z'+-- {-# INLINE primIO_3ArgVal0Res #-}++-- | IO, taking 1 (still to marshall) arg yielding a result+primIO_1ArgVal1ResVal :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x, HSMarshall res) => (x -> IO res) -> RVal -> RValT m a+primIO_1ArgVal1ResVal io x = hsMarshall rvalPrimargEvl x >>= (liftIO . io) >>= hsUnmarshall+-- {-# INLINE primIO_1ArgVal0Res #-}++-- | IO, taking 1 (still to marshall) arg yielding a result+primIO_2ArgVal1ResVal :: (RunSem RValCxt RValEnv RVal m a, HSMarshall x, HSMarshall y, HSMarshall res) => (x -> y -> IO res) -> RVal -> RVal -> RValT m a+primIO_2ArgVal1ResVal io x y = do+ x' <- hsMarshall rvalPrimargEvl x+ y' <- hsMarshall rvalPrimargEvl y+ liftIO (io x' y') >>= hsUnmarshall+-- {-# INLINE primIO_2Arg0Res #-}++{-# LINE 347 "src/ehc/CoreRun/Run/Val/Prim.chs" #-}+deriving instance Generic IOMode+instance HSMarshall IOMode++deriving instance Generic BufferMode+instance HSMarshall BufferMode++deriving instance Generic SeekMode+instance HSMarshall SeekMode++instance HSMarshall a => HSMarshall (Maybe a)++instance HSMarshall Ordering++instance (HSMarshall a, HSMarshall b) => HSMarshall (a,b)+instance (HSMarshall a, HSMarshall b, HSMarshall c) => HSMarshall (a,b,c)+instance (HSMarshall a, HSMarshall b, HSMarshall c, HSMarshall d) => HSMarshall (a,b,c,d)+instance (HSMarshall a, HSMarshall b, HSMarshall c, HSMarshall d, HSMarshall e) => HSMarshall (a,b,c,d,e)
@@ -234,7 +234,7 @@ where {-# SPECIALIZE instance RunSem RValCxt RValEnv RVal IO () #-} rsemInitial = do- s <- liftIO $ newRValEnv 1000 -- 100000 --+ s <- liftIO $ newRValEnv 100000 -- 100000 -- return (emptyRValCxt, s, undefined) rsemSetup opts modImpL mod@(Mod_Mod {moduleNr_Mod_Mod=mainModNr}) = do@@ -242,25 +242,21 @@ rsemGcEnterRootLevel let modAllL = modImpL ++ [mod] ms <- liftIO $ MV.new (maximum (map moduleNr_Mod_Mod modAllL) + 1)+ modify $ \env -> env {renvGlobalsMV = ms} forM_ modAllL $ \(Mod_Mod {ref2nm_Mod_Mod=r2n, moduleNr_Mod_Mod=nr, binds_Mod_Mod=bs, stkDepth_Mod_Mod=sz}) -> do -- construct frame for each module- p <- explStkPushAllocFrameM r2n nullPtr {- 0 -} sz emptyExplArgs+ p <- explStkPushAllocFrameM r2n nullPtr sz emptyExplArgs -- and store the frame into the array holding module frames (liftIO $ MV.write ms nr p >> newIORef p) >>= \r -> rsemGcPushRoot (RVal_Ptr r)- -- get the module array and store it as the globals (TBD: fix freeze everytime...)- ms' <- liftIO $ V.freeze ms- modify $ \env -> env {renvGlobals = ms'} -- holding all local defs V.forM_ bs rsemExp -- p <- explStkPopFrameM- -- get the module array and store it as the globals- ms' <- liftIO $ V.freeze ms- modify $ \env -> env {renvGlobals = ms'} -- use the main module's stackframe for evaluating 'main'- explStkPushFrameM $ ms' V.! mainModNr+ liftIO (MV.read ms mainModNr) >>= explStkPushFrameM rsemGcLeaveRootLevel rsemSetupTracing opts+ rcxtUpdDatatypes modAllL rsemSetTrace doTrace doExtensive = modify $ \env -> env {renvDoTrace = doTrace, renvDoTraceExt = doExtensive}
@@ -200,14 +200,13 @@ -- (liftIO $ newRValEnv 100000) >>= put let modAllL = mod : modImpL ms <- liftIO $ MV.new (maximum (map moduleNr_Mod_Mod modAllL) + 1)+ modify $ \env -> env {renvGlobalsMV = ms} forM_ modAllL $ \(Mod_Mod {ref2nm_Mod_Mod=r2n, moduleNr_Mod_Mod=nr, binds_Mod_Mod=bs}) -> do bs' <- (liftIO . V.thaw) =<< V.forM bs rsemExp p <- implStkAllocFrameM r2n nullPtr {- 0 -} (MV.length bs') bs' liftIO $ MV.write ms nr p- ms' <- liftIO $ V.freeze ms- modify $ \env -> env {renvGlobals = ms'} rsemSetupTracing opts- -- return RVal_None+ rcxtUpdDatatypes modAllL rsemSetTrace doTrace doExtensive = modify $ \env -> env {renvDoTrace = doTrace, renvDoTraceExt = doExtensive}
@@ -443,8 +443,7 @@ { _mainUseExists | _mainUseExists `seq` (True) -> (case (_lhsIisMainMod) of { _isMainMod | _isMainMod `seq` (True) ->- (case (let- bm = acoreVar hsnMain+ (case (let bm = acoreVar hsnMain bb = _exprIletCBody db = acoreLet acoreBindcategPlain [acoreBind1Ty hsnMain (acoreTyErr $ "EH.ToCore.AGItf.main") $ acoreRunMain _exprIletCBody] mb m = acoreLet acoreBindcategPlain [mkb $ acoreRunMain me]@@ -456,16 +455,18 @@ ((m:_), True , True) -> (bb, mb m ) ((m:_), _ , _ ) -> (bb, mb m ) (_ , _ , _ ) -> (bb, id )+ alldata =+ [ (tn, [ (cn, dtiCTag dti) | (cn,dti) <- Map.toList $ dgiConstrTagMp dgi ])+ | (tn,dgi) <- gamToAssocL _exprIgathDataGam, not (dgiIsNewtype dgi)+ ]+ allConNmS = Set.fromList [ cn | (_,cs) <- alldata, (cn,_) <- cs ] in CModule_Mod _lhsImoduleNm- (map CExport_Export $ Map.keys $ mieimplHsName2FldMp _lhsImoduleImportExportImpl)+ ( [ CExport_ExportData (hsnQualified tn) (Just [ hsnQualified cn | (cn,_) <- cs ]) | (tn,cs) <- alldata ]+ ++ [ CExport_Export (hsnQualified n) | n <- Map.keys $ mieimplHsName2FldMp _lhsImoduleImportExportImpl, n `Set.notMember` allConNmS ]+ ) (map CImport_Import $ Set.toList $ iumHSDeclModules _lhsIimportUsedModules)- [ CDeclMeta_Data tn- [ CDataCon_Con cn (ctagTag ctag) (ctagArity ctag)- | (cn,dti) <- Map.toList $ dgiConstrTagMp dgi- , let ctag = dtiCTag dti- ]- | (tn,dgi) <- gamToAssocL _exprIgathDataGam- , not (dgiIsNewtype dgi)+ [ CDeclMeta_Data tn [ CDataCon_Con cn (ctagTag ctag) (ctagArity ctag) | (cn,ctag) <- cs ]+ | (tn,cs) <- alldata ] ( cSubstAppExpr True _exprIcSubst
@@ -205,7 +205,7 @@ } {-# LINE 334 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}-cpGetPrevCore :: HsName -> EHCompilePhase ()+cpGetPrevCore :: HsName -> EHCompilePhase Core.CModule cpGetPrevCore modNm = do { cr <- get ; cpMsg modNm VerboseDebug "cpGetPrevCore"@@ -213,5 +213,6 @@ ; when (isJust (ecuMbCoreTime ecu) && isNothing (ecuMbCore ecu)) (cpDecodeCore (Just Cfg.suffixDotlessBinaryCore) modNm) -- (cpParseCore modNm)+ ; fmap (fromJust . ecuMbCore) $ gets (crCU modNm) }
@@ -1,5 +1,6 @@ module UHC.Light.Compiler.EHC.CompilePhase.Run-( cpRunCoreRun )+( cpRunCoreRun+, cpRunCoreRun2 ) where import UHC.Light.Compiler.EHC.Common import UHC.Light.Compiler.EHC.CompileUnit@@ -7,11 +8,13 @@ import Data.Maybe import Control.Monad.State import Control.Exception+import UHC.Light.Compiler.EHC.CompilePhase.Parsers import UHC.Light.Compiler.Core.ToCoreRun+import UHC.Light.Compiler.CoreRun import UHC.Light.Compiler.CoreRun.Run import UHC.Light.Compiler.CoreRun.Run.Val.RunExplStk as RE -{-# LINE 41 "src/ehc/EHC/CompilePhase/Run.chs" #-}+{-# LINE 45 "src/ehc/EHC/CompilePhase/Run.chs" #-} -- | Run CoreRun. -- TBD: fix dependence on whole program linked cpRunCoreRun :: HsName -> EHCompilePhase ()@@ -28,4 +31,30 @@ either (\e -> cpSetLimitErrsWhen 1 "Run Core(Run) errors" [e]) (\_ -> return ()) res++{-# LINE 72 "src/ehc/EHC/CompilePhase/Run.chs" #-}+-- | Run CoreRun.+-- 20150130: TBD: does not work yet+cpRunCoreRun2 :: HsName -> EHCompilePhase ()+cpRunCoreRun2 modNm = do+ cr <- get+ let (ecu,_,opts,_) = crBaseInfo modNm cr+ mbCore = ecuMbCore ecu+ (impModL, mainMod) <- fmap (fromJust . initlast) $+ case crPartitionMainAndImported cr $ map head $ crCompileOrder cr of+ (_, impl) -> do+ cores <- forM (impl ++ [modNm]) cpGetPrevCore+ return $ flip evalState emptyNm2RefMp $ do+ forM (zip cores [0..]) $ \(cr,modnr) -> do+ prevNm2Ref <- get+ let (m,nm2ref) = cmod2CoreRun' opts modnr prevNm2Ref cr+ put $ nm2refUnion nm2ref prevNm2Ref+ return m+ cpMsg modNm VerboseNormal "Run Core"+ res <- liftIO $ catch+ (runCoreRun opts impModL mainMod $ cmodRun opts mainMod)+ (\(e :: SomeException) -> hFlush stdout >> (return $ Left $ strMsg $ "cpRunCoreRun: " ++ show e))+ either (\e -> cpSetLimitErrsWhen 1 "Run Core(Run) errors" [e])+ (\_ -> return ())+ res
@@ -27,7 +27,7 @@ import UHC.Light.Compiler.EHC.CompileGroup import UHC.Light.Compiler.EHC.CompilePhase.Module import UHC.Light.Compiler.Module.ImportExport-import qualified UHC.Light.Compiler.Core as Core (cModMerge)+import qualified UHC.Light.Compiler.Core as Core (cModMergeByConcat) import qualified UHC.Light.Compiler.Core.Merge as CMerge (cModMerge) import qualified UHC.Light.Compiler.Core.Check as Core2ChkSem import UHC.Light.Compiler.Base.PackageDatabase@@ -71,7 +71,7 @@ cpEhcFullProgLinkAllModules :: [HsName] -> EHCompilePhase () cpEhcFullProgLinkAllModules modNmL = do { cr <- get- ; let (mainModNmL,impModNmL) = splitMain cr modNmL+ ; let (mainModNmL,impModNmL) = crPartitionMainAndImported cr modNmL (_,opts) = crBaseInfo' cr -- ' ; when (not $ null modNmL) (cpMsg (head modNmL) VerboseDebug ("Main mod split: " ++ show mainModNmL ++ ": " ++ show impModNmL))@@ -110,9 +110,8 @@ _ -> return () _ -> return () }- where splitMain cr = partition (\n -> ecuHasMain $ crCU n cr) -{-# LINE 170 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 169 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcCheckAbsenceOfMutRecModules :: EHCompilePhase () cpEhcCheckAbsenceOfMutRecModules = do { cr <- get@@ -122,7 +121,7 @@ ) } -{-# LINE 193 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 192 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgCompileAllModules :: EHCompilePhase () cpEhcFullProgCompileAllModules = do { cr <- get@@ -138,16 +137,16 @@ ) } -{-# LINE 225 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 224 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgPostModulePhases :: EHCOpts -> [HsName] -> ([HsName],HsName) -> EHCompilePhase () cpEhcFullProgPostModulePhases opts modNmL modSpl | ehcOptOptimizationScope opts >= OptimizationScope_WholeCore = cpEhcCoreFullProgPostModulePhases opts modNmL modSpl | otherwise = return () -{-# LINE 267 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 266 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcCoreFullProgPostModulePhases :: EHCOpts -> [HsName] -> ([HsName],HsName) -> EHCompilePhase () cpEhcCoreFullProgPostModulePhases opts modNmL (impModNmL,mainModNm)- = cpSeq ([ cpSeq [cpGetPrevCore m | m <- modNmL]+ = cpSeq ([ cpSeq [void $ cpGetPrevCore m | m <- modNmL] , mergeIntoOneBigCore , cpTransformCore OptimizationScope_WholeCore mainModNm , cpFlowHILamMp mainModNm@@ -166,12 +165,12 @@ } where mOf m cr = panicJust "cpEhcCoreFullProgPostModulePhases.mergeIntoOneBigCore" $ ecuMbCore $ crCU m cr -{-# LINE 292 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 291 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| Per module compilation of (import) ordered sequence of module, as part of a full program compilation -}-{-# LINE 296 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 295 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgModuleCompileN :: [HsName] -> EHCompilePhase () cpEhcFullProgModuleCompileN modNmL = cpSeq (merge (map cpEhcFullProgModuleCompile1 modNmL)@@ -181,12 +180,12 @@ merge [] cs = cs merge cs [] = cs -{-# LINE 307 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 306 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| Find out whether a compilation is needed, and if so, can be done. -}-{-# LINE 311 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 310 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgModuleDetermineNeedsCompile :: HsName -> EHCompilePhase () cpEhcFullProgModuleDetermineNeedsCompile modNm = do { cr <- get@@ -210,12 +209,12 @@ ; cpUpdCU modNm (ecuSetNeedsCompile (needsCompile && canCompile)) } -{-# LINE 336 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 335 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| Compilation of 1 module, as part of a full program compilation -}-{-# LINE 340 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 339 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgModuleCompile1 :: HsName -> EHCompilePhase () cpEhcFullProgModuleCompile1 modNm = do { cr <- get@@ -233,12 +232,12 @@ ; when (ecuHasMain ecu) (crSetAndCheckMain modNm) } -{-# LINE 359 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 358 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| Flow of info between modules, as part of a full program compilation -}-{-# LINE 363 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 362 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcFullProgBetweenModuleFlow :: HsName -> EHCompilePhase () cpEhcFullProgBetweenModuleFlow modNm = do { cr <- get@@ -249,10 +248,10 @@ ; cpCleanupFlow modNm } -{-# LINE 385 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 384 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcModuleCompile1 :: Maybe EHCompileUnitState -> HsName -> EHCompilePhase HsName cpEhcModuleCompile1 targHSState modNm-{-# LINE 389 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 388 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} = do { cr <- get ; let (ecu,_,opts,fp) = crBaseInfo modNm cr defaultResult = modNm@@ -261,7 +260,7 @@ ; when (ehcOptVerbosity opts >= VerboseDebug) (lift $ putStrLn ("State: in: " ++ show (ecuState ecu) ++ ", to: " ++ show targHSState)) ; case (ecuState ecu,targHSState) of-{-# LINE 417 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 416 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} (ECUS_Haskell st,Just (ECUS_Haskell HSOnlyImports)) | st == HSStart || st == LHSStart@@ -316,7 +315,7 @@ ; return defaultResult } -{-# LINE 488 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 487 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} (ECUS_Haskell HSStart,_) -> do { cpMsg modNm VerboseMinimal "Compiling Haskell" ; cpEhcHaskellModulePrepare modNm@@ -403,12 +402,12 @@ _ -> return defaultResult } -{-# LINE 609 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 608 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| EH common phases: analysis + core + grin -}-{-# LINE 613 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 612 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcCoreModuleCommonPhases :: Bool -> Bool -> Bool -> EHCOpts -> HsName -> EHCompilePhase () cpEhcCoreModuleCommonPhases isMainMod isTopMod doMkExec opts modNm = cpSeq ([@@ -416,14 +415,14 @@ ] ) -{-# LINE 630 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 629 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcEhModuleCommonPhases :: Bool -> Bool -> Bool -> EHCOpts -> HsName -> EHCompilePhase () cpEhcEhModuleCommonPhases isMainMod isTopMod doMkExec opts modNm = cpSeq [ cpEhcEhAnalyseModuleDefs modNm , cpEhcCoreModuleCommonPhases isMainMod isTopMod doMkExec opts modNm ] -{-# LINE 638 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 637 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Common phases when starting with a Haskell module. -- HS common phases: HS analysis + EH common cpEhcHaskellModuleCommonPhases :: Bool -> Bool -> EHCOpts -> HsName -> EHCompilePhase ()@@ -437,7 +436,7 @@ } ] -{-# LINE 657 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 656 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | All the work to be done after Haskell src imports have been read/analysed. -- Post module import common phases: Parse + Module analysis + HS common cpEhcHaskellModuleAfterImport@@ -456,7 +455,7 @@ , cpEhcHaskellModulePostlude modNm ] -{-# LINE 683 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 682 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | All the work to be done after Core src/binary imports have been read/analysed cpEhcCoreModuleAfterImport :: Bool -> EHCOpts@@ -477,13 +476,13 @@ ] } -{-# LINE 709 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 708 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} {-| Prepare module for compilation. This should be the first step before compilation of a module and is meant to obtain cached info from a previous compilation. -}-{-# LINE 726 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 725 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcHaskellModulePrepareSrc :: HsName -> EHCompilePhase () cpEhcHaskellModulePrepareSrc modNm = cpGetMetaInfo [GetMeta_Src,GetMeta_Dir] modNm@@ -515,14 +514,14 @@ , cpEhcHaskellModulePrepareHS2 modNm ] -{-# LINE 765 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 764 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcHaskellModulePostlude :: HsName -> EHCompilePhase () cpEhcHaskellModulePostlude modNm = cpSeq [ cpOutputHI "hi" modNm , cpCleanupCU modNm ] -{-# LINE 775 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 774 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Get import information from Haskell module source text. cpEhcHaskellImport :: HSState@@ -571,7 +570,7 @@ ; cpGetHsModnameAndImports modNm } -{-# LINE 840 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 839 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Parse a Haskell module cpEhcHaskellParse :: Bool -> Bool@@ -589,21 +588,21 @@ ] ) -{-# LINE 867 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 866 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcEhParse :: HsName -> EHCompilePhase () cpEhcEhParse modNm = cpSeq [ cpParseEH modNm , cpStopAt CompilePoint_Parse ] -{-# LINE 875 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 874 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpEhcCoreParse :: HsName -> EHCompilePhase () cpEhcCoreParse modNm = cpSeq [ cpParseCoreWithFPath Nothing modNm , cpStopAt CompilePoint_Parse ] -{-# LINE 883 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 882 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Analyse a Haskell src module for -- (1) module information (import, export, etc), cpEhcHaskellAnalyseModuleItf :: HsName -> EHCompilePhase ()@@ -613,7 +612,7 @@ , cpCleanupHSMod modNm ] -{-# LINE 899 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 898 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Analyse a Core text/binary src module for -- (1) module information (import, export, etc), cpEhcCoreAnalyseModuleItf :: HsName -> EHCompilePhase ()@@ -623,7 +622,7 @@ -- , cpCleanupHSMod modNm ] -{-# LINE 915 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 914 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Analyse a Haskell src module for -- (2) names + dependencies cpEhcHaskellAnalyseModuleDefs :: HsName -> EHCompilePhase ()@@ -634,7 +633,7 @@ , cpStopAt CompilePoint_AnalHS ] -{-# LINE 927 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 926 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Analyse a Haskell src module for -- (3) types cpEhcEhAnalyseModuleDefs :: HsName -> EHCompilePhase ()@@ -644,7 +643,7 @@ , cpStopAt CompilePoint_AnalEH ] -{-# LINE 938 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 937 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Part 1 Core processing, on a per module basis, part1 is done always cpEhcCorePerModulePart1 :: HsName -> EHCompilePhase () cpEhcCorePerModulePart1 modNm@@ -661,7 +660,7 @@ ) } -{-# LINE 970 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 969 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Get import information from Core module source text. cpEhcCoreImport :: Bool -> HsName -> EHCompilePhase HsName@@ -678,7 +677,7 @@ ; cpGetCoreModnameAndImports modNm } -{-# LINE 988 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 987 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Analyse a Core src module cpEhcCoreAnalyseModule :: HsName -> EHCompilePhase () cpEhcCoreAnalyseModule modNm@@ -690,7 +689,7 @@ ; cpSetLimitErrsWhen 5 "Core analysis" errs } -{-# LINE 1001 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1000 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Part 2 Core processing, part2 is done either for per individual module compilation or after full program analysis cpEhcCorePerModulePart2 :: HsName -> EHCompilePhase () cpEhcCorePerModulePart2 modNm@@ -701,7 +700,7 @@ ] } -{-# LINE 1045 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1044 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Core+grin processing, on a per module basis, may only be done when full program analysis is done cpEhcCoreGrinPerModuleDoneFullProgAnalysis :: HsName -> EHCompilePhase () cpEhcCoreGrinPerModuleDoneFullProgAnalysis modNm@@ -711,7 +710,7 @@ ] ) -{-# LINE 1056 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1055 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- | Make final executable code, either still partly or fully (i.e. also linking) cpEhcExecutablePerModule :: FinalCompileHow -> [HsName] -> HsName -> EHCompilePhase () cpEhcExecutablePerModule how impModNmL modNm@@ -721,7 +720,7 @@ [ cpCompileWithGCC how impModNmL modNm ] } -{-# LINE 1082 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1081 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpProcessHs :: HsName -> EHCompilePhase () cpProcessHs modNm = cpSeq [ cpFoldHs modNm@@ -730,7 +729,7 @@ , cpCleanupHS modNm ] -{-# LINE 1096 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1095 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpProcessEH :: HsName -> EHCompilePhase () cpProcessEH modNm = do { cr <- get@@ -757,7 +756,7 @@ ] } -{-# LINE 1158 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1157 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- unprocessed core -> folded core cpProcessCoreBasic :: HsName -> EHCompilePhase () cpProcessCoreBasic modNm@@ -770,7 +769,7 @@ ] } -{-# LINE 1174 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1173 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- unfolded core -> folded core -- (called on merged core, and on core directly generated from cached grin) cpProcessCoreFold :: HsName -> EHCompilePhase ()@@ -780,7 +779,7 @@ [ cpFoldCore2Grin modNm ] ++ [ cpFlowCoreSemAfterFold modNm ] -{-# LINE 1189 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1188 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} cpProcessCoreModFold :: HsName -> EHCompilePhase () cpProcessCoreModFold modNm = cpSeq $@@ -788,7 +787,7 @@ , cpFlowCoreModSem modNm ] -{-# LINE 1198 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-}+{-# LINE 1197 "src/ehc/EHC/CompilePhase/TopLevelPhases.chs" #-} -- folded core -> grin, jazy, and the rest cpProcessCoreRest :: HsName -> EHCompilePhase () cpProcessCoreRest modNm@@ -805,7 +804,7 @@ then [void $ cpOutputCore CPOutputCoreHow_Run [] "" Cfg.suffixDotlessInputOutputCoreRun modNm] else []) ++ (if CoreOpt_Run `elem` ehcOptCoreOpts opts -- TBD: only when right backend? For now, just do it- then [cpRunCoreRun modNm]+ then [cpRunCoreRun{-2-} modNm] else []) ++ [ cpCleanupCore [modNm] ] )
@@ -10,6 +10,7 @@ , cpSystemRaw , cpStopAt , crsiExpNmOffMpDbg, crsiExpNmOffMp+, crPartitionMainAndImported , crModNeedsCompile , crModCanCompile , crSetAndCheckMain@@ -286,6 +287,11 @@ mbt = ecuMbHIInfoTime ecu' {-# LINE 433 "src/ehc/EHC/CompileRun.chs" #-}+-- | Partition modules into main and non main (i.e. imported) module names+crPartitionMainAndImported :: EHCompileRun -> [HsName] -> ([HsName], [HsName])+crPartitionMainAndImported cr modNmL = partition (\n -> ecuHasMain $ crCU n cr) modNmL++{-# LINE 443 "src/ehc/EHC/CompileRun.chs" #-} crModNeedsCompile :: HsName -> EHCompileRun -> Bool crModNeedsCompile modNm cr = ecuIsMainMod ecu -- ecuIsTopMod ecu@@ -297,13 +303,13 @@ (newer,_) = crPartitionNewerOlderImports modNm cr opts = crsiOpts $ crStateInfo cr -{-# LINE 454 "src/ehc/EHC/CompileRun.chs" #-}+{-# LINE 464 "src/ehc/EHC/CompileRun.chs" #-} crModCanCompile :: HsName -> EHCompileRun -> Bool crModCanCompile modNm cr = isJust (ecuMbSrcTime ecu) && ecuDirIsWritable ecu where ecu = crCU modNm cr -{-# LINE 465 "src/ehc/EHC/CompileRun.chs" #-}+{-# LINE 475 "src/ehc/EHC/CompileRun.chs" #-} -- | split module names in those part of a package, and others crPartitionIntoPkgAndOthers :: EHCompileRun -> [HsName] -> ([PkgModulePartition],[HsName]) crPartitionIntoPkgAndOthers cr modNmL@@ -318,7 +324,7 @@ FileLocKind_Pkg p d -> ([((p,d),[m])], [ ]) where (ecu,_,_,_) = crBaseInfo m cr -{-# LINE 485 "src/ehc/EHC/CompileRun.chs" #-}+{-# LINE 495 "src/ehc/EHC/CompileRun.chs" #-} crSetAndCheckMain :: HsName -> EHCompilePhase () crSetAndCheckMain modNm = do { cr <- get
@@ -41,14 +41,14 @@ {-# LINE 94 "src/ehc/EHC/Main.chs" #-}-mainEHC :: IO ()-mainEHC+mainEHC :: EHCOpts -> IO ()+mainEHC opts0 = do { args <- getArgs ; progName <- getProgName ; curDir <- getCurrentDirectory -- an empty data dir means we are running as cabal installed exec ; mbDataDir <- Cfg.getDataDir >>= \d -> return $ if null d then Nothing else Just d- ; let opts1 = defaultEHCOpts+ ; let opts1 = opts0 { ehcOptEnvironment = defaultEHCEnvironment , ehcProgName = p , ehcCurDir = curDir
@@ -192,14 +192,17 @@ { scoKeywordsTxt = Set.fromList $ [ "alloc", "module", "tail", "eval", "case", "of", "let", "in", "app", "ffi", "dbg", "tag" , "g", "d", "l"+ , "data" ]- , scoKeywordsOps = Set.fromList [ "->", "\\" ]- , scoSpecChars = Set.fromList "();,."- , scoOpChars = Set.fromList "->\\"+ -- , scoKeywExtraChars = Set.fromList "."+ , scoKeywordsOps = Set.fromList [ "->", "." ]+ , scoSpecChars = Set.fromList "();,=\\"+ , scoOpChars = Set.fromList "->." , scoAllowFloat = False+ , scoDollarIdent = True } -{-# LINE 318 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 321 "src/ehc/Scanner/Common.chs" #-} tycoreScanOpts :: ScanOpts tycoreScanOpts = defaultScanOpts@@ -219,7 +222,7 @@ , scoDollarIdent = True } -{-# LINE 349 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 352 "src/ehc/Scanner/Common.chs" #-} grinScanOpts :: ScanOpts grinScanOpts = defaultScanOpts@@ -244,14 +247,14 @@ , scoDollarIdent = True } -{-# LINE 381 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 384 "src/ehc/Scanner/Common.chs" #-} tyScanOpts :: ScanOpts tyScanOpts = defaultScanOpts { scoKeywordsTxt = Set.fromList [ "uid" ] } -{-# LINE 389 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 392 "src/ehc/Scanner/Common.chs" #-} hsnScanOpts :: ScanOpts hsnScanOpts = defaultScanOpts@@ -286,7 +289,7 @@ } where hsScanOpts' = hsScanOpts emptyEHCOpts -{-# LINE 438 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 441 "src/ehc/Scanner/Common.chs" #-} foreignEntScanOpts :: FFIWay -> ScanOpts foreignEntScanOpts way = o { scoKeywordsTxt = Set.fromList [ "dynamic", "wrapper", "h", "static", "new", "js" ]@@ -302,7 +305,7 @@ _ -> ("" , "" ) -{-# LINE 477 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 480 "src/ehc/Scanner/Common.chs" #-} splitTokensOnModuleTrigger :: ScanOpts -> [Token] -> Maybe ([Token],[Token]) splitTokensOnModuleTrigger scanOpts ts = case break ismod ts of@@ -311,7 +314,7 @@ where ismod (Reserved s _) | s == scoOffsideModule scanOpts = True ismod _ = False -{-# LINE 487 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 490 "src/ehc/Scanner/Common.chs" #-} offsideScanHandle :: ScanOpts -> FilePath -> Handle -> IO (OffsideInput [Token] Token (Maybe Token)) offsideScanHandle scanOpts fn fh = do { tokens <- scanHandle scanOpts fn fh@@ -327,7 +330,7 @@ triggers = [ (Trigger_IndentGT,reserved x noPos) | x <- scoOffsideTrigs scanOpts ] ++ [ (Trigger_IndentGE,reserved x noPos) | x <- scoOffsideTrigsGE scanOpts ] -{-# LINE 512 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 515 "src/ehc/Scanner/Common.chs" #-} floatDenot2NomDenom :: String -> (Integer,Integer) floatDenot2NomDenom denot = (numerator f,denominator f)@@ -346,7 +349,7 @@ intDenot2Integer :: Int -> String -> Integer intDenot2Integer b s = getBaseNumber (toInteger b) s -{-# LINE 537 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 540 "src/ehc/Scanner/Common.chs" #-} pKeyTk, pKeyTk' :: IsParser p Token => String -> p Token pKeyTk key = pCostReserved' 9 key@@ -355,18 +358,18 @@ pKeyw :: (IsParser p Token,Show k) => k -> p Token pKeyw k = pKeyTk (show k) -{-# LINE 547 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 550 "src/ehc/Scanner/Common.chs" #-} pKeywHsNname :: (IsParser p Token,Show k) => k -> p HsName pKeywHsNname k = tokMkQName <$> pKeyw k -{-# LINE 553 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 556 "src/ehc/Scanner/Common.chs" #-} pStringTk, pCharTk, pInteger8Tk, pInteger10Tk, pInteger16Tk, pFractionTk,-{-# LINE 561 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 564 "src/ehc/Scanner/Common.chs" #-} pQVaridTk, pQConidTk, pQVarsymTk, pQConsymTk,-{-# LINE 565 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 568 "src/ehc/Scanner/Common.chs" #-} pVaridTk , pConidTk , pVaridTk', pConidTk', pTextnmTk, pTextlnTk, pIntegerTk, pVarsymTk, pConsymTk@@ -387,13 +390,13 @@ pTextnmTk = pHsCostValToken' 7 TkTextnm "<name>" pTextlnTk = pHsCostValToken' 7 TkTextln "<line>" pIntegerTk = pInteger10Tk-{-# LINE 593 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 596 "src/ehc/Scanner/Common.chs" #-} pQVaridTk = pHsCostValToken' 7 TkQVarid "<identifier>" pQConidTk = pHsCostValToken' 7 TkQConid "<Identifier>" pQConsymTk = pHsCostValToken' 7 TkQConOp "<conoperator>" pQVarsymTk = pHsCostValToken' 7 TkQOp "<operator>" -{-# LINE 604 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 607 "src/ehc/Scanner/Common.chs" #-} pCONID, pCONID', pCONSYM, pVARID, pVARID', pVARSYM :: IsParser p Token => p Token pCONID = pConidTk@@ -403,7 +406,7 @@ pVARID' = pVaridTk' pVARSYM = pVarsymTk -{-# LINE 624 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 627 "src/ehc/Scanner/Common.chs" #-} pQCONID, pQCONSYM, pQVARID, pQVARSYM :: IsParser p Token => p Token pQCONID = pQConidTk@@ -411,7 +414,7 @@ pQVARID = pQVaridTk pQVARSYM = pQVarsymTk -{-# LINE 637 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 640 "src/ehc/Scanner/Common.chs" #-} tokGetVal :: Token -> String tokGetVal x = tokenVal x@@ -422,14 +425,14 @@ pHNm :: (IsParser p Token) => p Token -> p HsName pHNm p = (hsnFromString . tokGetVal) <$> p -{-# LINE 659 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 662 "src/ehc/Scanner/Common.chs" #-} tokConcat :: Token -> Token -> Token tokConcat t1 t2 = Reserved (tokenVal t1 ++ tokenVal t2) (position t1) tokEmpty :: Token tokEmpty = Reserved "" noPos -{-# LINE 671 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 674 "src/ehc/Scanner/Common.chs" #-} pMODULE , pWHERE , pSEMI ,@@ -463,7 +466,7 @@ pIN :: IsParser p Token => p Token -{-# LINE 706 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 709 "src/ehc/Scanner/Common.chs" #-} pMODULE = pKeyTk "module" pWHERE = pKeyTk "where" pSEMI = pKeyTk ";"@@ -501,29 +504,29 @@ tokOpStrsEH1 = [ "=", "\\", show hsnArrow, "::", "@" ] tokOpStrsHS1 = [ "-", "*", "!", "_", "%", "." ] -{-# LINE 745 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 748 "src/ehc/Scanner/Common.chs" #-} pTDOT , pQDOT :: IsParser p Token => p Token -{-# LINE 751 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 754 "src/ehc/Scanner/Common.chs" #-} pTDOT = pKeyTk "..." pQDOT = pKeyTk "...." tokOpStrsEH2 = [ "...", "...." ] tokOpStrsHS2 = [ ] -{-# LINE 759 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 762 "src/ehc/Scanner/Common.chs" #-} tokOpStrsEH3 = [ "%" ] tokOpStrsHS3 = [ ] -{-# LINE 764 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 767 "src/ehc/Scanner/Common.chs" #-} pFORALL , pEXISTS , pTILDE :: IsParser p Token => p Token -{-# LINE 771 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 774 "src/ehc/Scanner/Common.chs" #-} pFORALL = pKeyTk "forall" pEXISTS = pKeyTk "exists" pTILDE = pKeyTk (show hsnEqTilde)@@ -533,7 +536,7 @@ tokOpStrsEH4 = [ ".", show hsnEqTilde ] tokOpStrsHS4 = [ ] -{-# LINE 782 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 785 "src/ehc/Scanner/Common.chs" #-} pLARROW , pVBAR , pDATA ,@@ -546,7 +549,7 @@ pDOTDOT :: IsParser p Token => p Token -{-# LINE 796 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 799 "src/ehc/Scanner/Common.chs" #-} pLARROW = pKeyTk "<-" pVBAR = pKeyTk "|" pDATA = pKeyTk "data"@@ -563,12 +566,12 @@ tokOpStrsEH5 = [ "|" ] tokOpStrsHS5 = [ "<-", "..", ":" ] -{-# LINE 814 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 817 "src/ehc/Scanner/Common.chs" #-} pFFORALL , pEEXISTS :: IsParser p Token => p Token -{-# LINE 820 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 823 "src/ehc/Scanner/Common.chs" #-} pFFORALL = pKeyTk "Forall" pEEXISTS = pKeyTk "Exists" @@ -578,7 +581,7 @@ tokOpStrsEH6 = [ "*" ] tokOpStrsHS6 = [ ] -{-# LINE 831 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 834 "src/ehc/Scanner/Common.chs" #-} pOROWREC , pCROWREC , pOROWROW ,@@ -589,7 +592,7 @@ pHASH :: IsParser p Token => p Token -{-# LINE 843 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 846 "src/ehc/Scanner/Common.chs" #-} pOROWREC = pKeyTk (show hsnORec) pCROWREC = pKeyTk (show hsnCRec) pOROWROW = pKeyTk (show hsnORow)@@ -599,11 +602,11 @@ pCOLEQUAL = pKeyTk ":=" pHASH = pKeyTk "#" -{-# LINE 854 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 857 "src/ehc/Scanner/Common.chs" #-} tokOpStrsEH7 = [ ":=", "#" ] tokOpStrsHS7 = [ ] -{-# LINE 859 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 862 "src/ehc/Scanner/Common.chs" #-} pLABEL , pLETSTRICT , pSAFE ,@@ -613,7 +616,7 @@ pEXPORT :: IsParser p Token => p Token -{-# LINE 870 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 873 "src/ehc/Scanner/Common.chs" #-} pLABEL = pKeyTk "label" pLETSTRICT = pKeyTk "letstrict" pSAFE = pKeyTk "safe"@@ -627,13 +630,13 @@ ++ map show allFFIWays tokKeywStrsHS8 = [ "default", "export", "label", "safe" ] -{-# LINE 887 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 890 "src/ehc/Scanner/Common.chs" #-} pFFIWay :: IsParser p Token => p (FFIWay,Token) pFFIWay = pAnyKey (\way -> (,) way <$> pKeyTk (show way)) allFFIWays <?> "pFFIWay" -{-# LINE 897 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 900 "src/ehc/Scanner/Common.chs" #-} pDARROW , pLTCOLON , pOIMPL ,@@ -643,7 +646,7 @@ pDO :: IsParser p Token => p Token -{-# LINE 908 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 911 "src/ehc/Scanner/Common.chs" #-} pDARROW = pKeyTk (show hsnPrArrow) pLTCOLON = pKeyTk "<:" pOIMPL = pKeyTk (show hsnOImpl)@@ -657,31 +660,31 @@ tokOpStrsEH9 = [ show hsnPrArrow, "<:" ] tokOpStrsHS9 = [ ] -{-# LINE 923 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 926 "src/ehc/Scanner/Common.chs" #-} tokOpStrsEH10 = [] -- [ show hsnDynVar ] tokOpStrsHS10 = [ ] -{-# LINE 931 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 934 "src/ehc/Scanner/Common.chs" #-} pTYPE :: IsParser p Token => p Token -{-# LINE 936 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 939 "src/ehc/Scanner/Common.chs" #-} pTYPE = pKeyTk "type" -{-# LINE 940 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 943 "src/ehc/Scanner/Common.chs" #-} tokKeywStrsEH11 = [ "type" ] tokKeywStrsHS11 = [ ] tokOpStrsEH11 = [ ] tokOpStrsHS11 = [ ] -{-# LINE 947 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 950 "src/ehc/Scanner/Common.chs" #-} pQUALIFIED , pQUESTQUEST , pAS , pHIDING :: IsParser p Token => p Token -{-# LINE 955 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 958 "src/ehc/Scanner/Common.chs" #-} pQUALIFIED = pKeyTk "qualified" pAS = pKeyTk "as" pHIDING = pKeyTk "hiding"@@ -690,7 +693,7 @@ tokKeywStrsEH12 = [ ] tokKeywStrsHS12 = [ "qualified", "as", "hiding" ] -{-# LINE 965 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 968 "src/ehc/Scanner/Common.chs" #-} pDERIVING :: IsParser p Token => p Token @@ -698,7 +701,7 @@ tokKeywStrsEH91 = [ "deriving" ] -{-# LINE 974 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 977 "src/ehc/Scanner/Common.chs" #-} pUNSAFE , pTHREADSAFE , pDYNAMIC ,@@ -723,7 +726,7 @@ tokKeywStrsEH90 = [ ] tokKeywStrsHS90 = [ "unsafe", "threadsafe", "dynamic" ] -{-# LINE 1000 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 1003 "src/ehc/Scanner/Common.chs" #-} pFUSE , -- pWITH , pCONVERT@@ -736,7 +739,7 @@ tokKeywStrsEH93 = [ ] tokKeywStrsHS93 = [ "fuse", "convert" ] -{-# LINE 1014 "src/ehc/Scanner/Common.chs" #-}+{-# LINE 1017 "src/ehc/Scanner/Common.chs" #-} pLANGUAGE_prag , pOPTIONSUHC_prag , pDERIVABLE_prag ,
@@ -1,3 +1,3 @@ module UHC.Light.Compiler.SourceCodeSig where-sig = "874a73cc4ba0fcee3b7495148568c7fd"-timestamp = "20150120 +0100 124741"+sig = "7c7b581ae07ed474427db033b99658ee"+timestamp = "20150130 +0100 165219"
@@ -1,5 +1,5 @@ Name: uhc-light-Version: 1.1.8.4+Version: 1.1.8.5 License: BSD3 Copyright: Utrecht University, Department of Information and Computing Sciences, Software Technology group Build-Type: Simple @@ -12,7 +12,7 @@ Synopsis: Part of UHC packaged as cabal/hackage installable library Description: A 'light' variant of UHC including only an API and executables for compiling to Core representation (uhcl) and running CoreRun (uhcr). This version is just to test the infrastructure. Later versions will provide a fleshing out of the API and completion of the now rudimentary platform independent (Haskell) interpreted running etc.. Cabal-Version: >= 1.8-data-files: 103/lib/ag/AnaDomain/AbsSyn.ag,103/lib/ag/Cmm/AbsSyn.ag,103/lib/ag/Core/AbsSyn.ag,103/lib/ag/CoreRun/AbsSyn.ag,103/lib/ag/EH/AbsSyn.ag,103/lib/ag/Error/AbsSyn.ag,103/lib/ag/Foreign/AbsSyn.ag,103/lib/ag/GrinByteCode/AbsSyn.ag,103/lib/ag/GrinCode/AbsSyn.ag,103/lib/ag/HS/AbsSyn.ag,103/lib/ag/JavaScript/AbsSyn.ag,103/lib/ag/JVMClass/AbsSyn.ag,103/lib/ag/LLVM/AbsSyn.ag,103/lib/ag/Silly/AbsSyn.ag,103/lib/ag/Ty/AbsSyn.ag,103/lib/ag/TyCore/AbsSyn.ag,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.cr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi,103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/CompileAll,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/include/consUtils.h,103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.8.4/103/cr/plain/Unsafe/Coerce.hi +data-files: 103/lib/ag/AnaDomain/AbsSyn.ag,103/lib/ag/Cmm/AbsSyn.ag,103/lib/ag/Core/AbsSyn.ag,103/lib/ag/CoreRun/AbsSyn.ag,103/lib/ag/EH/AbsSyn.ag,103/lib/ag/Error/AbsSyn.ag,103/lib/ag/Foreign/AbsSyn.ag,103/lib/ag/GrinByteCode/AbsSyn.ag,103/lib/ag/GrinCode/AbsSyn.ag,103/lib/ag/HS/AbsSyn.ag,103/lib/ag/JavaScript/AbsSyn.ag,103/lib/ag/JVMClass/AbsSyn.ag,103/lib/ag/LLVM/AbsSyn.ag,103/lib/ag/Silly/AbsSyn.ag,103/lib/ag/Ty/AbsSyn.ag,103/lib/ag/TyCore/AbsSyn.ag,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.cr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi,103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/CompileAll,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/include/consUtils.h,103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.8.5/103/cr/plain/Unsafe/Coerce.hi extra-source-files: changelog.md Library@@ -24,12 +24,12 @@ Executable uhcl Hs-Source-Dirs: src-main - Build-Depends: uhc-light==1.1.8.4, fgl,hashable>=1.1&&<1.3,uhc-util>=0.1.3.7,base>=4&&<5,vector,syb,uulib,network,binary,mtl,directory,containers,array,process,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale+ Build-Depends: uhc-light==1.1.8.5, fgl,hashable>=1.1&&<1.3,uhc-util>=0.1.3.7,base>=4&&<5,vector,syb,uulib,network,binary,mtl,directory,containers,array,process,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale Extensions: RankNTypes,MultiParamTypeClasses,FunctionalDependencies,UndecidableInstances,DeriveDataTypeable,OverlappingInstances,LiberalTypeSynonyms,StandaloneDeriving,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,ScopedTypeVariables Main-Is: EHC.hs Executable uhcr Hs-Source-Dirs: src-main - Build-Depends: uhc-light==1.1.8.4, fgl,hashable>=1.1&&<1.3,uhc-util>=0.1.3.7,base>=4&&<5,vector,syb,uulib,network,binary,mtl,directory,containers,array,process,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale+ Build-Depends: uhc-light==1.1.8.5, fgl,hashable>=1.1&&<1.3,uhc-util>=0.1.3.7,base>=4&&<5,vector,syb,uulib,network,binary,mtl,directory,containers,array,process,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale Extensions: RankNTypes,MultiParamTypeClasses,FunctionalDependencies,UndecidableInstances,DeriveDataTypeable,OverlappingInstances,LiberalTypeSynonyms,StandaloneDeriving,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,ScopedTypeVariables Main-Is: EHCRun.hs