io monad question

luc ltaesch@europemail.com
Sun, 13 May 2001 11:22:05 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C0DB9E.F09842C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

i designed some basic functions, , mainly String -> [String], or similar =
with types, plus some more complex datatypes.

Up to now; i was testing them on a basic database I was creating in the =
core main, "by hand".
Then i added a basic parser with happy; and bingo; my test database is =
now loaded from a file... as IO String..; huh!

after a second though; this makes sense, except that i have to change =
all the type of my functions; now IO String..

plus a few that just dont compile; and i cant understand why...

my question:
I had to change most of my type of the functions.as is propagated =
through the code. (i.e. f need g; that need h; etc...) to add IO.
is that kind of propagation normal, or can i Stop it somewhere ? how?
is that because my functions just uses string as type ? and not data (ie =
type relation =3Dstring; instead data Relation String)
can i design a function that will do IO String-> String, or IO String -> =
Data X, that will stop that IO propagation , through my code ?
how can i handle function when my database is not IO, then ?

i suppose im not the first to ask. any link ? thread ? faq example would =
be welcomed...

------=_NextPart_000_001B_01C0DB9E.F09842C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#b0caea>
<DIV><FONT face=3DArial size=3D2>i designed some basic functions, , =
mainly String=20
-&gt; [String], or similar with types, plus some more complex=20
datatypes.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Up to now; i was testing them on a =
basic database I=20
was creating in the core main, "by hand".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Then i added a basic parser with happy; =
and bingo;=20
my test database is now loaded from a file... as IO String..; =
huh!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>after a second though; this makes =
sense, except=20
that i have to change all the type of my functions; now IO =
String..</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>plus a few that just dont compile; and =
i cant=20
understand why...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>my question:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I had to change most of my type of the =
functions.as=20
is propagated through the code. (i.e. f need g; that need h; etc...) to =
add=20
IO.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>is that kind of propagation normal, or =
can i Stop=20
it somewhere ? how?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>is that because my functions just uses =
string as=20
type ? and not data (ie type relation =3Dstring; instead data Relation=20
String)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>can i design a function that will do IO =
String-&gt;=20
String, or IO String -&gt; Data X, that will stop that IO propagation , =
through=20
my code ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>how can i handle function when my =
database is not=20
IO, then ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>i suppose im not the first to ask. any =
link ?=20
thread ? faq example would be welcomed...</FONT></DIV></BODY></HTML>

------=_NextPart_000_001B_01C0DB9E.F09842C0--