From
meInvent bbird@21:1/5 to
All on Mon Jul 18 02:30:33 2016
in ghci, run code below , it can run without error
but after put in file test.hs
then :l test.hs
got error
Prelude> :l trees.hs
[1 of 1] Compiling Main ( trees.hs, interpreted )
parse error (possibly incorrect indentation or mismatched brackets)
Failed, modules loaded: none.
import Data.List
import Control.Monad
import Math.Combinat
import System.IO
import Data.Map (Map)
import qualified Data.Map as Map
let allparams = replicateM 2 [0.0, 1.0]
let a1 = [0.0, 1.0, 1.0, 1.0]
let a2 = [0.0, 0.0, 0.0, 1.0]
let a3 = [1.0, 1.0, 0.0, 1.0]
op1 :: Map (Double, Double) Double
op1 = Map.fromList [((allparams!!i!!0, allparams!!i!!1), a1!!i) | i <- [0..3] ]
op2 :: Map (Double, Double) Double
op2 = Map.fromList [((allparams!!i!!0, allparams!!i!!1), a2!!i) | i <- [0..3] ]
op3 :: Map (Double, Double) Double
op3 = Map.fromList [((allparams!!i!!0, allparams!!i!!1), a3!!i) | i <- [0..3] ]
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)