Re: [Haskell-cafe] different results after compilation
On Wednesday 24 August 2011, 14:45:19, Комар Максим wrote: > I have some script: > $ runhaskell readfile.hs > fromList [(Merchant {nick = "01010", location = "prontera", x = 184, y > = 94},Shop {buy = ShopBuy {titleB = "AB> Green Salad=5k", itemsB = > fromList [(Item {itemId = 12065, price = 5000, refine = "", card1 = 0, > card2 = 0, card3 = 0, card4 = 0},(100,97))]}, sell = ShopSell {titleS = > "", itemsS = fromList []}})] > $ ghc --make readfile.hs > Linking readfile ... > $ ./readfile > $ > > why results are different? Can we see the code? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] different results after compilation
The reason may be that you are not printing the result in your program. runhaskell script prints the result of the "main" computation by default. The compiled programs don't do that. You'll have to call "print" in your program to achieve the same. On 24 August 2011 13:45, Комар Максим wrote: > I have some script: > $ runhaskell readfile.hs > fromList [(Merchant {nick = "01010", location = "prontera", x = 184, y > = 94},Shop {buy = ShopBuy {titleB = "AB> Green Salad=5k", itemsB = > fromList [(Item {itemId = 12065, price = 5000, refine = "", card1 = 0, > card2 = 0, card3 = 0, card4 = 0},(100,97))]}, sell = ShopSell {titleS = > "", itemsS = fromList []}})] > $ ghc --make readfile.hs > Linking readfile ... > $ ./readfile > $ > > why results are different? > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe