Haskell에서 MongoDB를 사용하려고합니다. 나는 this tutorial을 시작점으로 사용하고있었습니다. 내가 전주곡에 이러한 명령을 수행 할 때, 나는 컬렉션의 목록을 얻을 : 나는 Yesod 처리기에 그것을 넣어하려고 할 때, 그러나 pipe <- runIOE $ connect $ Host "XXXXX.mongolab.com" $ PortNum
.hs 코드 : data Person = Person { firstName :: String
, lastName :: String
, age :: Int
} deriving (Eq, Show, Read)
편집 : *Main> :load "/home/optimight/baby.hs"
[1 of 1] Com
*Main> :t putStrn
<interactive>:1:1:
Not in scope: `putStrn'
Perhaps you meant one of these:
`putStr' (imported from Prelude),
`putStrLn' (imported from Prelude) 나는 haskell 모드로 이맥스에서 has
Programming in Haskell (2e) 8 장 데이터 Tree 이진 검색 기능 occurs를 정의 : CHAP (8) data Tree a = Leaf a | Node (Tree a) a (Tree a)
occurs :: Ord a => a -> Tree a -> Bool
occurs x (Leaf y) = x == y
occurs