_______________________________________________Hello cafe,I am trying to do the following:data Foo = Foo { a1 :: Int -> Int, a2 :: Int -> Char }data Bar = Bar { a1 :: Int -> Int }funcĀ :: a -> Maybe (Int -> Int) -- a is either Foo or Barfunc (x::(Bar/Foo) = Just $ a1 xfunc _ = NothingI'm not sure how to implement this. All I know that the types are matching so I think it could be possible.Thanks for your help-Yotam
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.