[Haskell-cafe] how unsafe is this?

2006-12-30 Thread Ben Clifford
I've defined a helper function to let me do regexps in functional style: > sed exp str = unsafePerformIO $ do > regexp <- regcomp exp 0 > regexec regexp str Is this always safe? or where is it not? (I'm using any one regexp more than once so it doesn't bother me that it compiles each time)

Re: [Haskell-cafe] how unsafe is this?

2006-12-30 Thread Donald Bruce Stewart
benc: > > I've defined a helper function to let me do regexps in functional style: > > > sed exp str = unsafePerformIO $ do > > regexp <- regcomp exp 0 > > regexec regexp str > > Is this always safe? or where is it not? > > (I'm using any one regexp more than once so it doesn't bother me that