Note that all (True ==) is logically equivalent to all id and to
the and function from the prelude.
A more general approach based on type classes, the function taut takes
a boolean function and determines (by exhaustive search) if it is a
tautology:
class BooleanFunction a where
taut :: a -
I'm trying to prove that (==) is reflexive, symmetric, and transitive over the
Bools, given this definition:
(==) :: Bool - Bool - Boolx == y =
(x y) || (not x not y)
My question is: are the proofs below for reflexivity and symmetricity
rigorous
2010/5/21 R J rj248...@hotmail.com:
I'm trying to prove that (==) is reflexive, symmetric, and transitive over
the Bools, given this definition:
(==) :: Bool - Bool - Bool
x == y = (x y) || (not x not y)
My question is: are the proofs below
Brandon S. Allbery KF8NH wrote:
It's not a call, it's a definition as shown above. The simpler
translation is:
x - y
becomes
y = \x -
(note incomplete expression; the next line must complete it) and the
refutable pattern match takes place in the lambda binding. But because
of the
On Sun, May 9, 2010 at 7:27 AM, wren ng thornton w...@freegeek.org wrote:
The only examples I can think of where we'd want 'fail'-able patterns are
entirely pedagogical (and are insignificantly altered by not using
'fail'-able patterns). I can't think of any real code where it would
actually
On May 9, 2010, at 06:18 , Ben Millwood wrote:
On Sun, May 9, 2010 at 7:27 AM, wren ng thornton w...@freegeek.org
wrote:
The only examples I can think of where we'd want 'fail'-able
patterns are
entirely pedagogical (and are insignificantly altered by not using
'fail'-able patterns). I
Brandon S. Allbery KF8NH allb...@ece.cmu.edu writes:
I've always had the feeling that if I need catMaybes, I haven't
thought through the data representation (or possibly manipulation)
fully.
I've used catMaybes in several places: for example, in SourceGraph only
interesting analyses are
On Sat, May 8, 2010 at 1:16 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
David Menendez d...@zednenem.com writes:
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
Well, any time you have a do-block like this you're using failable
patterns:
maybeAdd :: Maybe Int -
David Menendez d...@zednenem.com writes:
That does not invoke fail.
Let's take a simpler example: do { x - Nothing; stmt }. This translates to
let
ok x = do { stmt }
ok _ = fail ...
in Nothing = ok
By the definition of (=) for Maybe, 'ok' is never called.
As I said in another
On May 8, 2010, at 02:16 , Ivan Lazar Miljenovic wrote:
David Menendez d...@zednenem.com writes:
That does not invoke fail.
Let's take a simpler example: do { x - Nothing; stmt }. This
translates to
let
ok x = do { stmt }
ok _ = fail ...
in Nothing = ok
By the definition of (=) for
sites which don't obviously handle the new
failing case. Presumably if they were really really sure then just a
few well-placed ~s would make the problem go away.
(i.e. to answer your question, pattern matching against any
single-constructor data type should be unfailable in my opinion).
On Sat, May 8
Yes, I wonder why mtl is not updated so as to remove this restriction.
2010/5/1 John Millikin jmilli...@gmail.com
You might want to make a local version of ErrorT in your library, to
avoid the silly 'Error' class restriction. This is pretty easy; just
copy it from the 'transformers' or 'mtl'
Limestraël limestr...@gmail.com writes:
2010/5/1 John Millikin jmilli...@gmail.com
You might want to make a local version of ErrorT in your library, to
avoid the silly 'Error' class restriction. This is pretty easy; just
copy it from the 'transformers' or 'mtl' package.
Yes, I wonder why
On Sat, May 08, 2010 at 07:49:57AM +1000, Ivan Lazar Miljenovic wrote:
Limestraël limestr...@gmail.com writes:
2010/5/1 John Millikin jmilli...@gmail.com
You might want to make a local version of ErrorT in your library, to
avoid the silly 'Error' class restriction. This is pretty easy;
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be
implemented through MonadPlus.
2010/5/8 Ross Paterson r...@soi.city.ac.uk
On Sat, May 08, 2010 at 07:49:57AM +1000, Ivan Lazar Miljenovic wrote:
On May 7, 2010, at 4:54 PM, Limestraël wrote:
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be implemented
through MonadPlus.
As far as I can tell, its purpose is to essentially allow you to
On Sat, May 08, 2010 at 01:54:21AM +0200, Limestraël wrote:
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be implemented
through MonadPlus.
It was introduced to implement pattern match failure in
On May 7, 2010, at 19:54 , Limestraël wrote:
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be
implemented through MonadPlus.
The translation of do syntax involves pattern matching (do
{ [x,y,z]
...
In this case, there's no need to fail 'in the monad', because either the value
in question *is* of the form (x, y), or it is bottom, in which case the whole
expression should be bottom anyhow (because we're not supposed to be able to
detect bottoms like that). Patterns like the above had
On Fri, May 07, 2010 at 08:27:04PM -0400, Dan Doel wrote:
Personally, I don't really understand why unfailable patterns were canned
(they don't seem that complicated to me), so I'd vote to bring them back, and
get rid of fail. But hind sight is 20/20, I suppose (or perhaps there exist
cogent
On Fri, May 7, 2010 at 10:26 PM, John Meacham j...@repetae.net wrote:
On Fri, May 07, 2010 at 08:27:04PM -0400, Dan Doel wrote:
Personally, I don't really understand why unfailable patterns were canned
(they don't seem that complicated to me), so I'd vote to bring them back, and
get rid of
Limestraël limestr...@gmail.com writes:
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be
implemented through MonadPlus.
Polyparse uses it, and I believe Parsec does as well...
--
Ivan Lazar
David Menendez d...@zednenem.com writes:
I wonder how often people rely on the use of fail in pattern matching.
Could we get by without fail or unfailable patterns?
ensureCons :: MonadPlus m = [a] - m [a]
ensureCons x@(_:_) = return x
ensureCons _ = mzero
do ...
x:xs - ensureCons $
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
David Menendez d...@zednenem.com writes:
I wonder how often people rely on the use of fail in pattern matching.
Could we get by without fail or unfailable patterns?
ensureCons :: MonadPlus m = [a] - m [a]
David Menendez d...@zednenem.com writes:
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
Well, any time you have a do-block like this you're using failable
patterns:
maybeAdd :: Maybe Int - Maybe Int - Maybe Int
maybeAdd mx my = do x - mx
y - my
On May 8, 2010, at 01:16 , Ivan Lazar Miljenovic wrote:
David Menendez d...@zednenem.com writes:
On Sat, May 8, 2010 at 12:15 AM, Ivan Lazar Miljenovic
Well, any time you have a do-block like this you're using failable
patterns:
maybeAdd :: Maybe Int - Maybe Int - Maybe Int
maybeAdd mx
On Fri, 2010-05-07 at 19:26 -0700, John Meacham wrote:
On Fri, May 07, 2010 at 08:27:04PM -0400, Dan Doel wrote:
Personally, I don't really understand why unfailable patterns were canned
(they don't seem that complicated to me), so I'd vote to bring them back,
and
get rid of fail. But
Brandon S. Allbery KF8NH allb...@ece.cmu.edu writes:
On May 8, 2010, at 01:16 , Ivan Lazar Miljenovic wrote:
Huh? What about maybeAdd (Just 2) Nothing ?
Isn't that handled by the definition of (=) in Maybe, as opposed to
by invoking fail?
instance Monad Maybe where
-- ...
Nothing =
On Wed, May 05, 2010 at 02:54:27PM -0700, Ryan Ingram wrote:
ErrorT is just a newtype wrapper, changing the order/application of
the type variables.
newtype ErrorT e m a = ErrorT (m (Either e a))
runErrorT (ErrorT action) = action
This gives the bijection:
ErrorT :: m (Either e a) -
On Thu, May 6, 2010 at 9:56 AM, Eugene Dzhurinsky b...@redwerk.com wrote:
On Wed, May 05, 2010 at 02:54:27PM -0700, Ryan Ingram wrote:
ErrorT is just a newtype wrapper, changing the order/application of
the type variables.
newtype ErrorT e m a = ErrorT (m (Either e a))
runErrorT (ErrorT
On Thu, May 06, 2010 at 10:05:05AM +0200, David Virebayre wrote:
A constructor can be seen as a function that takes some parameters and
produces a value
for example with the type Maybe a, which has 2 constructors ; Just and
Nothing :
Prelude :t Just
Just :: a - Maybe a
the
By the way, I didn't exactly reply your question :
[...] Basically, i don't understand what does ErrorT :: means - it
should name the function - but it starts with capital letter?
It's a type signature, it describes the type of ErrorT:
Prelude import Control.Monad.Error
Prelude
ErrorT is just a newtype wrapper, changing the order/application of
the type variables.
newtype ErrorT e m a = ErrorT (m (Either e a))
runErrorT (ErrorT action) = action
This gives the bijection:
ErrorT :: m (Either e a) - ErrorT e m a
runErrorT :: ErrorT e m a - m (Either e a)
We can now
On Sat, May 01, 2010 at 02:42:26PM -0700, Ryan Ingram wrote:
Check out ErrorT in Control.Monad.Error
:t ErrorT
ErrorT :: m (Either e a) - ErrorT e m a
At this point I am lost. I'm not sure that I do understand this type
transformation correctly. So we have some sort of monadic type m, error
ErrorT :: IO (Either Error String) - ErrorT Error IO String
I can think that can be written as
ErrorT :: IO (Either Error String) - ErrorT Error (IO String)
Am I correct?
No, you're not. Similar to function application, type application is
also left-associative, so it can (but shouldn't)
Hello!
I have some sort of strange question:
assume that there are 2 functions
func1 :: Int - IO (Either Error String)
func2 :: String - IO (Either Error [String])
in case if there will be no IO involved, I could use
Control.Monad.Either and write something like
runCalc :: Int - IO (Either
can do this:
runCalc = runErrorT (ErrorT (func1 p) = ErrorT . func2)
The restriction to the typeclass Error is to allow implementation of
the fail method in Monad.
-- ryan
2010/5/1 Eugeny N Dzhurinsky b...@redwerk.com:
Hello!
I have some sort of strange question:
assume that there are 2
(ErrorT (func1 p) = ErrorT . func2)
The restriction to the typeclass Error is to allow implementation of
the fail method in Monad.
-- ryan
2010/5/1 Eugeny N Dzhurinsky b...@redwerk.com:
Hello!
I have some sort of strange question:
assume that there are 2 functions
func1 :: Int - IO
])
runCalc param = runEitherT $ runCalc param
(EitherT is on Hackage)
On 2 May 2010, at 01:37, Eugeny N Dzhurinsky wrote:
Hello!
I have some sort of strange question:
assume that there are 2 functions
func1 :: Int - IO (Either Error String)
func2 :: String - IO (Either Error [String])
in case
n = let { f = foldr (*) 1 [1..n] } in f
--
View this message in context:
http://old.nabble.com/A-newbie-question---tp28383563p28383563.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Haskell-Cafe mailing list
Haskell
On 28 April 2010 10:17, zaxis z_a...@163.com wrote:
newtype TypeMap = TypeMap (Map.Map TypeRep Dynamic)
lookup :: Typeable a = TypeMap - Maybe a
lookup (TypeMap mp) = res
where res = liftM (fromJust . fromDynamic) $ Map.lookup (typeOf $
fromJust res) mp
It seems that the `res` in
:
http://old.nabble.com/A-newbie-question---tp28383563p28383563.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
!
-
fac n = let { f = foldr (*) 1 [1..n] } in f
--
View this message in context:
http://old.nabble.com/A-newbie-question---tp28383563p28383563.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Haskell-Cafe
Hi
If you are working with characteristic functions (Point - Bool or
Point - Colour...) the common way to do this is to manufacture a Num
instance for functions. This gives you syntax overloading of the (+,
-, *) operators. Similarly you might want to overload (or have to
overload) Floating,
Great job Stephen.
Thank for explaining . I got it to work.
On Tue, Apr 20, 2010 at 9:21 AM, Stephen Tetley stephen.tet...@gmail.comwrote:
Hi
If you are working with characteristic functions (Point - Bool or
Point - Colour...) the common way to do this is to manufacture a Num
instance for
Hello
I am sorry for the silly question.
I have a function as the following
func:: ((Float,Float) -Bool) - Float - ((Float,Float) - Bool)
I am trying to make calculation in this type ((Float,Float) -Bool) with
Float and then pass the information to ((Float,Float) - Bool)
Thank again
Can you at least give an example of how you intend to use this func?
Since you do not describe it's behaviour, it is very hard to make a useful
comment (at least for me)
Best,
On 19 April 2010 16:54, Mujtaba Boori mujtaba.bo...@gmail.com wrote:
Hello
I am sorry for the silly question.
I
to make a useful
comment (at least for me)
Best,
On 19 April 2010 16:54, Mujtaba Boori mujtaba.bo...@gmail.com wrote:
Hello
I am sorry for the silly question.
I have a function as the following
func:: ((Float,Float) -Bool) - Float - ((Float,Float) - Bool)
I am trying to make
...@gmail.com wrote:
Hello
I am sorry for the silly question.
I have a function as the following
func:: ((Float,Float) -Bool) - Float - ((Float,Float) - Bool)
I am trying to make calculation in this type ((Float,Float)
-Bool) with Float and then pass
hard to make a
useful
comment (at least for me)
Best,
On 19 April 2010 16:54, Mujtaba Boori mujtaba.bo...@gmail.com
mailto:mujtaba.bo...@gmail.com wrote:
Hello
I am sorry for the silly question.
I have a function as the following
func
On Mon, Apr 12, 2010 at 10:27 PM, Mark Snyder muddsny...@yahoo.com wrote:
So in this line of thought, where we have the operations and the control
operators, I guess my original question wasn't aware of the distinction, and
was looking for a name for all of them combined. In Haskell
Hi
(Redirecting to cafe, for general chat.)
On 12 Apr 2010, at 01:39, Mark Snyder wrote:
Hello,
I'm wondering what the correct terminology is for the extra
functions that we define with monads. For instance, State has get
and put, Reader has ask and local, etc. Is there a good name
Hi Conor
William Harrison calls them 'non-proper morphisms' in his various
papers modelling threads etc. using resumption monads.
Best wishes
Stephen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Stephen
On 12 Apr 2010, at 13:00, Stephen Tetley wrote:
Hi Conor
William Harrison calls them 'non-proper morphisms' in his various
papers modelling threads etc. using resumption monads.
I like Bill's work on resumptions, but I'm not entirely convinced
by this phrase, which strikes me
Hi Conor
Chuan-kai Lin uses 'effect basis' in the ICFP paper on the Unimo
monads, otherwise I've seen 'operations' used. I'm on the fence for
'effect basis' vs. 'non-proper morphisms', but biased against
'operations' (as its not sufficiently characteristic).
Best wishes
Stephen
Sorry to interject a noob comment, and maybe I am not understanding
the question but why not just call MonadState etc. Monad subclasses?
get and put would then be Monad subclass functions.
-deech
On 4/12/10, Stephen Tetley stephen.tet...@gmail.com wrote:
Hi Conor
Chuan-kai Lin uses 'effect
From: Conor McBride co...@strictlypositive.org
To: Mark Snyder muddsny...@yahoo.com; haskell Cafe haskell-cafe@haskell.org
Sent: Mon, April 12, 2010 5:34:05 AM
Subject: Re: [Haskell] Monads Terminology Question
Hi
(Redirecting to cafe, for general chat.)
On 12 Apr 2010, at 01:39, Mark Snyder
On 12 April 2010 20:43, aditya siram aditya.si...@gmail.com wrote:
[SNIP] ... why not just call MonadState etc. Monad subclasses?
get and put would then be Monad subclass functions.
Hi
At a pinch, that would tie them into their (Haskell) implementation
technique. Picking an example I'm
Hello,
I'm wondering what the correct terminology is for the extra functions that
we define with monads. For instance, State has get and put, Reader has ask and
local, etc. Is there a good name for these? I've been calling them the
non-proper morphisms (as opposed to the proper
I think these names are specific to each data type (which happens to be
a monad) so unless they generalise, then they are not deserving of any
special terminology than any other functions.
While State and Reader are both Monads, they are also many other things
such as Functor and Applicative (and
On 12 April 2010 10:39, Mark Snyder muddsny...@yahoo.com wrote:
I'm wondering what the correct terminology is for the extra functions
that we define with monads. For instance, State has get and put, Reader has
ask and local, etc. Is there a good name for these? I've been calling them
A lte reply, but if you still need to have circular module depency: 4.6.9.
How to compile mutually recursive modules in
http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html
On 21 March 2010 01:31, Arnoldo Muller arnoldomul...@gmail.com wrote:
Hello Daniel,
Hello Daniel,
Regarding your solution, can I apply {-# SPECIALISE ... #-} statements to
datatypes I define?
And if so, I am not able to import the datatypes to the module where
binarySearch is.
The problem is that if I import them a circular dependency is detected and
the compiler gives an error.
Arnoldo Muller arnoldomul...@gmail.com wrote:
Right now, the bottleneck of my program is in binarySearch', the
function must be called a few billion times.
Do you have any ideas on how to improve the performance of this
function?
The fastest way to do a binary search is to reify it into
Thank you all, I will apply your suggestions to my function.
Thank you for making the process of learning Haskell much easier!
Arnoldo
On Fri, Mar 19, 2010 at 4:21 PM, Achim Schneider bars...@web.de wrote:
Arnoldo Muller arnoldomul...@gmail.com wrote:
Right now, the bottleneck of my
Hello!
I am trying to implement a binary search function that returns the index of
an
exact or the (index + 1) where the item should be inserted in an array if
the item to be searched is not found (I am not trying to insert data in the
array) .
Right now, the bottleneck of my program is in
Am Donnerstag 18 März 2010 19:59:33 schrieb Arnoldo Muller:
Hello!
I am trying to implement a binary search function that returns the index
of an
exact or the (index + 1) where the item should be inserted in an array
if the item to be searched is not found (I am not trying to insert data
in
Am Donnerstag 18 März 2010 20:49:30 schrieb Daniel Fischer:
Am Donnerstag 18 März 2010 19:59:33 schrieb Arnoldo Muller:
Hello!
I am trying to implement a binary search function that returns the
index of an
exact or the (index + 1) where the item should be inserted in an array
if the
Daniel Fischer wrote:
If it's called often, and the arrays are 0-based and Int-indexed,
import Data.Array.Base (unsafeAt)
and replacing ! with `unsafeAt` should give a speed-up, though probably not
terribly much. If you don't need the polymorphism and your array elements
are unboxable, using
Am Donnerstag 18 März 2010 21:57:34 schrieb Daniel Fischer:
Contrary to my expectations, however, using unboxed arrays is slower
than straight arrays (in my tests).
However, a few {-# SPECIALISE #-} pragmas set the record straight.
Specialising speeds up both, boxed and unboxed arrays,
On 19/03/2010, at 08:48, Daniel Fischer wrote:
Am Donnerstag 18 März 2010 21:57:34 schrieb Daniel Fischer:
Contrary to my expectations, however, using unboxed arrays is slower
than straight arrays (in my tests).
However, a few {-# SPECIALISE #-} pragmas set the record straight.
This is
:
http://old.nabble.com/Performance-question-tp27949969p27950864.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I'd like to add a warning to this discussion.
You might be affected by this issue:
http://trac.haskell.org/network/ticket/11
TL;DR: It is kind of random if you bind to IPv4 or IPv6 or both. For example
Windows Vista likes to bind to IPv6 only.
Watch your ports and protocols!
--
Gracjan
.html
- jeremy
On Thu, Mar 11, 2010 at 8:35 AM, Martin Kiefel m...@nopw.de wrote:
On Thu, Mar 11, 2010 at 09:24:05AM -0500, Kyle Murphy wrote:
You misunderstand his question. He's trying to setup happstack behind a
reverse proxy running on the same system, so he needs to be able to bind
Hello haskellers,
I want to host a simple happstack application behind a reverse proxy. So
ideally would be to bind it to localhost only.
According to
http://hackage.haskell.org/packages/archive/happstack-server/0.4.1/doc/html/Happstack-Server-HTTP-Types.html#t%3AConf
Conf datatyle has only
Hi Dmitry,
On Thu, Mar 11, 2010 at 11:38:44AM +0300, Dmitry V'yal wrote:
Hello haskellers,
I want to host a simple happstack application behind a reverse proxy. So
ideally would be to bind it to localhost only.
According to
You misunderstand his question. He's trying to setup happstack behind a
reverse proxy running on the same system, so he needs to be able to bind it
only to the loopback interface (127.0.0.1), as opposed to all the interfaces
on the system (thereby making it inaccessible from the network unless
On Thu, Mar 11, 2010 at 09:24:05AM -0500, Kyle Murphy wrote:
You misunderstand his question. He's trying to setup happstack behind a
reverse proxy running on the same system, so he needs to be able to bind it
only to the loopback interface (127.0.0.1), as opposed to all the interfaces
:
On Thu, Mar 11, 2010 at 09:24:05AM -0500, Kyle Murphy wrote:
You misunderstand his question. He's trying to setup happstack behind a
reverse proxy running on the same system, so he needs to be able to bind
it
only to the loopback interface (127.0.0.1), as opposed to all the
interfaces
2010/2/24 Brandon S. Allbery KF8NH allb...@ece.cmu.edu:
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
#! /usr/bin/env bash
./prog --RTS $*
./prog --RTS $@
Otherwise it will work wrong if arguments contain quoted
On Wed, Feb 24, 2010 at 07:18, Roman Cheplyaka r...@ro-che.info wrote:
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2010-02-24 00:02:12-0500]
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
#! /usr/bin/env bash
./prog
* Artyom Kazak artyom.ka...@gmail.com [2010-02-24 10:23:07+0200]
2010/2/24 Brandon S. Allbery KF8NH allb...@ece.cmu.edu:
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
#! /usr/bin/env bash
./prog --RTS $*
* Magnus Therning mag...@therning.org [2010-02-24 09:11:54+]
On Wed, Feb 24, 2010 at 07:18, Roman Cheplyaka r...@ro-che.info wrote:
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2010-02-24 00:02:12-0500]
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley
Quoth Roman Cheplyaka r...@ro-che.info,
...
Well, this agrees with POSIX. So still I don't see the difference
between $@ and ${1+$@}.
Whatever the standards etc. may say, I believe $@ is reliably the
same as ${1+$@}, for old Bourne shells and new.
Donn
On Feb 24, 2010, at 02:18 , Roman Cheplyaka wrote:
#! /bin/sh
./prog --RTS ${1+$@}
The longer specification above should work with whatever /bin/sh is
around, whether it's Solaris /sbin/sh, FreeBSD's sh, general Linux
bash, Debian/Ubuntu dash, etc.
Are you referring to some Solaris shell
On Feb 24, 2010, at 05:19 , Roman Cheplyaka wrote:
Well, this agrees with POSIX. So still I don't see the difference
between $@ and ${1+$@}.
The difference is that Unix /bin/sh predates POSIX, and on systems
that usefully support a notion of backward compatibility (nostly
commercial,
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
#! /usr/bin/env bash
./prog --RTS $*
./prog --RTS $@
Otherwise it will work wrong if arguments contain quoted field
separators (e.g. spaces).
#! /bin/sh
./prog --RTS
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2010-02-24 00:02:12-0500]
On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote:
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
#! /usr/bin/env bash
./prog --RTS $*
./prog --RTS $@
Otherwise it will work wrong if arguments
2010/2/22 Ivan Miljenovic ivan.miljeno...@gmail.com:
On 22 February 2010 10:55, Lennart Augustsson lenn...@augustsson.net wrote:
Supply a fix for the problem, and it will probably get included.
There has probably been little demand for this feature so far.
But it is a little bit weird where
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500]
On Sun, Feb 21, 2010 at 1:58 PM, Artyom Kazak artyom.ka...@gmail.com wrote:
So, if I type ./prog +RTS --RTS +RTS, the output will be +RTS. But
I want the output to be equal to the input IN ALL CASES, without any
quotes,
Hello everybody!
I want to write a little program, that will receive a string as command-line
argument and write it in the file. But if this string contains '+RTS', GHC
runtime won't pass the rest of the string to my program.
What can I do to avoid this?
On Sun, Feb 21, 2010 at 05:45:22PM +0200, Artyom Kazak wrote:
Hello everybody!
I want to write a little program, that will receive a string as command-line
argument and write it in the file. But if this string contains '+RTS', GHC
runtime won't pass the rest of the string to my program.
What
Am Sonntag 21 Februar 2010 16:45:22 schrieb Artyom Kazak:
Hello everybody!
I want to write a little program, that will receive a string as
command-line argument and write it in the file. But if this string
contains '+RTS', GHC runtime won't pass the rest of the string to my
program.
What can
Enclose it in double quotes (perhaps single quotes would also work)
No, I want my program to work the same way as UNIX echo does.
Without any double quotes.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Am Sonntag 21 Februar 2010 18:20:43 schrieb Artyom Kazak:
Enclose it in double quotes (perhaps single quotes would also work)
No, I want my program to work the same way as UNIX echo does.
Without any double quotes.
Okay, what about
If you absolutely positively want all the rest of the
2010/2/21 Daniel Fischer daniel.is.fisc...@web.de:
Am Sonntag 21 Februar 2010 18:20:43 schrieb Artyom Kazak:
Enclose it in double quotes (perhaps single quotes would also work)
No, I want my program to work the same way as UNIX echo does.
Without any double quotes.
Okay, what about
If
On 21 February 2010 18:58, Artyom Kazak artyom.ka...@gmail.com wrote:
So, if I type ./prog +RTS --RTS +RTS, the output will be +RTS. But
I want the output to be equal to the input IN ALL CASES, without any
quotes, additional options, etc. I want all the command line to go to
my program. How
On Sun, Feb 21, 2010 at 1:58 PM, Artyom Kazak artyom.ka...@gmail.com wrote:
So, if I type ./prog +RTS --RTS +RTS, the output will be +RTS. But
I want the output to be equal to the input IN ALL CASES, without any
quotes, additional options, etc. I want all the command line to go to
my program.
Am Sonntag 21 Februar 2010 19:58:12 schrieb Artyom Kazak:
2010/2/21 Daniel Fischer daniel.is.fisc...@web.de:
Am Sonntag 21 Februar 2010 18:20:43 schrieb Artyom Kazak:
Enclose it in double quotes (perhaps single quotes would also work)
No, I want my program to work the same way as UNIX
On Sun, Feb 21, 2010 at 7:10 PM, Max Bolingbroke
batterseapo...@hotmail.com wrote:
You might be able to get somewhere by writing a custom main function
in C and linking it in. According to
http://haskell.org/ghc/docs/latest/html/users_guide/options-phases.html
if a lib specified with the -l
901 - 1000 of 4551 matches
Mail list logo