[Haskell-cafe] YAWQ (Yet Another Wash Question)

John Goerzen jgoerzen at complete.org
Thu Feb 24 11:42:37 EST 2005

Thanks for everyone that's helped me out with my Wash questions.  I have
one more.

I have a textInputField that I only want to display on a form in certain
cituations.  I can't figure out how to make this work.  For instance:

... do if cond
          then x <- textInputField ...
          else ()
       submit ...

Well, two problems there... first, the scope of the x doesn't reach to
the submit.  Second, there's a type issue.  So I thought maybe I could
figure out something like this:

... do x <- if cond
               then textInputField ...
               else ()

still stuck with the typing problem.

So I thought maybe something like this...

... do let x = if cond
                  then Just $ textInputField ...
                  else Nothing

Though I suspect this won't work either, since the textInputField won't
actually be processed at the right place in the program.

I then thought maybe I could kludge by this with a hidden field, but I
can't find one of those, either.

Ideas, anyone?


More information about the Haskell-Cafe mailing list