Em Qui, 2007-01-11 às 06:37 -0800, Tom Titchener escreveu: > ERROR - Cannot find "show" function for: > > *** Expression : eval answer > > *** Of type : Int -> (Int,Int)
> type M a = State -> (a, State) -- higher-order type, e.g. function > type > > type State = Int -- type synonym So M a = Int -> (a, Int) > eval :: Term -> M Int So eval :: Term -> Int -> (Int, Int) > answer, error :: Term > I get the “ERROR” message when I type “eval answer” at the Hugs > prompt. eval answer :: M Int eval answer :: Int -> (Int, Int) Then you got to the error: there's no instance Show (Int -> (Int, Int)) To call eval (x :: Term) you must pass a initial State, say 0. eval answer 0 :: (Int, Int) -- malebria Marco Túlio Gontijo e Silva Correio (MSN): [EMAIL PROTECTED] Jabber (GTalk): [EMAIL PROTECTED] Telefone: 33346720 Celular: 98116720 Endereço: Rua Paula Cândido, 257/201 Gutierrez 30430-260 Belo Horizonte/MG Brasil _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe