forked from glen/fostr
fix: correct IO types in Haskell generation
This commit is contained in:
parent
5d81316ce2
commit
54bad48d9e
@ -17,19 +17,15 @@ rules
|
|||||||
hs: TopLevel((c,p)) -> $[import System.IO
|
hs: TopLevel((c,p)) -> $[import System.IO
|
||||||
data IOStream = StdIO
|
data IOStream = StdIO
|
||||||
|
|
||||||
stdio :: IO IOStream
|
gets :: Show b => a -> b -> IO a
|
||||||
stdio = return StdIO
|
|
||||||
|
|
||||||
gets :: Show b => IO a -> b -> IO a
|
|
||||||
gets s d = do
|
gets s d = do
|
||||||
temp <- s
|
|
||||||
putStr(show d)
|
putStr(show d)
|
||||||
return temp
|
return s
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
[p]return [c]]
|
[p]return [c]]
|
||||||
|
|
||||||
hs: Stream() -> ("stdio", "")
|
hs: Stream() -> ("StdIO", "")
|
||||||
hs: Int(x) -> (x, "")
|
hs: Int(x) -> (x, "")
|
||||||
hs: Sum( (c, p), (d, q)) -> ($[([c] + [d])], <conc-strings>(p,q))
|
hs: Sum( (c, p), (d, q)) -> ($[([c] + [d])], <conc-strings>(p,q))
|
||||||
hs: Gets((c, p), (d, q)) -> <hsget>(c,d,<conc-strings>(p,q),<newname>"fosgt")
|
hs: Gets((c, p), (d, q)) -> <hsget>(c,d,<conc-strings>(p,q),<newname>"fosgt")
|
||||||
|
Loading…
Reference in New Issue
Block a user