haskell / unix

POSIX functionality
https://hackage.haskell.org/package/unix
Other
107 stars 92 forks source link

Rethink API wrt to operations not available on all platforms #23

Open hvr opened 10 years ago

hvr commented 10 years ago

Some time ago, based on the discussion in

http://thread.gmane.org/gmane.comp.lang.haskell.libraries/20865/focus=20936

@JohnLato prepared a patch at

https://github.com/JohnLato/packages-unix/commit/a1d905c4cce27c1efab834f1afaaa0d7f9bf1643

that's risking to be forgotten.

JohnLato commented 10 years ago

Ah, I thought that had been merged already because it doesn't change semantics of anything. Although it's only a half-solution, in that it doesn't implement a custom exception type (which could change the behavior of existing programs).

hvr commented 10 years ago

@JohnLato Yeah, I forgot about it... sorry

btw, if you have time, it'd be great if you could turn that patch into a pull-request against this repository...

JohnLato commented 10 years ago

@hvr nearly done. Not sure what to do about System.Posix.DynamicLinker.Prim.packDL though. I guess I'd be in favor of warning if it's used when undefined, but maybe that behavior is just annoying?

hvr commented 9 years ago

@JohnLato thanks for updating the patch!

hvr commented 9 years ago

I've used this technique for the new operations added via

e14fbe2cb3bbd604dadcc3847882ca37edf548b3 and 98eced86549def54dfb5057ef984a02c720be763

if this works out, we can convert the other existing functions with the next release (not sure yet if we'd need to major bump or just minor bump)