Re-exporting modules in the Foreign hierarchy

Malcolm Wallace Malcolm.Wallace at
Mon Jan 20 08:35:20 EST 2003

Sven Panne <Sven.Panne at> writes:

> Yet another change request for the FFI libraries: For reasons of
> consistency, I propose to introduce an intermediate module
> Foreign.Marshal, which re-exports the modules:
>     Foreign.Marshal.Alloc
>     Foreign.Marshal.Array
>     Foreign.Marshal.Error
>     Foreign.Marshal.Pool
>     Foreign.Marshal.Utils

Seems reasonable.  It is a useful addition, with a trivial implementation,
so there's not much to go wrong I think.

> While I'm at it: What was the reason for the decision that Foreign.C
> re-exports
>     Foreign.C.Types
>     Foreign.C.String
>     Foreign.C.Error
> but not Foreign.C.TypesISO? If there wasn't a good one, I propose to
> add this for consistency again.

I was recently pondering the same question.  The answer is that
Foreign.C.Types already re-exports everything from Foreign.C.TypesISO,
and therefore, transitively, Foreign.C also does so.

I do seem to remember a proposal at one stage to remove Foreign.C.TypesISO
altogether by incorporating it fully into Foreign.C.Types.  Given that
the latter re-exports everything from the former, is there any reason
for TypesISO to remain separate?


More information about the FFI mailing list