Newsgroups: comp.lang.haskell
From: daucl...@gmail.com
Date: Tue, 13 Nov 2007 08:36:35 -0800
Local: Tues, Nov 13 2007 11:36 am
Subject: Types with state monad?
Hi! I just finished reading the "Man or Boy" post and wished to make
the example Haskell program a bit briefer with the following change: yo :: Integer -> [S s] -> S s and with that the new run is run' k = runST (yo k (map return [1 (-1) (-1) 1 0])) (instead of the original where the list argument is laid out as where type S s = ST s Integer ----- The compiler complains that: No instance for (Num (a -> a1 -> t -> t1 -> Integer)) ----- So, how is it that a list of the lifted integers is different than Sincerely, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||