File: Main.hs

package info (click to toggle)
lambdabot 4.2.3.2-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,584 kB
  • sloc: haskell: 10,102; ansic: 76; makefile: 7
file content (26 lines) | stat: -rw-r--r-- 588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--
-- | Let's go lambdabot!
--
module Main where

import LMain
import Modules      (modulesInfo)
import Lambdabot

import Data.Maybe
import System.Posix.Signals

-- do argument handling
main :: IO ()
main = do
    -- when 'popen' is called on a non-existing executable, SIGPIPE is sent,
    -- causing lambdabot to exit:
    installHandler sigPIPE Ignore Nothing
    main' Nothing modulesInfo

-- special online target for ghci use
online :: [String] -> IO ()
online strs = runIrc strs (fst modulesInfo) ld pl
    where
    ld = fromMaybe (error "no dynamic loading") Nothing
    pl = []