uhc-light 1.1.7.0 → 1.1.7.1
raw patch · 268 files changed
+3256/−3020 lines, 268 filesdep ~uhc-lightbinary-added
Dependency ranges changed: uhc-light
Files
- 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.hi 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.hi 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.hi 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.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.hi 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.hi 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.hi 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.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.hi 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.hi 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.hi 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.hi binary
- 103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config +1/−1
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Control/Monad.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Control/Monad.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Either.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Either.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/IORef.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/IORef.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/List.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/List.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Maybe.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Maybe.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Typeable.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Typeable.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Debug/Trace.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Debug/Trace.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Error.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Error.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Fix.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Fix.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Unsafe.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Unsafe.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Array.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Array.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Base.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Base.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bounded.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bounded.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/BoxArray.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/BoxArray.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Enum.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Enum.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Eq.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Eq.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Float.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Float.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/GC.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/GC.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics/Tuple.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics/Tuple.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Handle.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Handle.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IOBase.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IOBase.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ix.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ix.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/LazyST.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/LazyST.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MVar.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MVar.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MutVar.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MutVar.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/OldException.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/OldException.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ord.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ord.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Prims.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Prims.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Read.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Read.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Real.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Real.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Run.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Run.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/ST.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/ST.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/STRef.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/STRef.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Show.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Show.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StackTrace.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StackTrace.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Types.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Types.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Weak.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Weak.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/WeakPtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/WeakPtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Unsafe/Coerce.cr binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Unsafe/Coerce.hi binary
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/CTypes.h +0/−231
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/HsBase.h +0/−757
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/HsBaseConfig.h +0/−944
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/IntLikeInstance.h +0/−242
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/MachDeps.h +0/−125
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/TupleInstance.h +0/−147
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/Typeable.h +0/−149
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/dirUtils.h +0/−11
- 103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/installed-pkg-config +0/−2
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Control/Monad.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Control/Monad.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Either.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Either.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/IORef.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/IORef.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/List.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/List.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Maybe.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Maybe.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Typeable.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Typeable.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Debug/Trace.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Debug/Trace.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Error.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Error.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Fix.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Fix.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Unsafe.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Unsafe.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Array.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Array.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Base.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Base.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bits.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bits.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bounded.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bounded.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/BoxArray.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/BoxArray.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Char.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Char.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Enum.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Enum.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Eq.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Eq.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Float.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Float.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/GC.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/GC.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics/Tuple.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics/Tuple.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Handle.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Handle.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IO.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IO.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IOBase.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IOBase.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ix.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ix.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/LazyST.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/LazyST.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MVar.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MVar.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MutVar.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MutVar.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/OldException.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/OldException.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ord.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ord.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Prims.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Prims.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ptr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ptr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Read.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Read.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Real.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Real.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Run.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Run.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/ST.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/ST.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/STRef.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/STRef.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Show.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Show.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StablePtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StablePtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StackTrace.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StackTrace.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Types.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Types.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Weak.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Weak.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/WeakPtr.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/WeakPtr.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Unsafe/Coerce.cr binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Unsafe/Coerce.hi binary
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/CTypes.h +231/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/HsBase.h +757/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/HsBaseConfig.h +944/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/IntLikeInstance.h +242/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/MachDeps.h +125/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/TupleInstance.h +147/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/Typeable.h +149/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/dirUtils.h +11/−0
- 103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/installed-pkg-config +2/−0
- changelog.md +10/−0
- src/EHC.hs +23/−18
- src/UHC/Light/Compiler/AbstractCore.hs +155/−112
- src/UHC/Light/Compiler/Base/HsName.hs +63/−61
- src/UHC/Light/Compiler/Config.hs +29/−66
- src/UHC/Light/Compiler/ConfigInstall.hs +1/−1
- src/UHC/Light/Compiler/Core/API.hs +206/−0
- src/UHC/Light/Compiler/CoreRun/Prim.hs +34/−34
- src/UHC/Light/Compiler/CoreRun/Run.hs +2/−2
- src/UHC/Light/Compiler/CoreRun/Run/Val.hs +38/−34
- src/UHC/Light/Compiler/CoreRun/Run/Val/Prim.hs +34/−34
- src/UHC/Light/Compiler/Opts.hs +32/−31
- src/UHC/Light/Compiler/Opts/Base.hs +12/−11
- src/UHC/Light/Compiler/SourceCodeSig.hs +2/−2
- uhc-light.cabal +5/−4
binary file changed (6272 → 6272 bytes)
@@ -1,2 +1,2 @@ exposed-modules: Data.Array-build-depends: uhcbase-1.1.7.0 base-3.0.0.0+build-depends: uhcbase-1.1.7.1 base-3.0.0.0
binary file changed (115937 → 115937 bytes)
binary file changed (140150 → 140150 bytes)
binary file changed (10045 → 10045 bytes)
binary file changed (18302 → 18302 bytes)
binary file changed (13430 → 13430 bytes)
binary file changed (7497 → 7497 bytes)
binary file changed (8458 → 8458 bytes)
binary file changed (4493 → 4493 bytes)
binary file changed (229580 → 229580 bytes)
binary file changed (49047 → 49047 bytes)
binary file changed (40290 → 40290 bytes)
binary file changed (28461 → 28461 bytes)
binary file changed (3879 → 3879 bytes)
binary file changed (32505 → 32505 bytes)
binary file changed (4931 → 4931 bytes)
binary file changed (4378 → 4378 bytes)
binary file changed (182317 → 182317 bytes)
binary file changed (5745 → 5745 bytes)
binary file changed (6454 → 6454 bytes)
binary file changed (7763 → 7763 bytes)
binary file changed (121684 → 121684 bytes)
binary file changed (79702 → 79702 bytes)
binary file changed (6620 → 6620 bytes)
binary file changed (64078 → 64078 bytes)
binary file changed (77868 → 77868 bytes)
binary file changed (5235 → 5235 bytes)
binary file changed (69305 → 69305 bytes)
binary file changed (27804 → 27804 bytes)
binary file changed (4498 → 4498 bytes)
binary file changed (49978 → 49978 bytes)
binary file changed (5464 → 5464 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.7.0+build-depends: uhcbase-1.1.7.1
binary file changed (59091 → absent bytes)
binary file changed (27704 → absent bytes)
binary file changed (81372 → absent bytes)
binary file changed (24833 → absent bytes)
binary file changed (10825 → absent bytes)
binary file changed (5668 → absent bytes)
binary file changed (6281 → absent bytes)
binary file changed (3864 → absent bytes)
binary file changed (3141 → absent bytes)
binary file changed (3315 → absent bytes)
binary file changed (201336 → absent bytes)
binary file changed (46537 → absent bytes)
binary file changed (7780 → absent bytes)
binary file changed (4487 → absent bytes)
binary file changed (169212 → absent bytes)
binary file changed (112734 → absent bytes)
binary file changed (2867 → absent bytes)
binary file changed (4479 → absent bytes)
binary file changed (79 → absent bytes)
binary file changed (3275 → absent bytes)
binary file changed (85 → absent bytes)
binary file changed (2259 → absent bytes)
binary file changed (18976 → absent bytes)
binary file changed (14489 → absent bytes)
binary file changed (28338 → absent bytes)
binary file changed (16760 → absent bytes)
binary file changed (4530 → absent bytes)
binary file changed (2294 → absent bytes)
binary file changed (837 → absent bytes)
binary file changed (1984 → absent bytes)
binary file changed (213566 → absent bytes)
binary file changed (64563 → absent bytes)
binary file changed (2078435 → absent bytes)
binary file changed (950228 → absent bytes)
binary file changed (12611 → absent bytes)
binary file changed (5335 → absent bytes)
binary file changed (120455 → absent bytes)
binary file changed (60961 → absent bytes)
binary file changed (28944 → absent bytes)
binary file changed (21229 → absent bytes)
binary file changed (5135 → absent bytes)
binary file changed (1288 → absent bytes)
binary file changed (8006 → absent bytes)
binary file changed (4111 → absent bytes)
binary file changed (105761 → absent bytes)
binary file changed (66535 → absent bytes)
binary file changed (58714 → absent bytes)
binary file changed (4807 → absent bytes)
binary file changed (590 → absent bytes)
binary file changed (1259 → absent bytes)
binary file changed (80 → absent bytes)
binary file changed (16434 → absent bytes)
binary file changed (660557 → absent bytes)
binary file changed (421098 → absent bytes)
binary file changed (17509 → absent bytes)
binary file changed (11367 → absent bytes)
binary file changed (14891 → absent bytes)
binary file changed (5975 → absent bytes)
binary file changed (274123 → absent bytes)
binary file changed (144192 → absent bytes)
binary file changed (75678 → absent bytes)
binary file changed (30408 → absent bytes)
binary file changed (36826 → absent bytes)
binary file changed (23239 → absent bytes)
binary file changed (28104 → absent bytes)
binary file changed (10285 → absent bytes)
binary file changed (17943 → absent bytes)
binary file changed (10662 → absent bytes)
binary file changed (11890 → absent bytes)
binary file changed (5421 → absent bytes)
binary file changed (68498 → absent bytes)
binary file changed (21837 → absent bytes)
binary file changed (190958 → absent bytes)
binary file changed (73547 → absent bytes)
binary file changed (24620 → absent bytes)
binary file changed (21209 → absent bytes)
binary file changed (87049 → absent bytes)
binary file changed (17136 → absent bytes)
binary file changed (7105 → absent bytes)
binary file changed (1916 → absent bytes)
binary file changed (11220 → absent bytes)
binary file changed (5056 → absent bytes)
binary file changed (47041 → absent bytes)
binary file changed (31438 → absent bytes)
binary file changed (22339 → absent bytes)
binary file changed (15348 → absent bytes)
binary file changed (151045 → absent bytes)
binary file changed (36709 → absent bytes)
binary file changed (21369 → absent bytes)
binary file changed (16107 → absent bytes)
binary file changed (82 → absent bytes)
binary file changed (1380 → absent bytes)
binary file changed (67715 → absent bytes)
binary file changed (51972 → absent bytes)
binary file changed (26369 → absent bytes)
binary file changed (18131 → absent bytes)
binary file changed (13344 → absent bytes)
binary file changed (9775 → absent bytes)
binary file changed (81 → 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 → 59091 bytes)
binary file changed (absent → 27704 bytes)
binary file changed (absent → 81372 bytes)
binary file changed (absent → 24833 bytes)
binary file changed (absent → 10825 bytes)
binary file changed (absent → 5668 bytes)
binary file changed (absent → 6281 bytes)
binary file changed (absent → 3864 bytes)
binary file changed (absent → 3141 bytes)
binary file changed (absent → 3315 bytes)
binary file changed (absent → 201336 bytes)
binary file changed (absent → 46537 bytes)
binary file changed (absent → 7780 bytes)
binary file changed (absent → 4487 bytes)
binary file changed (absent → 169212 bytes)
binary file changed (absent → 112734 bytes)
binary file changed (absent → 2867 bytes)
binary file changed (absent → 4479 bytes)
binary file changed (absent → 79 bytes)
binary file changed (absent → 3275 bytes)
binary file changed (absent → 85 bytes)
binary file changed (absent → 2259 bytes)
binary file changed (absent → 18976 bytes)
binary file changed (absent → 14489 bytes)
binary file changed (absent → 28338 bytes)
binary file changed (absent → 16760 bytes)
binary file changed (absent → 4530 bytes)
binary file changed (absent → 2294 bytes)
binary file changed (absent → 837 bytes)
binary file changed (absent → 1984 bytes)
binary file changed (absent → 213566 bytes)
binary file changed (absent → 64563 bytes)
binary file changed (absent → 2078435 bytes)
binary file changed (absent → 950228 bytes)
binary file changed (absent → 12611 bytes)
binary file changed (absent → 5335 bytes)
binary file changed (absent → 120455 bytes)
binary file changed (absent → 60961 bytes)
binary file changed (absent → 28944 bytes)
binary file changed (absent → 21229 bytes)
binary file changed (absent → 5135 bytes)
binary file changed (absent → 1288 bytes)
binary file changed (absent → 8006 bytes)
binary file changed (absent → 4111 bytes)
binary file changed (absent → 105761 bytes)
binary file changed (absent → 66535 bytes)
binary file changed (absent → 58714 bytes)
binary file changed (absent → 4807 bytes)
binary file changed (absent → 590 bytes)
binary file changed (absent → 1259 bytes)
binary file changed (absent → 80 bytes)
binary file changed (absent → 16434 bytes)
binary file changed (absent → 660557 bytes)
binary file changed (absent → 421402 bytes)
binary file changed (absent → 17509 bytes)
binary file changed (absent → 11367 bytes)
binary file changed (absent → 14891 bytes)
binary file changed (absent → 5975 bytes)
binary file changed (absent → 274123 bytes)
binary file changed (absent → 144192 bytes)
binary file changed (absent → 75678 bytes)
binary file changed (absent → 30408 bytes)
binary file changed (absent → 36826 bytes)
binary file changed (absent → 23239 bytes)
binary file changed (absent → 28104 bytes)
binary file changed (absent → 10285 bytes)
binary file changed (absent → 17943 bytes)
binary file changed (absent → 10662 bytes)
binary file changed (absent → 11890 bytes)
binary file changed (absent → 5421 bytes)
binary file changed (absent → 68502 bytes)
binary file changed (absent → 21837 bytes)
binary file changed (absent → 190958 bytes)
binary file changed (absent → 73547 bytes)
binary file changed (absent → 24620 bytes)
binary file changed (absent → 21209 bytes)
binary file changed (absent → 87049 bytes)
binary file changed (absent → 17136 bytes)
binary file changed (absent → 7105 bytes)
binary file changed (absent → 1916 bytes)
binary file changed (absent → 11220 bytes)
binary file changed (absent → 5056 bytes)
binary file changed (absent → 47041 bytes)
binary file changed (absent → 31438 bytes)
binary file changed (absent → 22339 bytes)
binary file changed (absent → 15348 bytes)
binary file changed (absent → 151045 bytes)
binary file changed (absent → 36709 bytes)
binary file changed (absent → 21369 bytes)
binary file changed (absent → 16107 bytes)
binary file changed (absent → 82 bytes)
binary file changed (absent → 1380 bytes)
binary file changed (absent → 67715 bytes)
binary file changed (absent → 51972 bytes)
binary file changed (absent → 26369 bytes)
binary file changed (absent → 18131 bytes)
binary file changed (absent → 13344 bytes)
binary file changed (absent → 9775 bytes)
binary file changed (absent → 81 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:
@@ -0,0 +1,10 @@+# Changelog++## 1.1.7.1 - 20141119++- [api] Initial Core.API ([#31](https://github.com/UU-ComputerScience/uhc/pull/31)).+- [feature] Start with changelog.++## 1.1.7.0 - 20141118++- [feature] Initial cabal/hackage distribution tryout.
@@ -98,7 +98,7 @@ ImmediateQuitOption_Help -> do { let progName = fpathToStr (ehcProgName opts)- ; let inputSuffixes = catMaybes $ map fst $ mkFileSuffMpHs opts+ ; let inputSuffixes = catMaybes [ s | (s,_,vis) <- mkFileSuffMpHs opts, vis ] ; putStrLn (usageInfo ( "version: " ++ Cfg.verInfo Cfg.version ++ ", aspects: " ++ ehcOptAspects opts ++ "\n\nUsage: " ++ progName ++ " [options] [file[" ++ (concat $ intersperse "|" $ map ('.':) inputSuffixes) ++ "] ...]\n\noptions:" )@@ -145,40 +145,45 @@ ; putStrLn d } -{-# LINE 271 "src/ehc/EHC.chs" #-}-type FileSuffMp = [(FileSuffix,EHCompileUnitState)]+{-# LINE 269 "src/ehc/EHC.chs" #-}+type FileSuffMp =+ [( FileSuffix -- suffix+ , EHCompileUnitState -- initial state+ , Bool -- visible from commandline+ )] +-- | Allowed suffixes, order is significant. mkFileSuffMpHs :: EHCOpts -> FileSuffMp mkFileSuffMpHs opts- = [ ( Just "hs" , ECUS_Haskell HSStart )- , ( Just "lhs" , ECUS_Haskell LHSStart )- , ( Just "eh" , ECUS_Eh EHStart )- , ( Just "hi" , ECUS_Haskell HIStart )- , ( Just Cfg.suffixDotlessInputOutputTextualCore, ECUS_Core CRStartText )- , ( Just Cfg.suffixDotlessInputOutputBinaryCore , ECUS_Core CRStartBinary )- , ( Just Cfg.suffixDotlessBinaryCore , ECUS_Core CRStartBinary )+ = [ ( Just "hs" , ECUS_Haskell HSStart, True )+ , ( Just "lhs" , ECUS_Haskell LHSStart, True )+ , ( Just "eh" , ECUS_Eh EHStart, True )+ , ( Just "hi" , ECUS_Haskell HIStart, False )+ , ( Just Cfg.suffixDotlessInputOutputTextualCore, ECUS_Core CRStartText, True )+ , ( Just Cfg.suffixDotlessInputOutputBinaryCore , ECUS_Core CRStartBinary, True )+ , ( Just Cfg.suffixDotlessBinaryCore , ECUS_Core CRStartBinary, False ) ] ++ (if targetIsOnUnixAndOrC (ehcOptTarget opts)- then [ ( Just "c" , ECUS_C CStart )- , ( Just "o" , ECUS_O OStart )+ then [ ( Just "c" , ECUS_C CStart, True )+ , ( Just "o" , ECUS_O OStart, True ) ] else [] ) -{-# LINE 306 "src/ehc/EHC.chs" #-}+{-# LINE 309 "src/ehc/EHC.chs" #-} -- Suffix map for empty suffix, defaults to .hs fileSuffMpHsNoSuff :: FileSuffMp fileSuffMpHsNoSuff- = [ ( Nothing , ECUS_Haskell HSStart )+ = [ ( Nothing , ECUS_Haskell HSStart, False ) ] -{-# LINE 386 "src/ehc/EHC.chs" #-}+{-# LINE 389 "src/ehc/EHC.chs" #-} doCompilePrepare :: [String] -> EHCOpts -> IO (Maybe (EHCOpts,[FPath],[HsName],EHCompileRun)) doCompilePrepare fnL@(fn:_) opts = do { let fpL@(fp:_) = map (mkTopLevelFPath "hs") fnL topModNmL@(topModNm:_) = map (mkHNm . fpathBase) fpL- installVariant = Cfg.installVariant opts- ; installRoot <- Cfg.installRootM opts+ -- installVariant = Cfg.installVariant opts+ -- ; installRoot <- Cfg.installRootM opts -- ; userDir <- ehcenvDir (Cfg.verFull Cfg.version) -- ; let opts2 = opts -- {ehcOptUserDir = userDir} ; pkgDb1 <- pkgDbFromDirs opts@@ -364,7 +369,7 @@ imp1 :: EHCOpts -> FileSuffMp -> FileLocPath -> EHCompileUnitState -> Maybe FPath -> Maybe (HsName,(FPath,FileLoc)) -> HsName -> EHCompilePhase (HsName,Maybe (HsName,(FPath,FileLoc))) imp1 opts fileSuffMpHs searchPath desiredState mbFp mbPrev nm = do { let isTopModule = isJust mbFp- fileSuffMpHs' = (if isTopModule then fileSuffMpHsNoSuff else []) ++ fileSuffMpHs+ fileSuffMpHs' = map tup123to12 $ (if isTopModule then fileSuffMpHsNoSuff else []) ++ fileSuffMpHs ; let searchPath' = adaptedSearchPath mbPrev ; fpsFound <- cpFindFilesForFPathInLocations (fileLocSearch opts) (\(x,_,_) -> x) False fileSuffMpHs' searchPath' (Just nm) mbFp ; when (ehcOptVerbosity opts >= VerboseDebug)
@@ -157,10 +157,13 @@ acoreCast :: ty -> expr -> expr acoreCast _ e = e - -- | case, with possible default- acoreCaseDflt :: expr -> [alt] -> Maybe expr -> expr+ -- | A Case expression, possibly with a default value.+ acoreCaseDflt :: expr -- ^ The scrutinee. Required to be in WHNF.+ -> [alt] -- ^ The alternatives.+ -> Maybe expr -- ^ The default value. (TODO what is the behaviour if it is Nothing?)+ -> expr - -- | var+ -- | Creates a variable expression. acoreVar :: HsName -> expr -- | string@@ -200,8 +203,11 @@ -- | pat var, with type acorePatVarTy :: HsName -> ty -> pat - -- | pat con- acorePatCon :: CTag -> patrest -> [patfld] -> pat+ -- | Matches the case scrutinee with the given constructor tag.+ acorePatCon :: CTag -- ^ The constructor to match.+ -> patrest -- ^ ???+ -> [patfld] -- ^ ???+ -> pat -- | pat int acorePatIntTy :: ty -> Int -> pat@@ -215,20 +221,24 @@ -- | pat boolean guard acorePatBoolExpr :: expr -> pat ------------------------- constructing: pat field -------------------------- -- | pat field- acorePatFldBind :: (HsName,expr) -> bind -> patfld+ -- | TODO ??? pat field+ acorePatFldBind :: (HsName,expr) -- ^ lbl, offset ???+ -> bind -- ^ ??+ -> patfld -- acorePatFldTy :: ty -> (HsName,expr) -> HsName -> patfld ------------------------- constructing: patrest -------------------------- -- | patrest, empty+ -- | patrest, empty TODO what does it mean? acorePatRestEmpty :: patrest -- | patrest, var acorePatRestVar :: HsName -> patrest ------------------------- constructing: alt -------------------------- -- | 1 arg application, together with meta info about the argument- acoreAlt :: pat -> expr -> alt+ -- | Creates an alternative of a case statement.+ acoreAlt :: pat -- ^ The pattern with which to match the case scrutinee.+ -> expr -- ^ The value of this alternative.+ -> alt ------------------------- type related ------------------------- -- | construct ty from Ty, usable in Core context@@ -347,10 +357,10 @@ acoreExprIsCoeArg :: expr -> Bool -{-# LINE 301 "src/ehc/AbstractCore.chs" #-}+{-# LINE 311 "src/ehc/AbstractCore.chs" #-} type ACoreAppLikeMetaBound = (ACoreBindAspectKeyS,MetaLev,CLbl) -{-# LINE 305 "src/ehc/AbstractCore.chs" #-}+{-# LINE 315 "src/ehc/AbstractCore.chs" #-} instance AbstractCore e m b bound boundmeta bcat mbind t p pr pf a => AppLike e boundmeta {- () () -} where app1App = acore1App appTop = id@@ -367,22 +377,22 @@ (_,a) <- acoreBoundMbVal b return (f,a) -{-# LINE 336 "src/ehc/AbstractCore.chs" #-}+{-# LINE 346 "src/ehc/AbstractCore.chs" #-} instance AbstractCore e m b bound boundmeta bcat mbind t p pr pf a => RecLike e boundmeta {- () () -} where recRow _ fs = acoreTagTyTupBound CTagRec (acoreTyErr "AbstractCore.RecLike.recRow") [ acoreBound1MetaVal (acoreBoundmeta acbaspkeyDefault 0 (CLbl_Nm n)) e | (n,e) <- fs ] recMbRecRow _= Nothing -- tyMbRecRowWithLkup (const Nothing) recUnRowExts e= (e,[]) -{-# LINE 348 "src/ehc/AbstractCore.chs" #-}+{-# LINE 358 "src/ehc/AbstractCore.chs" #-} acoreMetaLift :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a, Functor f) => f x -> f (x,m) acoreMetaLift = fmap2Tuple acoreMetavalDflt -{-# LINE 353 "src/ehc/AbstractCore.chs" #-}+{-# LINE 363 "src/ehc/AbstractCore.chs" #-} acoreMetaLiftDict :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a, Functor f) => f x -> f (x,m) acoreMetaLiftDict = fmap2Tuple acoreMetavalDfltDict -{-# LINE 363 "src/ehc/AbstractCore.chs" #-}+{-# LINE 373 "src/ehc/AbstractCore.chs" #-} -- | A ACoreBindAspectKeyS formed out of multiple ACoreBindAspectKey identifies a particular binding aspect data ACoreBindAspectKey = ACoreBindAspectKey_Default -- identifies the default binding, if omitted in a reference this aspect is the one chosen.@@ -412,11 +422,11 @@ acbaspkeyMk :: [ACoreBindAspectKey] -> ACoreBindAspectKeyS acbaspkeyMk = Set.fromList -{-# LINE 404 "src/ehc/AbstractCore.chs" #-}+{-# LINE 414 "src/ehc/AbstractCore.chs" #-} acbaspkeyMetaLev :: MetaLev -> ACoreBindAspectKeyS -> MetaLev acbaspkeyMetaLev mlev _ = mlev -{-# LINE 415 "src/ehc/AbstractCore.chs" #-}+{-# LINE 425 "src/ehc/AbstractCore.chs" #-} -- | predefined: acbaspkeyNone :: ACoreBindAspectKeyS acbaspkeyNone = acbaspkeyMk@@ -457,17 +467,17 @@ acbaspkeyDebug = acbaspkeyMk [ ACoreBindAspectKey_Debug ] -{-# LINE 474 "src/ehc/AbstractCore.chs" #-}+{-# LINE 484 "src/ehc/AbstractCore.chs" #-} -- | predefined: acbaspkeyFusionRole :: ACoreBindAspectKeyS acbaspkeyFusionRole = acbaspkeyMk [ ACoreBindAspectKey_FusionRole ] -{-# LINE 481 "src/ehc/AbstractCore.chs" #-}+{-# LINE 491 "src/ehc/AbstractCore.chs" #-} ppACBaspKeyS :: ACoreBindAspectKeyS -> PP_Doc ppACBaspKeyS = ppCurlysCommas . Set.toList -{-# LINE 486 "src/ehc/AbstractCore.chs" #-}+{-# LINE 496 "src/ehc/AbstractCore.chs" #-} -- | uniqify with ACoreBindAspectKeyS, omitting the default hsnUniqifyACoreBindAspectKeyS :: ACoreBindAspectKeyS -> HsName -> HsName hsnUniqifyACoreBindAspectKeyS as n@@ -475,11 +485,11 @@ where mk ACoreBindAspectKey_Strict = hsnUniqify HsNameUniqifier_Strict mk a = hsnUniqifyStr HsNameUniqifier_BindAspect (show a) -{-# LINE 495 "src/ehc/AbstractCore.chs" #-}+{-# LINE 505 "src/ehc/AbstractCore.chs" #-} deriving instance Typeable ACoreBindAspectKey deriving instance Data ACoreBindAspectKey -{-# LINE 504 "src/ehc/AbstractCore.chs" #-}+{-# LINE 514 "src/ehc/AbstractCore.chs" #-} -- | reference to binding aspect: name + aspect keys data ACoreBindRef = ACoreBindRef@@ -500,39 +510,43 @@ instance Show ACoreBindRef where show = show . mkHNm -{-# LINE 526 "src/ehc/AbstractCore.chs" #-}+{-# LINE 536 "src/ehc/AbstractCore.chs" #-} acbrefAspKey :: ACoreBindRef -> ACoreBindAspectKeyS acbrefAspKey = maybe acbaspkeyNone id . acbrefMbAspKey {-# INLINE acbrefAspKey #-} -{-# LINE 532 "src/ehc/AbstractCore.chs" #-}+{-# LINE 542 "src/ehc/AbstractCore.chs" #-} -- | narrow down aspects by adding more to ref; assume extra aspects non empty acbrefAspAnd :: ACoreBindAspectKeyS -> ACoreBindRef -> ACoreBindRef acbrefAspAnd a r = r {acbrefMbAspKey = Just $ a `Set.union` acbrefAspKey r } -{-# LINE 538 "src/ehc/AbstractCore.chs" #-}+{-# LINE 548 "src/ehc/AbstractCore.chs" #-} ppACoreBindRef :: (HsName -> PP_Doc) -> ACoreBindRef -> PP_Doc ppACoreBindRef ppN r = ppN (acbrefNm r) >|< (maybe empty (ppCurlysCommas . Set.toList) $ acbrefMbAspKey r) instance PP ACoreBindRef where pp = ppACoreBindRef pp -{-# LINE 546 "src/ehc/AbstractCore.chs" #-}+{-# LINE 556 "src/ehc/AbstractCore.chs" #-} deriving instance Typeable ACoreBindRef deriving instance Data ACoreBindRef -{-# LINE 555 "src/ehc/AbstractCore.chs" #-}+{-# LINE 565 "src/ehc/AbstractCore.chs" #-} acore1App :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => e -> e -> e acore1App f a = acore1AppBound f (acoreBound1Val a) {-# INLINE acore1App #-} -acoreApp :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => e -> [e] -> e+-- | Applies the first expression to all given arguments.+acoreApp :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => e -- ^ The lambda to apply.+ -> [e] -- ^ The arguments (the empty list is allowed).+ -> e acoreApp f as = foldl (\f a -> acore1App f a) f as acoreAppBound :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => e -> [bound] -> e acoreAppBound f as = foldl (\f a -> acore1AppBound f a) f as -{-# LINE 571 "src/ehc/AbstractCore.chs" #-}+{-# LINE 585 "src/ehc/AbstractCore.chs" #-} acoreLamBind :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => [b] -> e -> e acoreLamBind = flip (foldr acoreLam1Bind) {-# INLINE acoreLamBind #-}@@ -553,10 +567,11 @@ acoreLam :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => [HsName] -> e -> e acoreLam as e = foldr (\(n) e -> acoreLam1 n e) e as -{-# LINE 593 "src/ehc/AbstractCore.chs" #-}+{-# LINE 607 "src/ehc/AbstractCore.chs" #-} acoreTagTupTy :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => CTag -> t -> [e] -> e acoreTagTupTy tg t es = acoreTagTyTupBound tg t $ map acoreBound1Val es +-- | Creates a new tuple/record with the given values. acoreTagTup :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => CTag -> [e] -> e acoreTagTup tg es = acoreTagTupTy tg (acoreTyErr "acoreTupTy") es @@ -572,7 +587,7 @@ acoreTag tg = acoreTagTup tg [] {-# INLINE acoreTag #-} -{-# LINE 624 "src/ehc/AbstractCore.chs" #-}+{-# LINE 639 "src/ehc/AbstractCore.chs" #-} acoreBind1CatLevMetaTyWith :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => (t->t) -> (e->e) -> bcat -> HsName -> MetaLev -> m -> t -> e -> b acoreBind1CatLevMetaTyWith mkT mkE cat n l m t e = acoreBind1CatLevMetasTy cat n l (acoreMetabindDflt,m) (mkT t) (mkE e) {-# INLINE acoreBind1CatLevMetaTyWith #-}@@ -609,7 +624,7 @@ acoreBind1 n e = acoreBind1Cat (acoreBindcategDflt e) n e {-# INLINE acoreBind1 #-} -{-# LINE 662 "src/ehc/AbstractCore.chs" #-}+{-# LINE 677 "src/ehc/AbstractCore.chs" #-} acoreBind1MetasTy :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> (mbind,m) -> t -> e -> b acoreBind1MetasTy n m t e = acoreBind1CatLevMetasTy (acoreBindcategDflt e) n metaLevVal m t e {-# INLINE acoreBind1MetasTy #-}@@ -635,7 +650,7 @@ -} -{-# LINE 689 "src/ehc/AbstractCore.chs" #-}+{-# LINE 704 "src/ehc/AbstractCore.chs" #-} acoreBind1Asp1 :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> bound -> b acoreBind1Asp1 n ba = acoreBind1Asp n [ba] {-# INLINE acoreBind1Asp1 #-}@@ -652,7 +667,7 @@ acoreBind1Nm1 n = acoreBind1Asp n [] {-# INLINE acoreBind1Nm1 #-} -{-# LINE 711 "src/ehc/AbstractCore.chs" #-}+{-# LINE 726 "src/ehc/AbstractCore.chs" #-} acoreBoundVal1CatLevMetaTy :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => bcat -> HsName -> MetaLev -> m -> t -> e -> bound acoreBoundVal1CatLevMetaTy bcat n mlev m t e = acoreBoundVal1CatLevMetasTy bcat n mlev (acoreMetabindDflt,m) t e {-# INLINE acoreBoundVal1CatLevMetaTy #-}@@ -673,7 +688,7 @@ acoreBoundVal1Cat cat n e = acoreBoundVal1CatTy cat n (acoreTyErr "acoreBoundVal1Cat") e {-# INLINE acoreBoundVal1Cat #-} -{-# LINE 733 "src/ehc/AbstractCore.chs" #-}+{-# LINE 748 "src/ehc/AbstractCore.chs" #-} acoreBoundVal1Metas :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> (mbind,m) -> e -> bound acoreBoundVal1Metas n m e = acoreBoundVal1CatLevMetasTy (acoreBindcategDflt e) n metaLevVal m (acoreTyErr "acoreBoundVal1Metas") e {-# INLINE acoreBoundVal1Metas #-}@@ -683,7 +698,7 @@ {-# INLINE acoreBoundVal1Meta #-} -{-# LINE 744 "src/ehc/AbstractCore.chs" #-}+{-# LINE 759 "src/ehc/AbstractCore.chs" #-} acoreBound1AspkeyVal :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => ACoreBindAspectKeyS -> e -> bound acoreBound1AspkeyVal a e = acoreBound1MetaVal (acoreBoundmeta a 0 CLbl_None) e {-# INLINE acoreBound1AspkeyVal #-}@@ -692,12 +707,12 @@ acoreBound1Val e = acoreBound1AspkeyVal acbaspkeyDefault e {-# INLINE acoreBound1Val #-} -{-# LINE 764 "src/ehc/AbstractCore.chs" #-}+{-# LINE 779 "src/ehc/AbstractCore.chs" #-} acoreTyErrLift :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a, Functor f) => String -> f x -> f (x,t) acoreTyErrLift msg = fmap (\n -> (n,acoreTyErr msg)) {-# INLINE acoreTyErrLift #-} -{-# LINE 774 "src/ehc/AbstractCore.chs" #-}+{-# LINE 789 "src/ehc/AbstractCore.chs" #-} -- | Construct let, possibly merging bindings acoreLetMerge :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Bool -> bcat -> [b] -> e -> e acoreLetMerge merge c bs e@@ -721,35 +736,49 @@ acoreLet c bs e = acoreLetMerge False c bs e {-# INLINE acoreLet #-} -acoreLetRec :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => [b] -> e -> e+-- | Creates a let binding, where the bindings may be mutually recursive.+acoreLetRec :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => [b] -- ^ The bindings.+ -> e -- ^ The body.+ -> e acoreLetRec bs e = acoreLet (acoreBindcategRec) bs e {-# INLINE acoreLetRec #-} -{-# LINE 803 "src/ehc/AbstractCore.chs" #-}+{-# LINE 822 "src/ehc/AbstractCore.chs" #-} acoreLetN :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => [(bcat,[b])] -> e -> e acoreLetN cbs e = foldr (\(c,bs) e -> acoreLet c bs e) e cbs -{-# LINE 808 "src/ehc/AbstractCore.chs" #-}+{-# LINE 827 "src/ehc/AbstractCore.chs" #-} acoreLet1PlainTy :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> t -> e -> e -> e acoreLet1PlainTy nm t e = acoreLet cat [acoreBind1CatTy cat nm t e] where cat = acoreBindcategPlain -acoreLet1Plain :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> e -> e -> e+-- | Creates a (non-recursive) let binding.+acoreLet1Plain :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => HsName -- ^ The identifier.+ -> e -- ^ The expression to bind.+ -> e -- ^ The body.+ -> e acoreLet1Plain nm e = acoreLet1PlainTy nm (acoreTyErr "acoreLet1Plain") e {-# INLINE acoreLet1Plain #-} -{-# LINE 819 "src/ehc/AbstractCore.chs" #-}+{-# LINE 843 "src/ehc/AbstractCore.chs" #-} acoreLet1StrictTy :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> t -> e -> e -> e acoreLet1StrictTy nm t e = acoreLet cat [acoreBind1CatTy cat nm t e] where cat = acoreBindcategStrict -acoreLet1Strict :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> e -> e -> e+-- | Creates a let binding, which is strict in the bound expression.+acoreLet1Strict :: (Eq bcat, AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => HsName -- ^ The identifer.+ -> e -- ^ The expression to bind. Will be evaluated to WHNF, before the body is evaluated.+ -> e -- ^ The body.+ -> e acoreLet1Strict nm e = acoreLet1StrictTy nm (acoreTyErr "acoreLet1Strict") e {-# INLINE acoreLet1Strict #-} -{-# LINE 830 "src/ehc/AbstractCore.chs" #-}+{-# LINE 859 "src/ehc/AbstractCore.chs" #-} -- | evaluate an expr, with a continuation for the evaluated expr acoreLet1StrictInMetaTyWith :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => (t->t) -> (e->e) -> HsName -> m -> t -> e -> (e -> e) -> e acoreLet1StrictInMetaTyWith mkT mkE nm m t e mkC@@ -776,34 +805,35 @@ acoreLet1StrictIn nm e mkC = acoreLet1StrictInMeta nm acoreMetavalDflt e mkC {-# INLINE acoreLet1StrictIn #-} -{-# LINE 862 "src/ehc/AbstractCore.chs" #-}+{-# LINE 891 "src/ehc/AbstractCore.chs" #-} acoreNmHole :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => UID -> e acoreNmHole = acoreVar . mkHNm acoreNmHolePred :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => PredOccId -> e acoreNmHolePred = acoreNmHole . poiId -{-# LINE 874 "src/ehc/AbstractCore.chs" #-}+{-# LINE 903 "src/ehc/AbstractCore.chs" #-} -- | get default for bindcateg acoreBindcategDflt :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => e -> bcat acoreBindcategDflt _ = acoreBindcategPlain {-# INLINE acoreBindcategDflt #-} -{-# LINE 885 "src/ehc/AbstractCore.chs" #-}+{-# LINE 914 "src/ehc/AbstractCore.chs" #-} acoreChar :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Char -> e acoreChar opts i = let x = acoreCharTy (acoreTyChar opts) i in x +-- | Creates an `Int` constant. acoreInt :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Int -> e acoreInt opts i = let x = acoreIntTy (acoreTyInt opts) i in x acoreInt2 :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Integer -> e acoreInt2 opts i = let x = acoreIntTy2 (acoreTyInt opts) i in x -{-# LINE 900 "src/ehc/AbstractCore.chs" #-}+{-# LINE 930 "src/ehc/AbstractCore.chs" #-} acoreBuiltinApp :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> (EHBuiltinNames -> HsName) -> [e] -> e acoreBuiltinApp opts bnmOf args = acoreVar (ehcOptBuiltin opts bnmOf) `acoreApp` args -{-# LINE 905 "src/ehc/AbstractCore.chs" #-}+{-# LINE 935 "src/ehc/AbstractCore.chs" #-} acoreBuiltinAddInt :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> e -> Int -> e acoreBuiltinAddInt opts e i = if i == 0@@ -812,37 +842,50 @@ Just (t,i') -> acoreIntTy2 t (toInteger i + i') _ -> acoreBuiltinApp opts ehbnPrimAddInt [e,acoreInt opts i] -{-# LINE 915 "src/ehc/AbstractCore.chs" #-}+{-# LINE 945 "src/ehc/AbstractCore.chs" #-} acoreBuiltinGtInt :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> e -> Int -> e acoreBuiltinGtInt opts e i = acoreBuiltinApp opts ehbnPrimGtInt [e,acoreInt opts i] -{-# LINE 920 "src/ehc/AbstractCore.chs" #-}+{-# LINE 950 "src/ehc/AbstractCore.chs" #-} acoreBuiltinEqChar :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Char -> e -> e acoreBuiltinEqChar opts c e = acoreBuiltinApp opts ehbnPrimEqChar [e,acoreChar opts c] -{-# LINE 925 "src/ehc/AbstractCore.chs" #-}-acoreBuiltinString :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> String -> e+{-# LINE 955 "src/ehc/AbstractCore.chs" #-}+-- | Creates a string expression.+-- The expression represents a packed String, which can be passed to Haskell generated Core functions.+acoreBuiltinString :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => EHCOpts+ -> String -- ^ The string.+ -> e acoreBuiltinString opts m = let x = acoreBuiltinApp opts ehbnPackedStringToString [acoreStringTy (acoreTyString opts) m] in x -{-# LINE 930 "src/ehc/AbstractCore.chs" #-}-acoreBuiltinError :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> String -> e+{-# LINE 965 "src/ehc/AbstractCore.chs" #-}+-- | Generates an error expression, failing with the given string when evaluated. ('error' in haskell)+acoreBuiltinError :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => EHCOpts+ -> String -- ^ The error message.+ -> e acoreBuiltinError opts m = acoreBuiltinApp opts ehbnError [acoreBuiltinString opts m] +-- | Generates an undefined expression, failing when evaluated. ('undefined' in haskell) acoreBuiltinUndefined :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> e acoreBuiltinUndefined opts = acoreBuiltinApp opts ehbnUndefined [] -{-# LINE 938 "src/ehc/AbstractCore.chs" #-}--- | Builtin Integer-acoreBuiltinInteger :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Integer -> e+{-# LINE 978 "src/ehc/AbstractCore.chs" #-}+-- | Creates a Core 'Integer' constant.+acoreBuiltinInteger :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a)+ => EHCOpts+ -> Integer -- ^ The integer.+ -> e acoreBuiltinInteger opts i = acoreBuiltinApp opts ehbnPackedStringToInteger [acoreStringTy (acoreTyString opts) (show i)] -{-# LINE 944 "src/ehc/AbstractCore.chs" #-}+{-# LINE 987 "src/ehc/AbstractCore.chs" #-} -- | Builtin list singleton (note: hardcoded of tags) acoreBuiltinListSingleton :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> e -> e acoreBuiltinListSingleton opts e = acoreTagTupTy (ctagCons opts) (acoreTyErr "acoreBuiltinListSingleton.Cons") [e, acoreTagTupTy (ctagNil opts) (acoreTyErr "acoreBuiltinListSingleton.Nil") []] -{-# LINE 955 "src/ehc/AbstractCore.chs" #-}+{-# LINE 998 "src/ehc/AbstractCore.chs" #-} -- | when pat is con get tag acorePatConMbTag :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => p -> Maybe CTag acorePatConMbTag = fmap (\(tg,_,_) -> tg) . acorePatMbCon@@ -854,25 +897,25 @@ -- <|> (const ctagChar) <$> acorePatMbChar p ) . fst . acoreUnAlt -{-# LINE 972 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1015 "src/ehc/AbstractCore.chs" #-} -- | bound name of binding acoreBindNm :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => b -> HsName acoreBindNm = fst . acoreUnBind {-# INLINE acoreBindNm #-} -{-# LINE 983 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1026 "src/ehc/AbstractCore.chs" #-} -- | bound name of binding acorePatFldTy :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => t -> (HsName,e) -> HsName -> pf acorePatFldTy t lbloff n = acorePatFldBind lbloff (acoreBind1NmTy1 n t) {-# INLINE acorePatFldTy #-} -{-# LINE 994 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1037 "src/ehc/AbstractCore.chs" #-} -- | possible expr of bound (may panic) acoreUnBoundVal :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => bound -> e acoreUnBoundVal = maybe (panic "acoreBoundMbVal") (\(_,a) -> a) . acoreBoundMbVal {-# INLINE acoreUnBoundVal #-} -{-# LINE 1005 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1048 "src/ehc/AbstractCore.chs" #-} -- | Construct 'if' expression. Hardcoded: tag nr, ordered alts (by tag) acoreIf :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Maybe HsName -> e -> e -> e -> e acoreIf opts cn c t f@@ -884,12 +927,12 @@ Nothing {-(tcUndefined opts)-} ) -{-# LINE 1018 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1061 "src/ehc/AbstractCore.chs" #-} acoreMatchChar :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => EHCOpts -> Maybe HsName -> Char -> e -> e -> e -> e acoreMatchChar opts cn cchar cexpr t f = acoreIf opts cn (acoreBuiltinEqChar opts cchar cexpr) t f -{-# LINE 1048 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1091 "src/ehc/AbstractCore.chs" #-} data Coe' expr metaval bind bindasp ty = Coe_Map !(expr -> expr) -- normal, expression as function | Coe_C !expr -- constant@@ -908,7 +951,7 @@ instance Show (Coe' expr metaval bind bindasp ty) where show _ = "COE" -{-# LINE 1085 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1128 "src/ehc/AbstractCore.chs" #-} -- | Coercions may either be applied or not on type arguments. -- In particular, due to lack of proper analysis (and generics code like generation), -- it is only known for arrow and product types how to construct a coercion from its type args, as they directly@@ -921,7 +964,7 @@ | CoeCtx_DontAllow deriving (Eq,Show) -{-# LINE 1103 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1146 "src/ehc/AbstractCore.chs" #-} -- | Non inspectable, most general, coercion acoreCoeMap :: (e -> e) -> Coe' e m b ba t acoreCoeMap = Coe_Map@@ -932,7 +975,7 @@ acoreCoeId = Coe_C acoreCoeArg {-# INLINE acoreCoeId #-} -{-# LINE 1115 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1158 "src/ehc/AbstractCore.chs" #-} acoreCoeLamLetTy :: HsName -> t -> UID -> Coe' e m b ba t acoreCoeLamLetTy = Coe_LamLet {-# INLINE acoreCoeLamLetTy #-}@@ -946,7 +989,7 @@ acoreCoeLetRec [] = acoreCoeId acoreCoeLetRec bs = Coe_LetRec bs -{-# LINE 1130 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1173 "src/ehc/AbstractCore.chs" #-} -- | Application still requiring a function acoreCoeApp1 :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => e -> Coe' e m b ba t acoreCoeApp1 = Coe_App1 -- a acoreMetavalDflt@@ -963,7 +1006,7 @@ acoreCoeAppN as = acoreCoeMap (\e -> acoreApp e as) {-# INLINE acoreCoeAppN #-} -{-# LINE 1148 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1191 "src/ehc/AbstractCore.chs" #-} -- | Lambda still requiring a body acoreCoeLam1Ty :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => HsName -> t -> Coe' e m b ba t acoreCoeLam1Ty = Coe_Lam@@ -973,7 +1016,7 @@ acoreCoeLam1 n = acoreCoeLam1Ty n (acoreTyErr "acoreCoeLam1") {-# INLINE acoreCoeLam1 #-} -{-# LINE 1159 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1202 "src/ehc/AbstractCore.chs" #-} -- | Composition of 2 Coe's acoreCoeCompose :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Coe' e m b ba t -> Coe' e m b ba t -> Coe' e m b ba t acoreCoeCompose c1 c2@@ -981,14 +1024,14 @@ | otherwise = Coe_Compose c1 c2 -{-# LINE 1168 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1211 "src/ehc/AbstractCore.chs" #-} acoreCoePoiLApp :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => [PredOccId] -> [Coe' e m b ba t] acoreCoePoiLApp = map (\i -> acoreCoeApp1 (acoreNmHolePred i)) acoreCoeImplsApp :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Impls -> [Coe' e m b ba t] acoreCoeImplsApp = acoreCoePoiLApp . implsPrIdL -{-# LINE 1176 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1219 "src/ehc/AbstractCore.chs" #-} acoreCoePoiLLamTy :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Coe' e m b ba t -> [(PredOccId,t)] -> [Coe' e m b ba t] acoreCoePoiLLamTy onLast poiL = case map mk poiL of@@ -1001,19 +1044,19 @@ acoreCoeImplsLam :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Coe' e m b ba t -> Impls -> [Coe' e m b ba t] acoreCoeImplsLam onLast is = acoreCoePoiLLamTy onLast (acoreTyErrLift "acoreCoeImplsLam" (implsPrIdL is)) -{-# LINE 1194 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1237 "src/ehc/AbstractCore.chs" #-} acoreCoeIsId :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => Coe' e m b ba t -> Bool acoreCoeIsId (Coe_C e) = acoreExprIsCoeArg e acoreCoeIsId _ = False -{-# LINE 1204 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1247 "src/ehc/AbstractCore.chs" #-} data CSubstKey = CSKey_UID UID | CSKey_Nm HsName | CSKey_Ref ACoreBindRef deriving (Show,Eq,Ord) -{-# LINE 1212 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1255 "src/ehc/AbstractCore.chs" #-} data CSubstInfo' expr metaval bind bindasp ty = CSITy { csiTy :: !ty }@@ -1028,37 +1071,37 @@ instance Show (CSubstInfo' e m b ba t) where show _ = "CSubstInfo'" -{-# LINE 1230 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1273 "src/ehc/AbstractCore.chs" #-} type CSubst' e m b ba t = Map.Map CSubstKey (CSubstInfo' e m b ba t) emptyCSubst :: CSubst' e m b ba t emptyCSubst = Map.empty -{-# LINE 1241 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1284 "src/ehc/AbstractCore.chs" #-} acoreCSubstFromNmTyL :: AssocL HsName t -> CSubst' e m b ba t acoreCSubstFromNmTyL l = Map.fromList [ (CSKey_Nm k,CSITy v) | (k,v) <- l ] -{-# LINE 1246 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1289 "src/ehc/AbstractCore.chs" #-} acoreCSubstFromRefExprL :: AssocL ACoreBindRef e -> CSubst' e m b ba t acoreCSubstFromRefExprL l = Map.fromList [ (CSKey_Ref k,CSIExpr v) | (k,v) <- l ] -{-# LINE 1251 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1294 "src/ehc/AbstractCore.chs" #-} acoreCSubstFromUidExprL :: AssocL UID e -> CSubst' e m b ba t acoreCSubstFromUidExprL l = Map.fromList [ (CSKey_UID k,CSIExpr v) | (k,v) <- l ] -{-# LINE 1256 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1299 "src/ehc/AbstractCore.chs" #-} acoreCSubstFromUidBindLL :: AssocL UID [b] -> CSubst' e m b ba t acoreCSubstFromUidBindLL l = Map.fromList [ (CSKey_UID k,CSIBinds v) | (k,v) <- l ] acoreCSubstFromUidImplsL :: AssocL UID ([Coe' e m b ba t],[Coe' e m b ba t]) -> CSubst' e m b ba t acoreCSubstFromUidImplsL l = Map.fromList [ (CSKey_UID k,uncurry CSIImpls v) | (k,v) <- l ] -{-# LINE 1268 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1311 "src/ehc/AbstractCore.chs" #-} -- | Combine CSubst: union only, application is postponed cSubstAppSubst :: CSubst' e m b ba t -> CSubst' e m b ba t -> CSubst' e m b ba t cSubstAppSubst = Map.union -{-# LINE 1278 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1321 "src/ehc/AbstractCore.chs" #-} infixr `cSubstApp` class CSubstitutable e m b ba t a@@ -1069,7 +1112,7 @@ instance CSubstitutable e m b ba t (CSubst' e m b ba t) where cSubstApp cs s = cs `cSubstAppSubst` s -{-# LINE 1294 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1337 "src/ehc/AbstractCore.chs" #-} data RAlt' e t b pr = RAlt_Alt { rcaPats :: ![RPat' e t b pr], raaExpr :: !e, raaFailS :: UIDS } @@ -1090,14 +1133,14 @@ type RCEAltL' e t b pr = [RAlt' e t b pr] -{-# LINE 1318 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1361 "src/ehc/AbstractCore.chs" #-} rcaPat :: RAlt' e t b pr -> RPat' e t b pr rcaPat = head . rcaPats raltLPatNms :: [RAlt' e t b pr] -> [RPatNm] raltLPatNms = nub . sort . map (rcpPNm . rcaPat) -{-# LINE 1326 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1369 "src/ehc/AbstractCore.chs" #-} rpatConTag :: RPat' e t b pr -> CTag rpatConTag (RPat_Int _ _ _ ) = ctagInt rpatConTag (RPat_Char _ _ _ ) = ctagChar@@ -1106,7 +1149,7 @@ rcaTag :: RAlt' e t b pr -> CTag rcaTag = rpatConTag . head . rcaPats -{-# LINE 1336 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1379 "src/ehc/AbstractCore.chs" #-} raltIsVar :: RAlt' e t b pr -> Bool raltIsVar (RAlt_Alt (RPat_Var _ _ _ : _) _ _) = True raltIsVar _ = False@@ -1118,17 +1161,17 @@ c (RPat_Char _ _ _) = True c _ = False -{-# LINE 1349 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1392 "src/ehc/AbstractCore.chs" #-} raltIsConMany :: RAlt' e t b pr -> Bool raltIsConMany (RAlt_Alt (RPat_Con _ _ _ (RPatConBind_Many _) : _) _ _) = True raltIsConMany _ = False -{-# LINE 1355 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1398 "src/ehc/AbstractCore.chs" #-} raltIsIrrefutable :: RAlt' e t b pr -> Bool raltIsIrrefutable (RAlt_Alt (RPat_Irrefutable _ _ _ : _) _ _) = True raltIsIrrefutable _ = False -{-# LINE 1361 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1404 "src/ehc/AbstractCore.chs" #-} raltMbBoolExpr :: RAlt' e t b pr -> Maybe (Maybe SrcConst) raltMbBoolExpr (RAlt_Alt (RPat_BoolExpr _ _ _ e : _) _ _) = Just e raltMbBoolExpr _ = Nothing@@ -1136,13 +1179,13 @@ raltIsBoolExpr :: RAlt' e t b pr -> Bool raltIsBoolExpr = isJust . raltMbBoolExpr -{-# LINE 1372 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1415 "src/ehc/AbstractCore.chs" #-} rpatConBindUnFlatten :: RPatConBind' e t b pr -> [RPatConBind' e t b pr] -> RPatConBind' e t b pr rpatConBindUnFlatten z [] = z rpatConBindUnFlatten _ [b] = b rpatConBindUnFlatten _ bs = RPatConBind_Many bs -{-# LINE 1383 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1426 "src/ehc/AbstractCore.chs" #-} acoreRPat2Pat :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => RPat' e t b pr -> p acoreRPat2Pat p = case p of@@ -1153,7 +1196,7 @@ RPat_Char n ty v -> acorePatCharTy ty v RPat_BoolExpr n _ v _ -> acorePatBoolExpr v -{-# LINE 1397 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1440 "src/ehc/AbstractCore.chs" #-} acoreRPatConBind2PatConBind :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => RPatConBind' e t b pr -> (pr,[pf]) acoreRPatConBind2PatConBind b = case b of@@ -1163,17 +1206,17 @@ acoreRPatBind2PatFld :: (AbstractCore e m b bound boundmeta bcat mbind t p pr pf a) => RPatFld' e t b pr -> pf acoreRPatBind2PatFld (RPatFld_Fld l o _ p@(RPat_Var n _ _)) = acorePatFldTy (rcpTy p) (l,o) (rpatNmNm n) -{-# LINE 1414 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1457 "src/ehc/AbstractCore.chs" #-} ctagTrue, ctagFalse :: EHCOpts -> CTag ctagTrue opts = CTag (ehcOptBuiltin opts ehbnDataBool) (ehcOptBuiltin opts ehbnBoolTrue) tagBoolTrue 0 0 -- this makes it hardcoded, ideally dependent on datatype def itself !! ctagFalse opts = CTag (ehcOptBuiltin opts ehbnDataBool) (ehcOptBuiltin opts ehbnBoolFalse) tagBoolFalse 0 0 -- this makes it hardcoded, ideally dependent on datatype def itself !! -{-# LINE 1426 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1469 "src/ehc/AbstractCore.chs" #-} ctagCons, ctagNil :: EHCOpts -> CTag ctagCons opts = CTag (ehcOptBuiltin opts ehbnDataList) (ehcOptBuiltin opts ehbnDataListAltCons) tagListCons 2 2 -- this makes it hardcoded, ideally dependent on datatype def itself !! ctagNil opts = CTag (ehcOptBuiltin opts ehbnDataList) (ehcOptBuiltin opts ehbnDataListAltNil ) tagListNil 0 2 -- this makes it hardcoded, ideally dependent on datatype def itself !! -{-# LINE 1436 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1479 "src/ehc/AbstractCore.chs" #-} -- | Reason to fail a case alternative data CaseAltFailReason = CaseAltFailReason_Absence -- failed because of absence@@ -1186,23 +1229,23 @@ pp (CaseAltFailReason_Continue i) = pp i pp (CaseAltFailReason_Absence ) = pp "absent" -{-# LINE 1450 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1493 "src/ehc/AbstractCore.chs" #-} cafailHasId :: CaseAltFailReason -> (Bool,UID) cafailHasId (CaseAltFailReason_Absence ) = (False,uidUnused) cafailHasId (CaseAltFailReason_Continue i) = (True ,i) -{-# LINE 1456 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1499 "src/ehc/AbstractCore.chs" #-} deriving instance Typeable CaseAltFailReason deriving instance Data CaseAltFailReason -{-# LINE 1465 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1508 "src/ehc/AbstractCore.chs" #-} data AppFunKind = AppFunKind_NoApp -- inlined Nothing | AppFunKind_Fun ACoreBindRef | AppFunKind_Tag CTag | AppFunKind_FFI -{-# LINE 1477 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1520 "src/ehc/AbstractCore.chs" #-} -- | What kind of Expr? data WhatExpr@@ -1218,7 +1261,7 @@ | ExprIsBind deriving Eq -{-# LINE 1494 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1537 "src/ehc/AbstractCore.chs" #-} -- | is an var? whatExprMbVar :: WhatExpr -> Maybe HsName whatExprMbVar (ExprIsVar a) = Just a@@ -1239,7 +1282,7 @@ whatExprAppArity (ExprIsApp a _) = a whatExprAppArity _ = 0 -{-# LINE 1516 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1559 "src/ehc/AbstractCore.chs" #-} whatExprIsWHNF :: WhatExpr -> Bool whatExprIsWHNF (ExprIsLam _) = True whatExprIsWHNF (ExprIsVar _) = True@@ -1248,7 +1291,7 @@ whatExprIsWHNF ExprIsOtherWHNF = True whatExprIsWHNF _ = False -{-# LINE 1526 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1569 "src/ehc/AbstractCore.chs" #-} whatExprIsLam :: WhatExpr -> Bool whatExprIsLam = isJust . whatExprMbLam {-# INLINE whatExprIsLam #-}@@ -1259,14 +1302,14 @@ whatExprIsTup _ = False -{-# LINE 1538 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1581 "src/ehc/AbstractCore.chs" #-} -- | Is Expr a FFI? whatExprIsFFI :: WhatExpr -> Bool whatExprIsFFI (ExprIsFFI ) = True whatExprIsFFI _ = False -{-# LINE 1556 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1599 "src/ehc/AbstractCore.chs" #-} instance Serialize ACoreBindAspectKey where sput (ACoreBindAspectKey_Default ) = sputWord8 0 sput (ACoreBindAspectKey_Strict ) = sputWord8 1@@ -1286,12 +1329,12 @@ 5 -> return ACoreBindAspectKey_Core 7 -> return ACoreBindAspectKey_FusionRole -{-# LINE 1587 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1630 "src/ehc/AbstractCore.chs" #-} instance Serialize ACoreBindRef where sput (ACoreBindRef a b) = sput a >> sput b sget = liftM2 ACoreBindRef sget sget -{-# LINE 1593 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1636 "src/ehc/AbstractCore.chs" #-} instance Serialize CaseAltFailReason where sput (CaseAltFailReason_Continue a) = sputWord8 0 >> sput a sput (CaseAltFailReason_Absence ) = sputWord8 1@@ -1301,13 +1344,13 @@ 0 -> liftM CaseAltFailReason_Continue sget 1 -> return CaseAltFailReason_Absence -{-# LINE 1608 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1651 "src/ehc/AbstractCore.chs" #-} instance PP CSubstKey where pp (CSKey_UID i) = pp i pp (CSKey_Nm n) = pp n pp (CSKey_Ref r) = pp r -{-# LINE 1615 "src/ehc/AbstractCore.chs" #-}+{-# LINE 1658 "src/ehc/AbstractCore.chs" #-} instance (PP expr, PP ty) => PP (CSubstInfo' expr metaval bind bindasp ty) where pp (CSITy t ) = pp t pp (CSIExpr e ) = pp e
@@ -97,6 +97,7 @@ | HsNameUniqifier_GenericClass -- a name introduced by generics | HsNameUniqifier_FFE -- name of value to be ff exported | HsNameUniqifier_FFECoerced -- name of possibly coerced value to be ff exported+ | HsNameUniqifier_CoreAPI -- Used by the Core API, to allow external programs to generate new identifiers. deriving (Eq,Ord,Enum) -- | The show of a HsNameUniqifier is found back in the pretty printed code, current convention is 3 uppercase letters, as a balance between size and clarity of meaning@@ -125,8 +126,9 @@ show HsNameUniqifier_GenericClass = "GEN" show HsNameUniqifier_FFE = "FFE" show HsNameUniqifier_FFECoerced = "FFC"+ show HsNameUniqifier_CoreAPI = "CRA" -{-# LINE 140 "src/ehc/Base/HsName.chs" #-}+{-# LINE 146 "src/ehc/Base/HsName.chs" #-} -- | A HsNameUnique represents the optional additional info to make the uniqification even more unique data HsNameUnique = HsNameUnique_None@@ -144,7 +146,7 @@ instance Show HsNameUnique where show = showHsNameUnique hsnShowUID id -{-# LINE 159 "src/ehc/Base/HsName.chs" #-}+{-# LINE 165 "src/ehc/Base/HsName.chs" #-} type HsNameUniqifierMp = Map.Map HsNameUniqifier [HsNameUnique] emptyHsNameUniqifierMp :: HsNameUniqifierMp@@ -164,14 +166,14 @@ showHsNameUniqifierMp :: String -> HsNameUniqifierMp -> [String] showHsNameUniqifierMp = showHsNameUniqifierMp' True -{-# LINE 194 "src/ehc/Base/HsName.chs" #-}+{-# LINE 200 "src/ehc/Base/HsName.chs" #-} uniqifierMpAdd :: HsNameUniqifier -> HsNameUnique -> HsNameUniqifierMp -> HsNameUniqifierMp uniqifierMpAdd ufier u m = Map.unionWith (++) (Map.singleton ufier [u]) m uniqifierMpUnion :: HsNameUniqifierMp -> HsNameUniqifierMp -> HsNameUniqifierMp uniqifierMpUnion = Map.unionWith (++) -{-# LINE 206 "src/ehc/Base/HsName.chs" #-}+{-# LINE 212 "src/ehc/Base/HsName.chs" #-} hsnUniqify' :: HsNameUniqifier -> HsNameUnique -> HsName -> HsName hsnUniqify' ufier u = mk@@ -198,7 +200,7 @@ hsnUniqifyEval :: HsName -> HsName hsnUniqifyEval = hsnUniqify HsNameUniqifier_Evaluated -{-# LINE 234 "src/ehc/Base/HsName.chs" #-}+{-# LINE 240 "src/ehc/Base/HsName.chs" #-} -- | Remove uniqification, if present hsnStripUniqify :: HsName -> Maybe HsName hsnStripUniqify n@(HsName_Modf {hsnUniqifiers=us})@@ -206,7 +208,7 @@ | otherwise = Just $ n {hsnUniqifiers = Map.empty} hsnStripUniqify _ = Nothing -{-# LINE 243 "src/ehc/Base/HsName.chs" #-}+{-# LINE 249 "src/ehc/Base/HsName.chs" #-} -- | Simplify name into list of simplifications of increasing complexity, all strictly simpler than the one given. [] therefore means no simplifications exist hsnSimplifications :: HsName -> [HsName] hsnSimplifications n@(HsName_Modf {}) = case hsnStripUniqify n of@@ -216,7 +218,7 @@ -- hsnSimplifications n@(HsName_Base {} ) = [] -- [n] hsnSimplifications _ = [] -{-# LINE 258 "src/ehc/Base/HsName.chs" #-}+{-# LINE 264 "src/ehc/Base/HsName.chs" #-} hsnHashWithSalt :: Int -> HsName -> Int hsnHashWithSalt salt (HsName_Base s ) = hashWithSalt salt s hsnHashWithSalt salt (HsName_UID i ) = hashWithSalt salt i@@ -243,14 +245,14 @@ instance Hashable HsNameUniqifier where hashWithSalt salt u = hashWithSalt salt (fromEnum u) -{-# LINE 286 "src/ehc/Base/HsName.chs" #-}+{-# LINE 292 "src/ehc/Base/HsName.chs" #-} -- | Fixate hash hsnFixateHash :: HsName -> HsName hsnFixateHash n@(HsName_Modf _ _ _ _) = n {hsnHash = hsnHashWithSalt 17 n} hsnFixateHash n = n {-# INLINE hsnFixateHash #-} -{-# LINE 300 "src/ehc/Base/HsName.chs" #-}+{-# LINE 306 "src/ehc/Base/HsName.chs" #-} -- | Haskell name representation, exports of constructors only intented for internal use data HsName = HsName_Base@@ -271,11 +273,11 @@ | HsName_Nr !Int !OrigName deriving (Eq,Ord) -{-# LINE 326 "src/ehc/Base/HsName.chs" #-}+{-# LINE 332 "src/ehc/Base/HsName.chs" #-} hsnEmpty :: HsName hsnEmpty = mkHNm "" -{-# LINE 340 "src/ehc/Base/HsName.chs" #-}+{-# LINE 346 "src/ehc/Base/HsName.chs" #-} -- | Is HsName a HsName_Pos? hsnMbPos :: HsName -> Maybe Int hsnMbPos (HsName_Pos p) = Just p@@ -285,7 +287,7 @@ hsnIsPos = isJust . hsnMbPos {-# INLINE hsnIsPos #-} -{-# LINE 351 "src/ehc/Base/HsName.chs" #-}+{-# LINE 357 "src/ehc/Base/HsName.chs" #-} -- | Is HsName a HsName_Pos? hsnMbNr :: HsName -> Maybe (Int,OrigName) hsnMbNr (HsName_Nr i o) = Just (i,o)@@ -295,32 +297,32 @@ hsnIsNr = isJust . hsnMbNr {-# INLINE hsnIsNr #-} -{-# LINE 362 "src/ehc/Base/HsName.chs" #-}+{-# LINE 368 "src/ehc/Base/HsName.chs" #-} -- | Smart constructor for HsName_Modf hsnMkModf :: [String] -> HsName -> HsNameUniqifierMp -> HsName -- hsnMkModf q b u = hsnFixateHash $ HsName_Modf 0 q b u hsnMkModf q b u = hsnFixateHash $ either (\(_,n) -> n {hsnQualifiers = q, hsnUniqifiers = hsnUniqifiers n `uniqifierMpUnion` u}) (\b -> HsName_Modf 0 q b u) $ hsnCanonicSplit b {-# INLINE hsnMkModf #-} -{-# LINE 374 "src/ehc/Base/HsName.chs" #-}+{-# LINE 380 "src/ehc/Base/HsName.chs" #-} -- | Smart constructor for HsName_Nr hsnMkNr :: Int -> OrigName -> HsName hsnMkNr = HsName_Nr {-# INLINE hsnMkNr #-} -{-# LINE 389 "src/ehc/Base/HsName.chs" #-}+{-# LINE 395 "src/ehc/Base/HsName.chs" #-} -- | Just lift a string to the base HsName variant mkHNmBase :: String -> HsName mkHNmBase s = hsnMkModf [] (HsName_Base s) Map.empty -{-# LINE 399 "src/ehc/Base/HsName.chs" #-}+{-# LINE 405 "src/ehc/Base/HsName.chs" #-} -- | Eliminate alternative internal representations hsnEnsureIsBase :: HsName -> HsName hsnEnsureIsBase n@(HsName_UID _) = mkHNm $ show n hsnEnsureIsBase (HsName_Pos i) = mkHNm $ show i hsnEnsureIsBase n = n -{-# LINE 409 "src/ehc/Base/HsName.chs" #-}+{-# LINE 415 "src/ehc/Base/HsName.chs" #-} -- | unpack a HsName into qualifiers + base string + repack function hsnBaseUnpack' :: HsName -> Maybe ([String],String,[String] -> String -> HsName) hsnBaseUnpack' (HsName_Base s ) = Just ([],s,\_ s -> HsName_Base s)@@ -333,7 +335,7 @@ hsnBaseUnpack (HsName_Modf _ q b u) = fmap (\(bs,mk) -> (bs, \s -> hsnMkModf q (mk s) u)) (hsnBaseUnpack b) hsnBaseUnpack _ = Nothing -{-# LINE 427 "src/ehc/Base/HsName.chs" #-}+{-# LINE 433 "src/ehc/Base/HsName.chs" #-} -- | If name is a HsName_Base after some unpacking, return the base string, without qualifiers, without uniqifiers hsnMbBaseString :: HsName -> Maybe String hsnMbBaseString = fmap fst . hsnBaseUnpack@@ -348,23 +350,23 @@ hsnBaseString = maybe "??" id . hsnMbBaseString -{-# LINE 443 "src/ehc/Base/HsName.chs" #-}+{-# LINE 449 "src/ehc/Base/HsName.chs" #-} -- | Just lift a int to the int HsName variant mkHNmPos :: Int -> HsName mkHNmPos s = hsnMkModf [] (HsName_Pos s) Map.empty -{-# LINE 453 "src/ehc/Base/HsName.chs" #-}+{-# LINE 459 "src/ehc/Base/HsName.chs" #-} -- | Compare, ignoring hash cmpHsNameOnNm :: HsName -> HsName -> Ordering cmpHsNameOnNm (HsName_Modf _ q1 b1 u1) (HsName_Modf _ q2 b2 u2) = compare (HsName_Modf 0 q1 b1 u1) (HsName_Modf 0 q2 b2 u2) cmpHsNameOnNm n1 n2 = compare n1 n2 -{-# LINE 468 "src/ehc/Base/HsName.chs" #-}+{-# LINE 474 "src/ehc/Base/HsName.chs" #-} hsnFromString :: String -> HsName hsnFromString = mkHNmBase {-# INLINE hsnFromString #-} -{-# LINE 479 "src/ehc/Base/HsName.chs" #-}+{-# LINE 485 "src/ehc/Base/HsName.chs" #-} data OrigName = OrigNone | OrigLocal HsName@@ -372,11 +374,11 @@ | OrigFunc HsName deriving (Eq,Ord) -{-# LINE 488 "src/ehc/Base/HsName.chs" #-}+{-# LINE 494 "src/ehc/Base/HsName.chs" #-} instance PP HsName where pp h = pp (show h) -{-# LINE 494 "src/ehc/Base/HsName.chs" #-}+{-# LINE 500 "src/ehc/Base/HsName.chs" #-} -- | Parameterizable show of HsName when used from within the Show instance for HsName, or for a parseable representation used by (e.g.) Core pretty printing hsnShow' :: (UID -> String) -> (String -> String) -> (String -> String) -> String -> String -> HsName -> String hsnShow' shwu shws brk qsep usep n@@ -398,25 +400,25 @@ hsnShowUID i = 'u' : show i -{-# LINE 519 "src/ehc/Base/HsName.chs" #-}+{-# LINE 525 "src/ehc/Base/HsName.chs" #-} instance Show HsName where show = hsnShow "." "_@" -{-# LINE 529 "src/ehc/Base/HsName.chs" #-}+{-# LINE 535 "src/ehc/Base/HsName.chs" #-} -- | A HsName is either a complex/aggregrate name or a base case hsnCanonicSplit :: HsName -> Either ([String],HsName) HsName hsnCanonicSplit n@(HsName_Modf _ qs _ _) = Left $ (qs, hsnFixateHash (n {hsnQualifiers = []})) hsnCanonicSplit n = Right n -{-# LINE 538 "src/ehc/Base/HsName.chs" #-}+{-# LINE 544 "src/ehc/Base/HsName.chs" #-} hsnToList :: HsName -> [HsName] hsnToList n = either (\(qs,b) -> map mkHNmBase qs ++ [b]) (:[]) (hsnCanonicSplit n) -{-# LINE 543 "src/ehc/Base/HsName.chs" #-}+{-# LINE 549 "src/ehc/Base/HsName.chs" #-} hsnInitLast :: HsName -> ([HsName],HsName) hsnInitLast n = either (\(qs,b) -> (map mkHNmBase qs, b)) (\x -> ([],x)) (hsnCanonicSplit n) -{-# LINE 548 "src/ehc/Base/HsName.chs" #-}+{-# LINE 554 "src/ehc/Base/HsName.chs" #-} hsnPrefix :: String -> HsName -> HsName hsnPrefix p hsn = maybe (mkHNmBase $ p ++ show hsn) (\(s,mk) -> mk $ p ++ s) $ hsnBaseUnpack hsn@@ -428,12 +430,12 @@ mkHNmPrefix :: HSNM x => String -> x -> HsName mkHNmPrefix p = hsnPrefix p . mkHNm -{-# LINE 561 "src/ehc/Base/HsName.chs" #-}+{-# LINE 567 "src/ehc/Base/HsName.chs" #-} stringAlphanumeric :: String -> String stringAlphanumeric s = concat (map (charAlphanumeric) s) -{-# LINE 574 "src/ehc/Base/HsName.chs" #-}+{-# LINE 580 "src/ehc/Base/HsName.chs" #-} charAlphanumeric :: Char -> String charAlphanumeric '\'' = "prime" charAlphanumeric ':' = "colon"@@ -463,7 +465,7 @@ charAlphanumeric ')' = "close" charAlphanumeric c = [c] -{-# LINE 607 "src/ehc/Base/HsName.chs" #-}+{-# LINE 613 "src/ehc/Base/HsName.chs" #-} dontStartWithDigit :: String -> String dontStartWithDigit xs@(a:_) | isDigit a || a=='_' = "y"++xs | otherwise = xs@@ -483,7 +485,7 @@ hsnShowAlphanumeric (HsName_Modf _ q b u) = concat $ intersperse "_" $ q ++ [hsnShowAlphanumeric b] ++ map stringAlphanumeric (showHsNameUniqifierMp "_" u) -- hsnShowAlphanumeric n = concat $ intersperse "_" $ map hsnShowAlphanumeric $ hsnToList n -{-# LINE 631 "src/ehc/Base/HsName.chs" #-}+{-# LINE 637 "src/ehc/Base/HsName.chs" #-} hsnToFPath :: HsName -> FPath hsnToFPath n = mkFPathFromDirsFile qs b@@ -492,16 +494,16 @@ instance FPATH HsName where mkFPath = hsnToFPath -{-# LINE 642 "src/ehc/Base/HsName.chs" #-}+{-# LINE 648 "src/ehc/Base/HsName.chs" #-} hsnConcat :: HsName -> HsName -> HsName hsnConcat h1 h2 = hsnFromString (show h1 ++ show h2) -{-# LINE 651 "src/ehc/Base/HsName.chs" #-}+{-# LINE 657 "src/ehc/Base/HsName.chs" #-} -- compare for row labels, lexicographic ordering (currently) rowLabCmp :: HsName -> HsName -> Ordering rowLabCmp = cmpHsNameOnNm -{-# LINE 661 "src/ehc/Base/HsName.chs" #-}+{-# LINE 667 "src/ehc/Base/HsName.chs" #-} -- qualifier (i.e. module name) and qualified part of name hsnSplitQualify :: HsName -> (Maybe HsName,HsName) hsnSplitQualify n@@ -527,7 +529,7 @@ (Just q ,n) -> hsnPrefixQual q (f n) -} -{-# LINE 688 "src/ehc/Base/HsName.chs" #-}+{-# LINE 694 "src/ehc/Base/HsName.chs" #-} -- qualifier (i.e. module name) of name hsnQualifier :: HsName -> Maybe HsName hsnQualifier = fst . hsnSplitQualify@@ -540,7 +542,7 @@ hsnIsQual :: HsName -> Bool hsnIsQual = isJust . hsnQualifier -{-# LINE 714 "src/ehc/Base/HsName.chs" #-}+{-# LINE 720 "src/ehc/Base/HsName.chs" #-} hsnMapQual :: (HsName -> HsName) -> HsName -> HsName hsnMapQual f qn = case hsnSplitQualify qn of@@ -551,7 +553,7 @@ hsnSetLevQual 0 m n = hsnSetQual m n hsnSetLevQual _ _ n = n -{-# LINE 730 "src/ehc/Base/HsName.chs" #-}+{-# LINE 736 "src/ehc/Base/HsName.chs" #-} hsnFixUniqifiers' :: Bool -> String -> HsName -> HsName hsnFixUniqifiers' showlen sep (HsName_Modf _ qs n us) = hsnMkModf qs (hsnSuffix n (concat $ showHsNameUniqifierMp' showlen sep us)) Map.empty hsnFixUniqifiers' _ _ n = n@@ -562,19 +564,19 @@ hsnJavalikeFixUniqifiers :: HsName -> HsName hsnJavalikeFixUniqifiers = hsnFixUniqifiers' False "" -{-# LINE 746 "src/ehc/Base/HsName.chs" #-}+{-# LINE 752 "src/ehc/Base/HsName.chs" #-} hsnStripUniqifiers :: HsName -> HsName hsnStripUniqifiers (HsName_Modf _ qs n us) = hsnMkModf qs n emptyHsNameUniqifierMp hsnStripUniqifiers n = n -{-# LINE 756 "src/ehc/Base/HsName.chs" #-}+{-# LINE 762 "src/ehc/Base/HsName.chs" #-} hsnQualUniqify :: HsName -> HsName -> HsName hsnQualUniqify modNm n = if hsnIsQual n then n else hsnSetQual modNm n -{-# LINE 768 "src/ehc/Base/HsName.chs" #-}+{-# LINE 774 "src/ehc/Base/HsName.chs" #-} class HSNM a where mkHNm :: a -> HsName @@ -585,17 +587,17 @@ mkHNm = mkHNm . show -{-# LINE 780 "src/ehc/Base/HsName.chs" #-}+{-# LINE 786 "src/ehc/Base/HsName.chs" #-} instance HSNM UID where mkHNm = HsName_UID -- mkHNm x = hsnFromString ('_' : show x) -{-# LINE 791 "src/ehc/Base/HsName.chs" #-}+{-# LINE 797 "src/ehc/Base/HsName.chs" #-} instance HSNM String where mkHNm s = mkHNm $ map hsnFromString $ splitForQualified s -{-# LINE 797 "src/ehc/Base/HsName.chs" #-}+{-# LINE 803 "src/ehc/Base/HsName.chs" #-} instance HSNM ([HsName],HsName) where mkHNm (l,n) = mkHNm (l ++ [n]) @@ -608,13 +610,13 @@ n -> hsnMkModf qs n Map.empty where qs = catMaybes $ map hsnMbBaseString i -{-# LINE 820 "src/ehc/Base/HsName.chs" #-}+{-# LINE 826 "src/ehc/Base/HsName.chs" #-} instance Position HsName where line _ = (-1) column _ = (-1) file _ = "" -{-# LINE 831 "src/ehc/Base/HsName.chs" #-}+{-# LINE 837 "src/ehc/Base/HsName.chs" #-} deriving instance Typeable HsNameUniqifier deriving instance Data HsNameUniqifier @@ -633,7 +635,7 @@ deriving instance Typeable IdOcc deriving instance Data IdOcc -{-# LINE 855 "src/ehc/Base/HsName.chs" #-}+{-# LINE 861 "src/ehc/Base/HsName.chs" #-} instance Binary HsNameUniqifier where put = putEnum8 get = getEnum8@@ -700,7 +702,7 @@ sputNested = sputPlain sgetNested = sgetPlain -{-# LINE 927 "src/ehc/Base/HsName.chs" #-}+{-# LINE 933 "src/ehc/Base/HsName.chs" #-} data IdOccKind = IdOcc_Val | IdOcc_Pat@@ -715,7 +717,7 @@ | IdOcc_Fusion deriving (Eq,Ord,Enum) -{-# LINE 953 "src/ehc/Base/HsName.chs" #-}+{-# LINE 959 "src/ehc/Base/HsName.chs" #-} -- intended for parsing instance Show IdOccKind where show IdOcc_Val = "Value"@@ -730,21 +732,21 @@ show IdOcc_Data = "Data" show IdOcc_Fusion = "Fusion" -{-# LINE 979 "src/ehc/Base/HsName.chs" #-}+{-# LINE 985 "src/ehc/Base/HsName.chs" #-} -- intended for parsing instance PP IdOccKind where pp = text . show -{-# LINE 985 "src/ehc/Base/HsName.chs" #-}+{-# LINE 991 "src/ehc/Base/HsName.chs" #-} data IdOcc = IdOcc { ioccNm :: !HsName, ioccKind :: !IdOccKind } deriving (Show,Eq,Ord) -{-# LINE 996 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1002 "src/ehc/Base/HsName.chs" #-} type HsNameS = Set.Set HsName -{-# LINE 1004 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1010 "src/ehc/Base/HsName.chs" #-} -- ensure a name valid for backends which are more restrictive in their allowed identifier character set hsnSafeJavaLike :: HsName -> HsName hsnSafeJavaLike@@ -755,17 +757,17 @@ first s@(c:_) | isDigit c = '_' : s first s = s -{-# LINE 1031 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1037 "src/ehc/Base/HsName.chs" #-} type FvS = HsNameS type FvSMp = Map.Map HsName FvS -{-# LINE 1040 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1046 "src/ehc/Base/HsName.chs" #-} type HsNameMp = Map.Map HsName HsName hsnRepl :: HsNameMp -> HsName -> HsName hsnRepl m n = Map.findWithDefault n n m -{-# LINE 1051 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1057 "src/ehc/Base/HsName.chs" #-} data RPatNm = RPatNmOrig {rpatNmNm :: !HsName} | RPatNmUniq {rpatNmNm :: !HsName}@@ -781,16 +783,16 @@ pp (RPatNmOrig n) = n >|< "(O)" pp (RPatNmUniq n) = n >|< "(U)" -{-# LINE 1068 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1074 "src/ehc/Base/HsName.chs" #-} rpatNmIsOrig :: RPatNm -> Bool rpatNmIsOrig (RPatNmOrig _) = True rpatNmIsOrig _ = False -{-# LINE 1078 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1084 "src/ehc/Base/HsName.chs" #-} hsnUnknown :: HsName hsnUnknown = hsnFromString "??" -{-# LINE 1087 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1093 "src/ehc/Base/HsName.chs" #-} data Track = TrackNone@@ -801,7 +803,7 @@ deriving (Eq, Ord, Show) -{-# LINE 1099 "src/ehc/Base/HsName.chs" #-}+{-# LINE 1105 "src/ehc/Base/HsName.chs" #-} instance Serialize Track where sput (TrackNone ) = sputWord8 0
@@ -4,14 +4,10 @@ , version , verInfo , module UHC.Light.Compiler.ConfigDefines-, installRootM , installRoot , installVariant-, mkInstallFilePrefixM , mkInstallFilePrefix-, mkInstallBindirPrefixM , mkInstallBindirPrefix-, mkInstalledRtsM , mkInstalledRts , shellCmdGcc , libnamesGcc@@ -21,7 +17,6 @@ , mbSuffixExec, linkerSymbolPrefix , suffixDotlessBinaryCore, suffixDotlessInputOutputBinaryCore, suffixDotlessOutputTextualCore, suffixDotlessInputOutputTextualCore , suffixDotlessInputOutputCoreRun-, mkInstallPkgdirSystemM , mkInstallPkgdirSystem , mkInstallPkgdirUser , shellCmdOverride@@ -42,11 +37,10 @@ import UHC.Light.Compiler.ConfigDefines import UHC.Light.Compiler.Opts.Base import UHC.Light.Compiler.EHC.Environment-import qualified UHC.Light.Compiler.ConfigCabal as Cfg -{-# LINE 37 "src/ehc/Config.chs" #-}+{-# LINE 34 "src/ehc/Config.chs" #-} data Version = Version { verSvnRevision :: !String@@ -62,7 +56,7 @@ , verProg :: !String } -{-# LINE 58 "src/ehc/Config.chs" #-}+{-# LINE 55 "src/ehc/Config.chs" #-} version :: Version version = Version@@ -70,89 +64,58 @@ , verMajor = "1" , verMinor = "1" , verMinorMinor = "7"- , verMinorMinorMinor = "0"+ , verMinorMinorMinor = "1" , verQuality = "alpha" , verShort = "1.1" , verMedium = "1.1.7"- , verFull = "1.1.7.0"- , verAsNumber = "1170"+ , verFull = "1.1.7.1"+ , verAsNumber = "1171" , verProg = "ehc" } -{-# LINE 80 "src/ehc/Config.chs" #-}+{-# LINE 77 "src/ehc/Config.chs" #-} verInfo :: Version -> String verInfo v = verProg v ++ "-" ++ verFull v ++ ", revision " ++ verSvnRevision v -{-# LINE 93 "src/ehc/Config.chs" #-}--- | Get the installation root, in order of cabal specified (when installed as such), cmd line, builtin-installRootM :: EHCOpts -> IO String-installRootM opts = do- d <- Cfg.getDataDir- if null d- then maybe (return envroot) return (ehcOptCfgInstallRoot opts)- else return d- where envroot = ehcenvInstallRoot $ ehcOptEnvironment opts--{-# LINE 112 "src/ehc/Config.chs" #-}+{-# LINE 90 "src/ehc/Config.chs" #-} installRoot :: EHCOpts -> String installRoot opts = maybe envroot id (ehcOptCfgInstallRoot opts) where envroot = ehcenvInstallRoot $ ehcOptEnvironment opts -{-# LINE 123 "src/ehc/Config.chs" #-}+{-# LINE 101 "src/ehc/Config.chs" #-} installVariant :: EHCOpts -> String installVariant opts = maybe envvariant id (ehcOptCfgInstallVariant opts) where envvariant = ehcenvVariant $ ehcOptEnvironment opts -{-# LINE 138 "src/ehc/Config.chs" #-}-mkInstallFilePrefixM :: EHCOpts -> WhatInstallFile -> String -> String -> IO String-mkInstallFilePrefixM opts whatfile variant pkg- = installRootM opts >>= \r -> return $ mkDirbasedInstallPrefix r whatfile variant (show $ ehcOptTarget opts) pkg--{-# LINE 144 "src/ehc/Config.chs" #-}+{-# LINE 116 "src/ehc/Config.chs" #-} mkInstallFilePrefix :: EHCOpts -> WhatInstallFile -> String -> String -> String mkInstallFilePrefix opts whatfile variant pkg = mkDirbasedInstallPrefix (installRoot opts) whatfile variant (show $ ehcOptTarget opts) pkg -{-# LINE 150 "src/ehc/Config.chs" #-}-mkInstallBindirPrefixM :: EHCOpts -> String -> IO String-mkInstallBindirPrefixM opts variant- = installRootM opts >>= \r -> return $ mkDirbasedInstallPrefix r INST_BIN variant "" ""--{-# LINE 156 "src/ehc/Config.chs" #-}+{-# LINE 122 "src/ehc/Config.chs" #-} mkInstallBindirPrefix :: EHCOpts -> String -> String mkInstallBindirPrefix opts variant = mkDirbasedInstallPrefix (installRoot opts) INST_BIN variant "" "" -{-# LINE 162 "src/ehc/Config.chs" #-}-mkInstallPkgdirSystemM :: EHCOpts -> IO String-mkInstallPkgdirSystemM opts- = fmap filePathUnPrefix $ mkInstallFilePrefixM opts INST_LIB_PKG2 (installVariant opts) ""--{-# LINE 168 "src/ehc/Config.chs" #-}+{-# LINE 128 "src/ehc/Config.chs" #-} mkInstallPkgdirSystem :: EHCOpts -> String mkInstallPkgdirSystem opts = filePathUnPrefix $ mkInstallFilePrefix opts INST_LIB_PKG2 (installVariant opts) "" -{-# LINE 174 "src/ehc/Config.chs" #-}+{-# LINE 134 "src/ehc/Config.chs" #-} mkInstallPkgdirUser :: EHCOpts -> String mkInstallPkgdirUser opts = filePathCoalesceSeparator $ filePathUnPrefix $ mkDirbasedInstallPrefix (ehcOptUserDir opts) INST_LIB_PKG2 "" (show $ ehcOptTarget opts) "" -{-# LINE 180 "src/ehc/Config.chs" #-}--- | construct path for RTS-mkInstalledRtsM :: EHCOpts -> (String -> String -> String) -> WhatInstallFile -> String -> String -> IO String-mkInstalledRtsM opts mkLib how variant rts- = mkInstallFilePrefixM opts how variant rts >>= \p -> return $ mkLib p rts--{-# LINE 187 "src/ehc/Config.chs" #-}+{-# LINE 140 "src/ehc/Config.chs" #-} -- | construct path for RTS mkInstalledRts :: EHCOpts -> (String -> String -> String) -> WhatInstallFile -> String -> String -> String mkInstalledRts opts mkLib how variant rts = mkLib (mkInstallFilePrefix opts how variant rts) rts -{-# LINE 197 "src/ehc/Config.chs" #-}+{-# LINE 150 "src/ehc/Config.chs" #-} shellCmdOverride'' :: (cmd -> Maybe FilePath) -> FilePath -> cmd -> FilePath shellCmdOverride'' override base cmd = maybe base id $ override cmd @@ -162,31 +125,31 @@ shellCmdOverride :: EHCOpts -> FilePath -> PgmExec -> FilePath shellCmdOverride opts = shellCmdOverride' (ehcOptPgmExecMp opts) -{-# LINE 208 "src/ehc/Config.chs" #-}+{-# LINE 161 "src/ehc/Config.chs" #-} shellCmdGcc :: String shellCmdGcc = "/usr/bin/gcc" -{-# LINE 233 "src/ehc/Config.chs" #-}+{-# LINE 186 "src/ehc/Config.chs" #-} shellCmdCpp :: String shellCmdCpp = "/usr/bin/cpp" -{-# LINE 238 "src/ehc/Config.chs" #-}+{-# LINE 191 "src/ehc/Config.chs" #-} shellCmdAr :: String shellCmdAr = "/usr/bin/ar" -{-# LINE 243 "src/ehc/Config.chs" #-}+{-# LINE 196 "src/ehc/Config.chs" #-} shellCmdRanlib :: String shellCmdRanlib = "/usr/bin/ranlib -c" -{-# LINE 248 "src/ehc/Config.chs" #-}+{-# LINE 201 "src/ehc/Config.chs" #-} shellCmdLibtoolStatic :: String shellCmdLibtoolStatic = "/usr/bin/libtool" -{-# LINE 253 "src/ehc/Config.chs" #-}+{-# LINE 206 "src/ehc/Config.chs" #-} shellCmdLibtoolStaticOpts :: String shellCmdLibtoolStaticOpts = "-static -o" -{-# LINE 258 "src/ehc/Config.chs" #-}+{-# LINE 211 "src/ehc/Config.chs" #-} mkShellCmdLibtool :: String -> [String] -> [[String]] mkShellCmdLibtool archive files = if True -- "/usr/bin/libtool" == "no"@@ -196,7 +159,7 @@ else [ [shellCmdLibtoolStatic,shellCmdLibtoolStaticOpts,archive] ++ files ] -{-# LINE 273 "src/ehc/Config.chs" #-}+{-# LINE 226 "src/ehc/Config.chs" #-} libnamesGcc :: EHCOpts -> [String] libnamesGcc opts = [ ]@@ -209,19 +172,19 @@ else [] ) -{-# LINE 291 "src/ehc/Config.chs" #-}+{-# LINE 244 "src/ehc/Config.chs" #-} libnamesRts :: [String] libnamesRts = [ prefixLib ++ "EH-RTS"] -{-# LINE 297 "src/ehc/Config.chs" #-}+{-# LINE 250 "src/ehc/Config.chs" #-} ehcGccOptsStatic' :: CmdLineOpts ehcGccOptsStatic' = fst $ parseCmdLineOpts Cmd_C "" ehcGccOptsStatic :: [String] ehcGccOptsStatic = map show ehcGccOptsStatic' -{-# LINE 318 "src/ehc/Config.chs" #-}+{-# LINE 271 "src/ehc/Config.chs" #-} libnamesGccEhcExtraExternalLibs :: [String] libnamesGccEhcExtraExternalLibs = words@@ -229,11 +192,11 @@ ++ " m" ) -{-# LINE 333 "src/ehc/Config.chs" #-}+{-# LINE 286 "src/ehc/Config.chs" #-} prefixLib :: String prefixLib = "" -{-# LINE 338 "src/ehc/Config.chs" #-}+{-# LINE 291 "src/ehc/Config.chs" #-} suffixExec :: String suffixExec = "" @@ -248,7 +211,7 @@ linkerSymbolPrefix = "_" -{-# LINE 354 "src/ehc/Config.chs" #-}+{-# LINE 307 "src/ehc/Config.chs" #-} -- | Suffix (dotless) for binary core files, to be read in as part of the compilation process suffixDotlessBinaryCore :: String suffixDotlessBinaryCore = "cr"@@ -266,7 +229,7 @@ suffixDotlessInputOutputTextualCore = suffixDotlessOutputTextualCore -{-# LINE 373 "src/ehc/Config.chs" #-}+{-# LINE 326 "src/ehc/Config.chs" #-} -- | Suffix (dotless) for CoreRun files suffixDotlessInputOutputCoreRun :: String suffixDotlessInputOutputCoreRun = "rcr"
@@ -11,7 +11,7 @@ cppOpts = fst $ parseCmdLineOpts Cmd_CPP "-Wno-invalid-pp-token" -- cppOpts = showCmdLineOpts cppOpts' -ehcSvnRevision = "master@2837402ffa"+ehcSvnRevision = "master@0a24deaee1" ehcDefaultInplaceInstallDir = "/Volumes/Work/Programming/uhc/EHC/install"
@@ -1,6 +1,212 @@ {-# LINE 2 "src/ehc/Core/API.chs" #-}++-- | Core Public API (provisional)+--+-- Intended for constructing basic Core Programs.+-- This module does not offer any way to inspect the built Core Programs (on purpose), but the+-- EHXX.Core module does.+--+-- Invariants:+-- - Constructor applications (mkCon) always have to be fully saturated. (Should we handle this internally?)+-- - Haskell constructor names must be unambigous per module (mkHSCTag)+-- - TODO Tag ordering ?? What exactly are the invariants?+--+-- TODO Use AbstractCore instead of directly using the Constructors in the implementation+ module UHC.Light.Compiler.Core.API (+ -- Opts+ EHCOpts+ , defaultEHCOpts++ -- * Core AST+ -- | The datatypes making up a Core program.+ , CModule+ , CImport+ , CDeclMeta+ , CDataCon+ , CExpr+ , CBind+ , CAlt+ , CPat+ , CPatFld++ -- Base.Common+ , CTag+ -- Base.HsName+ , HsName++ -- * Names+ -- | Names in UHC have to be of the form P1.P2....Pn.Ident . All names+ -- in module M must have the form M.Ident . Datatype and constructor names+ -- have to start with an uppercase letter, functions with a lowercase letter.+ , mkUniqueHsName+ , mkHsName+ , mkHsName1+ , addHsNamePrefix++ -- * Construction functions+ -- ** Constants+ , acoreUnit+ , acoreInt++ , acoreBuiltinInteger -- TODO acoreInt2 or acoreBuiltinInteger ?+ , acoreBuiltinString+ , acoreBuiltinError+ , acoreBuiltinUndefined++ -- ** Variables+ , acoreVar++ -- ** Let Bindings+ , acoreLet1Plain+ , acoreLet1Strict+ , acoreLetRec++ -- ** Case+ -- | Scrutinizes an expression and executes the appropriate alternative.+ -- The scrutinee of a case statement is required to be in WHNF (weak head normal form).+ , acoreCaseDflt++ , acoreAlt+ , acorePatCon+ , acorePatRestEmpty+ , acorePatFldBind++ -- ** Abstraction+ , acoreLam++ -- ** Application+ , acoreApp++ -- ** Datatypes+ , acoreTagTup++ -- ** Binds/Bounds+ , acoreBind1+ , acoreBind1Nm1++ -- ** Module+ , makeModule+ , makeImport+ , makeMetaData+ , makeMetaDataCon++ -- * Utilities+ , makeMain ) where++import qualified Data.Map as M+import Data.List+import Data.Ord++import UHC.Light.Compiler.AbstractCore hiding (acoreCaseDflt)+import qualified UHC.Light.Compiler.AbstractCore as AC+import UHC.Light.Compiler.Base.Common+import UHC.Light.Compiler.Base.HsName+import UHC.Light.Compiler.Core hiding (acoreCaseDflt)+import UHC.Light.Compiler.Opts++-- | Creates a new Core name. All names generated with this function live in+-- the "Core API" namespace and will not collide with names in other namespaces.+-- Names in the "Core API" namespace cannot be called from Haskell code.+--+-- Use this function to create names used only inside Core code generated by your own Compiler,+-- e.g. module-scoped or local functions.+mkUniqueHsName :: String -- ^ Name prefix. Used to distinguish names generated by different API consumers,+ -- but may also be used to differentiate between different varieties by one API consumer.+ -- Use reverse-dns notation if possible, e.g. "nl.uu.agda.identOfVarietyA"+ -> [String] -- ^ The module prefix.+ -> String -- ^ The name to make unique.+ -> HsName+-- UHC expects names to be of the _Modf variety. If _Base/hsnFromString is used+-- instead things start to break, e.g. calling functions defined in other packages.+mkUniqueHsName prefix = hsnMkModf1 (M.singleton HsNameUniqifier_CoreAPI [HsNameUnique_String prefix])++-- | Creates a new Core name. The generated name lives in the default namespace,+-- hence may clash with Haskell-defined names.+mkHsName :: [String] -- ^ The module prefix.+ -> String -- ^ The local name of the identifier.+ -> HsName+mkHsName = hsnMkModf1 M.empty++-- | Creates a new Core name. The generated name lives in the default namespace,+-- hence may clash with Haskell-defined names.+mkHsName1 :: String+ -> HsName+mkHsName1 nm = mkHsName (init xs) (last xs)+ -- TODO there is probably something like that somewhere in UHC?+ where xs = splitBy '.' nm+ splitBy :: Eq a => a -> [a] -> [[a]]+ splitBy sep = (foldr (\x (a1:as) -> if x == sep then ([]:a1:as) else ((x:a1):as)) [[]])++-- | Adds an additional prefix to a 'HsName'. This can be used to derive a new+-- unique name from an existing name.+addHsNamePrefix :: String -> HsName -> HsName+addHsNamePrefix prefix name = hsnUniqifyStr HsNameUniqifier_CoreAPI prefix name++-- | Local helper function. Converts string names to HsNames.+hsnMkModf1 :: HsNameUniqifierMp -> [String] -> String -> HsName+-- UHC expects names to be of the _Modf variety. If _Base/hsnFromString is used+-- instead things start to break, e.g. calling functions defined in other packages.+hsnMkModf1 uniq mods nm = hsnMkModf mods (hsnFromString nm) uniq++-- TODO how should we handle the type?+-- | Creates the unit expresssion.+acoreUnit :: EHCOpts -> CExpr+acoreUnit _ = acoreTup []++-- TODO verify that this sorting is always correct (see also AbstractCore/Utils.chs)+-- | A Case expression, possibly with a default value.+acoreCaseDflt :: AbstractCore e m b bound boundmeta bcat mbind t p pr pf a+ => e -- ^ The scrutinee. Required to be in WHNF.+ -> [a] -- ^ The alternatives.+ -> Maybe e -- ^ The default value. (TODO what is the behaviour if it is Nothing?)+ -> e+acoreCaseDflt e as def =+ AC.acoreCaseDflt e (sortBy (comparing (getTag . fst . acoreUnAlt)) as) def+ where -- gets the for constructors, or returns 0 if this is not a constructor pattern+ -- TODO is this always safe?+ getTag t = case acorePatMbCon t of+ Just (tag, _, _) -> ctagTag tag+ Nothing -> 0++-- | Creates a module.+makeModule :: HsName -- ^ The name of the module.+ -> [CImport] -- ^ The imports (only direct imports, not transitive ones).+ -> [CDeclMeta] -- ^ The meta information.+ -> CExpr -- ^ The body of the module.+ -> CModule+makeModule = CModule_Mod++-- | Creates an import.+makeImport :: HsName -- ^ The module to import.+ -> CImport+makeImport = CImport_Import++-- | Creates the metadata for one datatype.+makeMetaData :: HsName -- ^ The name of the dataype.+ -> [CDataCon] -- ^ The constructors of the dataype.+ -> CDeclMeta+makeMetaData = CDeclMeta_Data++-- | Creates the metadata for one constructor.+makeMetaDataCon :: HsName -- ^ The fully qualified name of the constructor.+ -> Int -- ^ The tag of this constructor.+ -> Int -- ^ The arity of this constructor.+ -> CDataCon+makeMetaDataCon = CDataCon_Con++-- | Creates the main entry point, calling the given function when run. The given+-- function to call has to be in scope (either define it in the same module,+-- or import it).+makeMain :: HsName -- ^ The function containing the user code to call.+ -> CExpr+makeMain main = mainEhc+ where mainEhc = acoreLet1Plain mainNm+ (acoreApp (acoreVar $ hsnMkModf ["UHC", "Run"] (hsnFromString "ehcRunMain") M.empty) [acoreVar main])+ (acoreVar mainNm)+ mainNm = hsnMkModf [] (hsnFromString "main") M.empty+
@@ -45,18 +45,18 @@ | RP_primIntegerToInt -- System.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, -- and are initially open.@@ -65,19 +65,19 @@ | RP_stdout | RP_stderr -- :: Handle - -- * Opening and closing files+ --- * Opening and closing files - -- ** Opening files+ --- ** Opening files | RP_withFile | RP_openFile -- :: FilePath -> IOMode -> IO Handle -- IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), - -- ** Closing files+ --- ** Closing files | RP_hClose -- :: Handle -> IO () - -- ** Special cases+ --- ** Special cases -- | These functions are also exported by the "Prelude". @@ -85,32 +85,32 @@ | RP_writeFile -- :: FilePath -> String -> IO () | RP_appendFile -- :: FilePath -> String -> IO () - -- ** File locking+ --- ** File locking - -- $locking+ --- $locking - -- * Operations on handles+ --- * Operations on handles - -- ** Determining and changing the size of a file+ --- ** Determining and changing the size of a file | RP_hFileSize -- :: Handle -> IO Integer--- #ifdef __GLASGOW_HASKELL__+--- #ifdef __GLASGOW_HASKELL__ | RP_hSetFileSize -- :: Handle -> Integer -> IO ()--- #endif+--- #endif - -- ** Detecting the end of input+ --- ** Detecting the end of input | RP_hIsEOF -- :: Handle -> IO Bool | RP_isEOF -- :: IO Bool - -- ** Buffering operations+ --- ** Buffering operations -- BufferMode(NoBuffering,LineBuffering,BlockBuffering), | RP_hSetBuffering -- :: Handle -> BufferMode -> IO () | RP_hGetBuffering -- :: Handle -> IO BufferMode | RP_hFlush -- :: Handle -> IO () - -- ** Repositioning handles+ --- ** Repositioning handles | RP_hGetPosn -- :: Handle -> IO HandlePosn | RP_hSetPosn -- :: HandlePosn -> IO ()@@ -118,11 +118,11 @@ | RP_hSeek -- :: Handle -> SeekMode -> Integer -> IO () -- SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd),--- #if !defined(__NHC__)+--- #if !defined(__NHC__) | RP_hTell -- :: Handle -> IO Integer--- #endif+--- #endif - -- ** Handle properties+ --- ** Handle properties | RP_hIsOpen | RP_hIsClosed -- :: Handle -> IO Bool@@ -130,38 +130,38 @@ | RP_hIsWritable -- :: Handle -> IO Bool | RP_hIsSeekable -- :: Handle -> IO Bool - -- ** Terminal operations (not portable: GHC\/Hugs only)+ --- ** Terminal operations (not portable: GHC\/Hugs only) --- #if !defined(__NHC__)+--- #if !defined(__NHC__) | RP_hIsTerminalDevice -- :: Handle -> IO Bool | RP_hSetEcho -- :: Handle -> Bool -> IO () | RP_hGetEcho -- :: Handle -> IO Bool--- #endif+--- #endif - -- ** Showing handle state (not portable: GHC only)+ --- ** Showing handle state (not portable: GHC only) --- #ifdef __GLASGOW_HASKELL__+--- #ifdef __GLASGOW_HASKELL__ | RP_hShow -- :: Handle -> IO String--- #endif+--- #endif - -- * Text input and output+ --- * Text input and output - -- ** Text input+ --- ** 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 | RP_hGetContents -- :: Handle -> IO [Char]- -- ** Text output+ --- ** Text output | 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+ --- ** Special cases for standard input and output -- | These functions are also exported by the "Prelude". @@ -176,22 +176,22 @@ | RP_readIO -- :: Read a => String -> IO a | RP_readLn -- :: Read a => IO a - -- * Binary input and output+ --- * Binary input and output | RP_withBinaryFile | RP_openBinaryFile -- :: FilePath -> IOMode -> IO Handle | RP_hSetBinaryMode -- :: Handle -> Bool -> IO () | RP_hPutBuf -- :: Handle -> Ptr a -> Int -> IO () | RP_hGetBuf -- :: Handle -> Ptr a -> Int -> IO Int--- #if !defined(__NHC__) && !defined(__HUGS__)+--- #if !defined(__NHC__) && !defined(__HUGS__) | RP_hPutBufNonBlocking -- :: Handle -> Ptr a -> Int -> IO Int | RP_hGetBufNonBlocking -- :: Handle -> Ptr a -> Int -> IO Int--- #endif- -- * Temporary files+--- #endif+ --- * Temporary files | RP_openTempFile | RP_openBinaryTempFile - -- * Additional ones+ --- * Additional ones | RP_primShowHandle -- :: Handle -> String | RP_primEqHandle -- :: Handle -> Handle -> Bool
@@ -48,8 +48,8 @@ {-# LINE 73 "src/ehc/CoreRun/Run.chs" #-} -- | Factored out stuff, not much in it but intended to accomodate variability in running class (Monad m, MonadIO m, Functor m) => RunSem r s v m a- -- | r -> a s- -- , s -> a r+ --- | r -> a s+ --- , s -> a r | r s -> v a where -- | Provide initial state
@@ -59,12 +59,12 @@ } | RVal_Char {-# UNPACK #-} !Char | RVal_Int {-# UNPACK #-} !Int-{-+{-- | RVal_Int8 {-# UNPACK #-} !Int8 | RVal_Int16 {-# UNPACK #-} !Int16 -} | RVal_Int32 {-# UNPACK #-} !Int32-{-+{-- | RVal_Int64 {-# UNPACK #-} !Int64 | RVal_Word {-# UNPACK #-} !Word | RVal_Word8 {-# UNPACK #-} !Word8@@ -82,7 +82,8 @@ { rvalBody :: !Exp -- ^ a Exp_Lam, which also encodes a thunk , rvalSLRef :: !(IORef HpPtr) -- ^ static link to enclosing stack frame }- | RVal_Thunk -- ^ special case of Lam taking 0 params+ -- | special case of Lam taking 0 params+ | RVal_Thunk { rvalBody :: !Exp -- ^ Exp taking no arguments (thunk) , rvalSLRef :: !(IORef HpPtr) -- ^ static link to enclosing stack frame }@@ -111,9 +112,12 @@ | RVal_None -- Value representations for library or runtime env (not Core specific)- | RHsV_MutVar !(IORef RVal) -- ^ mutable var- | RHsV_Handle !Handle -- ^ IO handle- | RHsV_Addr Addr# -- ^ Addr inside Ptr+ -- | mutable var+ | RHsV_MutVar !(IORef RVal)+ -- | IO handle+ | RHsV_Handle !Handle+ -- | Addr inside Ptr+ | RHsV_Addr Addr# instance Show RVal where show _ = "RVal"@@ -123,12 +127,12 @@ RVal_Lit e -> dfltpp e RVal_Char v -> dfltpp $ show v RVal_Int v -> dfltpp v-{-+{-- RVal_Int8 v -> dfltpp $ show v RVal_Int16 v -> dfltpp $ show v -} RVal_Int32 v -> dfltpp $ show v-{-+{-- RVal_Int64 v -> dfltpp $ show v RVal_Word v -> dfltpp $ show v RVal_Word8 v -> dfltpp $ show v@@ -176,7 +180,7 @@ instance PP RVal where pp rval = unsafePerformIO (ppRVal rval) -{-# LINE 191 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 195 "src/ehc/CoreRun/Run/Val.chs" #-} mkTuple :: (RunSem RValCxt RValEnv RVal m a) => [RVal] -> RValT m a mkTuple vs = liftIO (mvecAllocFillFromV $ mkCRArray vs) >>= rsemNode 0 >>= rsemPush {-# INLINE mkTuple #-}@@ -185,14 +189,14 @@ mkUnit = mkTuple [] {-# INLINE mkUnit #-} -{-# LINE 201 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 205 "src/ehc/CoreRun/Run/Val.chs" #-} -- Vector of RVal type RValV = CRArray RVal -- Mutable vector of RVal type RValMV = CRMArray RVal -{-# LINE 214 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 218 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Marshalling from/to Haskell values class HSMarshall hs where -- | Marshall to Haskell value, also parameterized by evaluator@@ -201,7 +205,7 @@ -- | Unmarshall from Haskell value hsUnmarshall :: (RunSem RValCxt RValEnv RVal m a) => hs -> RValT m a -{-# LINE 224 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 228 "src/ehc/CoreRun/Run/Val.chs" #-} instance HSMarshall Int where hsMarshall _ (RVal_Int v) = return v hsUnmarshall v = rsemPush $ RVal_Int v@@ -246,11 +250,11 @@ hsUnmarshall v = forM v (\e -> hsUnmarshall e >>= rsemPop) >>= hsUnmarshall {-# INLINE hsUnmarshall #-} -{-# LINE 281 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 285 "src/ehc/CoreRun/Run/Val.chs" #-} deriving instance Typeable IOMode deriving instance Data IOMode -{-# LINE 290 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 294 "src/ehc/CoreRun/Run/Val.chs" #-} -- | HpPtr is index into a heap type HpPtr = Int @@ -274,7 +278,7 @@ ml <- newIORef 1.5 return $ Heap vs 0 fr ml -{-# LINE 315 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 319 "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"@@ -343,7 +347,7 @@ if pBlk < pGry' then follow pBlk pGry' else return pBlk -- initial copy: top frame- modifyIORefM topFrRef copyp -- $ \topFr -> {- if isNullPtr topFr then return topFr else -} copyp topFr+ modifyIORefM topFrRef copyp --- $ \topFr -> {- if isNullPtr topFr then return topFr else -} copyp topFr -- initial copy: stack modifyIORefM stkRef $ mapM copyp@@ -369,7 +373,7 @@ -- rsemSetTrace False return curV -{-# LINE 411 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 415 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Allocate on the heap heapAllocM :: (RunSem RValCxt RValEnv RVal m x) => RVal -> RValT m HpPtr heapAllocM v = do@@ -436,7 +440,7 @@ heapUpdM' hp p f {-# INLINE heapUpdM #-} -{-# LINE 483 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 487 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Environment: context/reader data RValCxt = RValCxt@@ -447,7 +451,7 @@ emptyRValCxt :: RValCxt emptyRValCxt = RValCxt True -- False -{-# LINE 495 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 499 "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})@@ -468,7 +472,7 @@ rvalPrimargEvl x = rvalRetEvl x >>= rsemPop >>= rsemDeref {-# INLINE rvalPrimargEvl #-} -{-# LINE 521 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 525 "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 ()@@ -486,13 +490,13 @@ {-# INLINE vecLoopReverse #-} -{-# LINE 540 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 544 "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 551 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 555 "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@@ -593,13 +597,13 @@ l2 = MV.length v2 l12 = l1 + l2 -{-# LINE 653 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 657 "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 664 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 668 "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@@ -640,7 +644,7 @@ _ -> err $ "CoreRun.Run.Val.ref2valM.r:" >#< r {-# INLINE ref2valM #-} -{-# LINE 711 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 715 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Frame holding locals indexed by RRef_Loc type RValFrame = HpPtr -- points to heap to a RVal_Frame @@ -668,7 +672,7 @@ rtst <- newIORef [] return $ RValEnv V.empty st tp hp False rtst -{-# LINE 740 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 744 "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@@ -676,7 +680,7 @@ liftIO $ readIORef tf {-# INLINE renvTopFrameM #-} -{-# LINE 749 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 753 "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@@ -691,7 +695,7 @@ (mbtop,st) <- renvAllFrameM' return $ maybe [] (:[]) mbtop ++ st -{-# LINE 765 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 769 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Dump environment dumpPpEnvM :: (RunSem RValCxt RValEnv RVal m x) => Bool -> RValT m PP_Doc dumpPpEnvM extensive = do@@ -726,18 +730,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 801 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 805 "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 811 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 815 "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 823 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 827 "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@@ -763,7 +767,7 @@ renvFrStkReversePushMV = renvFrStkPush' (\sp frvs vs -> mvecReverseFillFromMV sp frvs vs >> return (sp + MV.length vs)) {-# INLINE renvFrStkReversePushMV #-} -{-# LINE 850 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 854 "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@@ -807,7 +811,7 @@ renvFrStkReversePopMV sz = (liftIO $ mvecAlloc sz) >>= \vs -> renvFrStkReversePopInMV 0 sz vs >> return vs {-# INLINE renvFrStkReversePopMV #-} -{-# LINE 899 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 903 "src/ehc/CoreRun/Run/Val.chs" #-} -- | Trace rsemTr' :: (PP msg, RunSem RValCxt RValEnv RVal m x) => Bool -> msg -> RValT m () rsemTr' dumpExtensive msg = whenM (gets renvDoTrace) $ do@@ -819,7 +823,7 @@ rsemTr :: (PP msg, RunSem RValCxt RValEnv RVal m x) => msg -> RValT m () rsemTr = rsemTr' False -{-# LINE 916 "src/ehc/CoreRun/Run/Val.chs" #-}+{-# LINE 920 "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
@@ -76,7 +76,7 @@ -- and are initially open. -}- -- | RP_stdin, RP_stdout, RP_stderr -- :: Handle+ --- | 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@@ -91,9 +91,9 @@ -- IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode), -}- -- ** Closing files+ --- ** Closing files - -- | RP_hClose -- :: Handle -> IO ()+ --- | RP_hClose -- :: Handle -> IO () (RP_hClose, [RHsV_Handle h]) -> primIO (hClose h) {-@@ -110,25 +110,25 @@ -- $locking -} - -- * Operations on handles+ --- * Operations on handles - -- ** Determining and changing the size of a file+ --- ** Determining and changing the size of a file - -- | RP_hFileSize -- :: Handle -> IO Integer+ --- | RP_hFileSize -- :: Handle -> IO Integer (RP_hFileSize, [RHsV_Handle h]) -> primInputIO (hFileSize h)- -- #ifdef __GLASGOW_HASKELL__- -- | RP_hSetFileSize -- :: Handle -> Integer -> IO ()+ --- #ifdef __GLASGOW_HASKELL__+ --- | RP_hSetFileSize -- :: Handle -> Integer -> IO () (RP_hSetFileSize, [RHsV_Handle h, RVal_Integer i]) -> primIO (hSetFileSize h i)- -- #endif+ --- #endif - -- ** Detecting the end of input+ --- ** Detecting the end of input - -- | RP_hIsEOF -- :: Handle -> IO Bool+ --- | RP_hIsEOF -- :: Handle -> IO Bool (RP_hIsEOF, [RHsV_Handle h]) -> primInputIO (hIsEOF h) {- | RP_isEOF -- :: IO Bool -}- -- ** Buffering operations+ --- ** Buffering operations {- -- BufferMode(NoBuffering,LineBuffering,BlockBuffering),@@ -136,7 +136,7 @@ (RP_hSetBuffering, [RHsV_Handle h, RVal_Int m]) -> primInputIO (hSetBuffering h m) | RP_hGetBuffering -- :: Handle -> IO BufferMode -}- -- | RP_hFlush -- :: Handle -> IO ()+ --- | RP_hFlush -- :: Handle -> IO () (RP_hFlush, [RHsV_Handle h]) -> primIO (hFlush h) {-@@ -162,46 +162,46 @@ -- ** Terminal operations (not portable: GHC\/Hugs only) - -- #if !defined(__NHC__)+ --- #if !defined(__NHC__) | RP_hIsTerminalDevice -- :: Handle -> IO Bool | RP_hSetEcho -- :: Handle -> Bool -> IO () | RP_hGetEcho -- :: Handle -> IO Bool- -- #endif+ --- #endif -- ** Showing handle state (not portable: GHC only) -- #ifdef __GLASGOW_HASKELL__ -}- -- | RP_hShow -- :: Handle -> IO String+ --- | RP_hShow -- :: Handle -> IO String (RP_hShow, [RHsV_Handle h]) -> primInputIO (hShow h) {-- -- #endif+ --- #endif -- * Text input and output -- ** Text input -}- -- | RP_hWaitForInput -- :: Handle -> Int -> IO Bool+ --- | RP_hWaitForInput -- :: Handle -> Int -> IO Bool (RP_hWaitForInput, [RHsV_Handle h, RVal_Int i]) -> primInputIO (hWaitForInput h i) {- | RP_hReady -- :: Handle -> IO Bool -}- -- | RP_hGetChar -- :: Handle -> IO Char+ --- | RP_hGetChar -- :: Handle -> IO Char (RP_hGetChar, [RHsV_Handle h]) -> primInputIO (hGetChar h)- -- | RP_hGetLine -- :: Handle -> IO [Char]+ --- | RP_hGetLine -- :: Handle -> IO [Char] (RP_hGetLine, [RHsV_Handle h]) -> primInputIO (hGetLine h)- -- | RP_hLookAhead -- :: Handle -> IO Char+ --- | RP_hLookAhead -- :: Handle -> IO Char (RP_hLookAhead, [RHsV_Handle h]) -> primInputIO (hLookAhead h)- -- | RP_hGetContents -- :: Handle -> IO [Char]+ --- | RP_hGetContents -- :: Handle -> IO [Char] (RP_hGetContents, [RHsV_Handle h]) -> primInputIO (hGetContents h) {- -- ** Text output -}- -- | RP_hPutChar -- :: Handle -> Char -> IO ()+ --- | RP_hPutChar -- :: Handle -> Char -> IO () (RP_hPutChar, [RHsV_Handle h, x]) -> primOutputIO (hPutChar h) x- -- | RP_hPutStr -- :: Handle -> [Char] -> IO ()+ --- | RP_hPutStr -- :: Handle -> [Char] -> IO () (RP_hPutStr, [RHsV_Handle h, x]) -> primOutputIO (hPutStr h) x {- | RP_hPutStrLn -- :: Handle -> [Char] -> IO ()@@ -226,30 +226,30 @@ | RP_withBinaryFile | RP_openBinaryFile -- :: FilePath -> IOMode -> IO Handle -}- -- | RP_hSetBinaryMode -- :: Handle -> Bool -> IO ()+ --- | RP_hSetBinaryMode -- :: Handle -> Bool -> IO () (RP_hSetBinaryMode, [RHsV_Handle h, b]) -> primOutputIO (hSetBinaryMode h) b- -- | RP_hPutBuf -- :: Handle -> Ptr a -> Int -> IO ()+ --- | 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 -- :: Handle -> Ptr a -> Int -> IO Int (RP_hGetBuf, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primInputIO (hGetBuf h (Ptr a) i) {-- -- #if !defined(__NHC__) && !defined(__HUGS__)+ --- #if !defined(__NHC__) && !defined(__HUGS__) -}- -- | RP_hPutBufNonBlocking -- :: Handle -> Ptr a -> Int -> IO Int+ --- | 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 -- :: Handle -> Ptr a -> Int -> IO Int (RP_hGetBufNonBlocking, [RHsV_Handle h, RHsV_Addr a, RVal_Int i]) -> primInputIO (hGetBufNonBlocking h (Ptr a) i) {-- -- #endif+ --- #endif -- * Temporary files | RP_openTempFile | RP_openBinaryTempFile -}- -- * Additional ones- -- | RP_primShowHandle -- :: Handle -> String+ --- * Additional ones+ --- | RP_primShowHandle -- :: Handle -> String (RP_primShowHandle, [RHsV_Handle h]) -> hsUnmarshall $ show h- -- | RP_primEqHandle -- :: Handle -> Handle -> Bool+ --- | RP_primEqHandle -- :: Handle -> Handle -> Bool (RP_primEqHandle, [RHsV_Handle h1, RHsV_Handle h2]) -> hsUnmarshall $ h1 == h2 (pr, _) -> err $ "CoreRun.Run.Val.Prim:" >#< show pr
@@ -152,6 +152,7 @@ ehcOptOptimizes o opts = o `Set.member` ehcOptOptimizations opts {-# LINE 284 "src/ehc/Opts.chs" #-}+-- | The default EHC options. defaultEHCOpts = emptyEHCOpts { ehcOptExecOptsMp = ehcOptExecOptsMp emptyEHCOpts `Map.union` Map.fromList@@ -159,7 +160,7 @@ ] } -{-# LINE 299 "src/ehc/Opts.chs" #-}+{-# LINE 300 "src/ehc/Opts.chs" #-} ehcCmdLineOpts = [ Option "h" ["help"] (NoArg oHelp) "print this help (then stop)" , Option "" ["version"] (NoArg oVersion) "print version info (then stop)"@@ -219,7 +220,7 @@ "pgm: alternate executable used by compiler, currently only P (preprocessing)" , Option "" ["coreopt"] (ReqArg oOptCore "opt[,...]") ("opts (specific) for core: " ++ showStr2stMp coreOptMp) ]-{-# LINE 476 "src/ehc/Opts.chs" #-}+{-# LINE 477 "src/ehc/Opts.chs" #-} where oPretty ms o = case ms of Just "-" -> o { ehcOptShowEH = False } Just "no" -> o { ehcOptShowEH = False }@@ -380,14 +381,14 @@ nub $ ehcOptCmdLineOpts o ++ fst (parseCmdLineOpts cmd s) } oPgmExec cmd s o = o { ehcOptPgmExecMp = Map.insert cmd s $ ehcOptPgmExecMp o } -{-# LINE 773 "src/ehc/Opts.chs" #-}+{-# LINE 774 "src/ehc/Opts.chs" #-} intArg tr = ReqArg (optInt tr) "<nr>" optInt :: (EHCOpts -> Int -> EHCOpts) -> String -> EHCOpts -> EHCOpts optInt tr s o = tr o $ read s -{-# LINE 781 "src/ehc/Opts.chs" #-}+{-# LINE 782 "src/ehc/Opts.chs" #-} -- | What kind of optional args are allowed data OptArgAllow = OptArgAllow_Bool@@ -397,13 +398,13 @@ optArgAllAllow :: [OptArgAllow] optArgAllAllow = [minBound .. maxBound] -{-# LINE 792 "src/ehc/Opts.chs" #-}+{-# LINE 793 "src/ehc/Opts.chs" #-} -- | An optional arg, universal type for all occurring variants data OptArg = OptArg_Bool Bool | OptArg_Int Int -{-# LINE 799 "src/ehc/Opts.chs" #-}+{-# LINE 800 "src/ehc/Opts.chs" #-} optArgTake :: [OptArgAllow] -> String -> Maybe (OptArg,String) optArgTake allow s = case s of@@ -424,7 +425,7 @@ where yesInt = OptArgAllow_Int `elem` allow noInt = not yesInt -{-# LINE 821 "src/ehc/Opts.chs" #-}+{-# LINE 822 "src/ehc/Opts.chs" #-} optBooleanTake :: String -> Maybe (Bool,String) optBooleanTake s = case optArgTake [OptArgAllow_Bool] s of@@ -440,22 +441,22 @@ boolArgStr = "Bool" boolArg tr = OptArg (optBoolean tr) boolArgStr -{-# LINE 842 "src/ehc/Opts.chs" #-}+{-# LINE 843 "src/ehc/Opts.chs" #-} oPriv o b = o { ehcOptPriv = b } -{-# LINE 846 "src/ehc/Opts.chs" #-}+{-# LINE 847 "src/ehc/Opts.chs" #-} optDumpCoreStages o b = o { ehcOptDumpCoreStages = b } -{-# LINE 854 "src/ehc/Opts.chs" #-}+{-# LINE 855 "src/ehc/Opts.chs" #-} oSetGenTrampoline o b = o { ehcOptGenTrampoline_ = b } -{-# LINE 874 "src/ehc/Opts.chs" #-}+{-# LINE 875 "src/ehc/Opts.chs" #-} oStopAtCoreError o b = o { ehcDebugStopAtCoreError = b } -{-# LINE 878 "src/ehc/Opts.chs" #-}+{-# LINE 879 "src/ehc/Opts.chs" #-} oStopAtHIError o b = o { ehcDebugStopAtHIError = b } -{-# LINE 886 "src/ehc/Opts.chs" #-}+{-# LINE 887 "src/ehc/Opts.chs" #-} -- | Apply the cmdline opts description to a EHCOpts, returning Nothing when there were no options ehcCmdLineOptsApply :: [EHCOpts -> EHCOpts] -> [String] -> EHCOpts -> (Maybe EHCOpts, [String], [String]) ehcCmdLineOptsApply postopts args opts@@ -463,7 +464,7 @@ where oo@(o,n,errs) = getOpt Permute ehcCmdLineOpts args o' = o ++ postopts -{-# LINE 899 "src/ehc/Opts.chs" #-}+{-# LINE 900 "src/ehc/Opts.chs" #-} optsDiscrRecompileRepr :: EHCOpts -> String optsDiscrRecompileRepr opts = concat@@ -477,12 +478,12 @@ ] where o m v = if v then m else "" -{-# LINE 920 "src/ehc/Opts.chs" #-}+{-# LINE 921 "src/ehc/Opts.chs" #-} data FIOBind = FIOBindYes | FIOBindNoBut TyVarIdS deriving (Show) -{-# LINE 926 "src/ehc/Opts.chs" #-}+{-# LINE 927 "src/ehc/Opts.chs" #-} data FIOpts = FIOpts { fioLeaveRInst :: !Bool , fioBindRFirst :: !Bool , fioBindLFirst :: !Bool , fioBindLBeforeR :: !Bool , fioMode :: !FIMode , fioUniq :: !UID@@ -495,7 +496,7 @@ , fiMbMkErrClash :: Maybe (Ty -> Ty -> Err) -- alternate error construction for type clash } -{-# LINE 960 "src/ehc/Opts.chs" #-}+{-# LINE 961 "src/ehc/Opts.chs" #-} fioBindNoSet :: FIOBind -> TyVarIdS fioBindNoSet (FIOBindNoBut s) = s fioBindNoSet _ = Set.empty@@ -504,7 +505,7 @@ fioBindIsYes FIOBindYes = True fioBindIsYes _ = False -{-# LINE 970 "src/ehc/Opts.chs" #-}+{-# LINE 971 "src/ehc/Opts.chs" #-} strongFIOpts :: FIOpts strongFIOpts = FIOpts { fioLeaveRInst = False , fioBindRFirst = True , fioBindLFirst = True , fioBindLBeforeR = True@@ -518,11 +519,11 @@ , fiMbMkErrClash = Nothing } -{-# LINE 1000 "src/ehc/Opts.chs" #-}+{-# LINE 1001 "src/ehc/Opts.chs" #-} instance Show FIOpts where show o = "FIOpts" -{-# LINE 1005 "src/ehc/Opts.chs" #-}+{-# LINE 1006 "src/ehc/Opts.chs" #-} instance PP FIOpts where pp o = "FIOpts{" >#< "leaveRInst=" >|< pp (fioLeaveRInst o)@@ -533,33 +534,33 @@ >#< "allowRPredElim=" >|< pp (fioAllowRPredElim o) >#< "}" -{-# LINE 1021 "src/ehc/Opts.chs" #-}+{-# LINE 1022 "src/ehc/Opts.chs" #-} instLFIOpts :: FIOpts instLFIOpts = strongFIOpts {fioBindRFirst = False} -{-# LINE 1026 "src/ehc/Opts.chs" #-}+{-# LINE 1027 "src/ehc/Opts.chs" #-} instLRFIOpts :: FIOpts instLRFIOpts = strongFIOpts {fioBindRFirst = False, fioBindLFirst = False} -{-# LINE 1031 "src/ehc/Opts.chs" #-}+{-# LINE 1032 "src/ehc/Opts.chs" #-} unifyFIOpts :: FIOpts unifyFIOpts = strongFIOpts {fioMode = FitUnify} instFIOpts :: FIOpts instFIOpts = instLFIOpts {fioLeaveRInst = True, fioBindLFirst = False} -{-# LINE 1050 "src/ehc/Opts.chs" #-}+{-# LINE 1051 "src/ehc/Opts.chs" #-} weakFIOpts :: FIOpts weakFIOpts = fioMkWeak strongFIOpts -{-# LINE 1055 "src/ehc/Opts.chs" #-}+{-# LINE 1056 "src/ehc/Opts.chs" #-} predFIOpts :: FIOpts predFIOpts = strongFIOpts {fioPredAsTy = True, fioLeaveRInst = True} implFIOpts :: FIOpts implFIOpts = strongFIOpts {fioAllowRPredElim = False} -{-# LINE 1063 "src/ehc/Opts.chs" #-}+{-# LINE 1064 "src/ehc/Opts.chs" #-} fioSwapOpts :: FIOpts -> FIOpts fioSwapOpts fio = fio@@ -573,24 +574,24 @@ fioSwapPolarity :: Polarity -> FIOpts -> FIOpts fioSwapPolarity pol fio = fio {fioMode = fimSwapPol pol (fioMode fio)} -{-# LINE 1080 "src/ehc/Opts.chs" #-}+{-# LINE 1081 "src/ehc/Opts.chs" #-} fioMkStrong :: FIOpts -> FIOpts fioMkStrong fi = fi {fioLeaveRInst = False, fioBindRFirst = True, fioBindLFirst = True} -{-# LINE 1085 "src/ehc/Opts.chs" #-}+{-# LINE 1086 "src/ehc/Opts.chs" #-} fioMkWeak :: FIOpts -> FIOpts fioMkWeak fi = fi {fioLeaveRInst = True, fioBindRFirst = False} -{-# LINE 1090 "src/ehc/Opts.chs" #-}+{-# LINE 1091 "src/ehc/Opts.chs" #-} -- | Adapt options for extracting final ty fioMkFinal :: FIOpts -> FIOpts fioMkFinal fi = fi {fioBindLFirst = False, fioBindRFirst = False, fioExpandEqTyVar = True} -{-# LINE 1096 "src/ehc/Opts.chs" #-}+{-# LINE 1097 "src/ehc/Opts.chs" #-} fioMkUnify :: FIOpts -> FIOpts fioMkUnify fi = fi {fioMode = FitUnify} -{-# LINE 1105 "src/ehc/Opts.chs" #-}+{-# LINE 1106 "src/ehc/Opts.chs" #-} fioIsSubsume :: FIOpts -> Bool fioIsSubsume fio = case fioMode fio of {FitSubLR -> True ; _ -> False}
@@ -107,6 +107,7 @@ execOptsPlain o = [ s | ExecOpt_Plain s <- o ] {-# LINE 195 "src/ehc/Opts/Base.chs" #-}+-- | The options to use. data EHCOpts = EHCOpts { ehcOptTrace :: forall a . String -> a -> a -- tracing@@ -189,7 +190,7 @@ -- default options for commands } -{-# LINE 359 "src/ehc/Opts/Base.chs" #-}+{-# LINE 360 "src/ehc/Opts/Base.chs" #-} emptyEHCOpts = EHCOpts { ehcOptTrace = \_ x -> x@@ -262,14 +263,14 @@ , ehcOptExecOptsMp = Map.empty } -{-# LINE 530 "src/ehc/Opts/Base.chs" #-}+{-# LINE 531 "src/ehc/Opts/Base.chs" #-} ehcOptTarget :: EHCOpts -> Target ehcOptTarget = maybeOk (\s -> panic ("ehcOptTarget: " ++ s)) id . ehcOptMbTarget ehcOptTargetFlavor :: EHCOpts -> TargetFlavor ehcOptTargetFlavor = maybeOk (\s -> panic ("ehcOptTargetFlavor: " ++ s)) id . ehcOptMbTargetFlavor -{-# LINE 538 "src/ehc/Opts/Base.chs" #-}+{-# LINE 539 "src/ehc/Opts/Base.chs" #-} -- | Generate system F (20120421 AD: very much under construction) ehcOptCoreSysF :: EHCOpts -> Bool ehcOptCoreSysF _ = False@@ -286,7 +287,7 @@ ehcOptCoreSysFCheckOnlyVal :: EHCOpts -> Bool ehcOptCoreSysFCheckOnlyVal opts = ehcOptCoreSysFCheck opts -{-# LINE 572 "src/ehc/Opts/Base.chs" #-}+{-# LINE 573 "src/ehc/Opts/Base.chs" #-} -- generate bytecode ehcOptEmitExecBytecode :: EHCOpts -> Bool ehcOptEmitExecBytecode _ = False@@ -294,12 +295,12 @@ ehcOptEmitBytecode :: EHCOpts -> Bool ehcOptEmitBytecode _ = False -{-# LINE 629 "src/ehc/Opts/Base.chs" #-}+{-# LINE 630 "src/ehc/Opts/Base.chs" #-} -- | Check Cmm ehcOptCmmCheck :: EHCOpts -> Bool ehcOptCmmCheck _ = False -{-# LINE 639 "src/ehc/Opts/Base.chs" #-}+{-# LINE 640 "src/ehc/Opts/Base.chs" #-} -- | Via Core -> Grin -> CMM -> JS ? ehcOptIsViaGrinCmmJavaScript :: EHCOpts -> Bool ehcOptIsViaGrinCmmJavaScript opts@@ -311,31 +312,31 @@ = targetIsViaCoreJavaScript t where t = ehcOptTarget opts -{-# LINE 660 "src/ehc/Opts/Base.chs" #-}+{-# LINE 661 "src/ehc/Opts/Base.chs" #-} ehcOptIsViaCmm :: EHCOpts -> Bool ehcOptIsViaCmm opts = ehcOptIsViaGrinCmmJavaScript opts {-# INLINE ehcOptIsViaCmm #-} -{-# LINE 666 "src/ehc/Opts/Base.chs" #-}+{-# LINE 667 "src/ehc/Opts/Base.chs" #-} ehcOptIsViaGrin :: EHCOpts -> Bool ehcOptIsViaGrin opts = ehcOptIsViaGrinCmmJavaScript opts || targetIsGrinBytecode t || targetDoesHPTAnalysis t where t = ehcOptTarget opts -{-# LINE 676 "src/ehc/Opts/Base.chs" #-}+{-# LINE 677 "src/ehc/Opts/Base.chs" #-} ehcOptBuiltin :: EHCOpts -> (EHBuiltinNames -> x) -> x ehcOptBuiltin o f = f $ ehcOptBuiltinNames o ehcOptBuiltin2 :: EHCOpts -> (EHBuiltinNames -> Int -> HsName) -> Int -> HsName ehcOptBuiltin2 o f i = f (ehcOptBuiltinNames o) i -{-# LINE 688 "src/ehc/Opts/Base.chs" #-}+{-# LINE 689 "src/ehc/Opts/Base.chs" #-} -- | Either fromJust with a possible panic, or with a default value (when debugging) ehcOptFromJust :: EHCOpts -> String -> a -> Maybe a -> a ehcOptFromJust opts panicMsg n m | ehcOptDebug opts = maybe n id m | otherwise = panicJust panicMsg m -{-# LINE 700 "src/ehc/Opts/Base.chs" #-}+{-# LINE 701 "src/ehc/Opts/Base.chs" #-} -- | Do linking into executable? ehcOptDoExecLinking :: EHCOpts -> Bool ehcOptDoExecLinking opts = ehcOptLinkingStyle opts == LinkingStyle_Exec
@@ -1,3 +1,3 @@ module UHC.Light.Compiler.SourceCodeSig where-sig = "3ddcbb16e055964ff5c25a07b42bdb42"-timestamp = "20141118 +0100 192532"+sig = "de8a05a61a5234b666f55ed72006ed9f"+timestamp = "20141119 +0100 190726"
@@ -1,10 +1,10 @@ Name: uhc-light-Version: 1.1.7.0+Version: 1.1.7.1 License: BSD3 Copyright: Utrecht University, Department of Information and Computing Sciences, Software Technology group Build-Type: Simple license-file: LICENSE -Author: UHC Team+Author: Atze Dijkstra Maintainer: uhc-developers@lists.science.uu.nl Homepage: https://github.com/UU-ComputerScience/uhc Bug-Reports: https://github.com/UU-ComputerScience/uhc/issues@@ -12,7 +12,8 @@ Synopsis: Part of UHC packaged as cabal/hackage installable library Description: A 'light' variant of UHC including only an API and an executable for compiling to Core representation. This version is just to test the infrastructure. Later versions will provide a fleshing out of the API 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.7.0/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.7.0/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.7.0/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.7.1/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.7.1/103/cr/plain/Unsafe/Coerce.hi +extra-source-files: changelog.md Library Hs-Source-Dirs: src@@ -23,6 +24,6 @@ Executable uhcl Hs-Source-Dirs: src- Build-Depends: uhc-light==1.1.7.0, 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.7.1, 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