Re: enumFromThenTo for Doubles

2016-08-10 Thread Evan Laforge
Way back when I started with haskell I noticed this, and switched to using this: -- | Enumerate an inclusive range. Uses multiplication instead of successive -- addition to avoid loss of precision. -- -- Also it doesn't require an Enum instance. range :: (Num a, Ord a) => a -> a -> a -> [a]

RE: enumFromThenTo for Doubles

2016-08-10 Thread Simon Peyton Jones via ghc-devs
Sounds somewhat plausible. By all means give it a try. S -Original Message- From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Andrew Farmer Sent: 10 August 2016 04:22 To: ghc-devs@haskell.org Subject: enumFromThenTo for Doubles Noticed this today: ghci> let xs =

Re: Is Safe Haskell intended to allow segfaults?

2016-08-10 Thread Ryan Newton
Hi Simon, On Wed, Aug 10, 2016 at 4:24 AM, Simon Marlow > wrote: > Definining a safe subset of IO is usually an application-specific > decision, e.g. do you want to allow access to the filesystem but without >

[ANNOUNCE] Hac φ: a Haskell Exchange in Philadelphia, Oct 21–23

2016-08-10 Thread Kenny Foner
Hello Haskellers, Hac Phi, a yearly weekend of Haskell in Philadelphia, will take place Oct. 21–23, 2016, at the University of Pennsylvania. Hac Phi is a gathering of hackers and Haskell enthusiasts. Come bring a project you’re working on or offer to help someone else on a project of theirs.

Re: Is Safe Haskell intended to allow segfaults?

2016-08-10 Thread Ryan Yates
Hi Ryan, I have similar concerns with safety and STM. In particular, lazy validation allows for execution after inconsistent reads from TVars. The obvious problem to avoid is falling into an infinite loop. As long as -fno-omit-yields is used (on every module?) and maybe some other conditions

Re: Is Safe Haskell intended to allow segfaults?

2016-08-10 Thread Simon Marlow
Right - Safe Haskell provides the minimum that you need to be able to safely run untrusted code: the ability to trust the type system and the module system. Definining a safe subset of IO is usually an application-specific decision, e.g. do you want to allow access to the filesystem but without