[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / programs / okeefe_neural / Main.hs
index 5c6cffa..bb28545 100644 (file)
@@ -1,5 +1,9 @@
+{-# OPTIONS -package lang #-}
+
 module Main(main) where
 
+import Int( Num(fromInt) )
+
 newtype RNG_State = RNG_State (Int, Int, Int)
 
 new_random i = RNG_State (i `mod` 30269, i `mod` 30307, i `mod` 30323)
@@ -121,7 +125,7 @@ train pats i_h_wt i_h_ch h_o_wt h_o_ch epochs s =
           out_err = vscale (vsub out_pat out_act) out_act
           hid_err = vscale (vmmul out_err h_o_wt) hid_act
 
-main = ans
+main = putStrLn (show ans)
     where (in1,out1)   = head patterns
           nin          = length in1
           nhid         = nin