Galchin, Vasili wrote:

data Bozo =
    Bozo {
      id :: Int
    }

bonzo :: Maybe Bozo -> IO ()
bonzo   maybe_bozo = do
   if maybe_bozo == (Just (Bozo  x))
      then
         return ()
      else
         return ()
~
>
> I want "x" to be a pattern that matches "id" .... ??

Try:

bonzo (Just (Bozo x)) = return ()
bonzo Nothing         = return ()

Kind regards, Vasili


Claude
--
http://claudiusmaximus.goto10.org
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to