Eclipseã§Haskellããæ¹æ³
Haskellãã©ã°ã¤ã³EclipseFPå°å
¥ã®ã¡ã¢ã
ã°ã°ã£ã¦ãè±èªã®ãµã¤ããããããããè¦æ¦ãã¦ãã¨ãã«åç»ã§åããããããã¤è¦ã¤ããããã¡ããè±èªã ãã©ãï¼
- Eclipseå ¥ããã
- ghcã¤ã³ã¹ãã¼ã«ã(http://www.haskell.org/ghc/)
- Help -> Software Updates... -> Available Softwareã¿ã° -> Add Site...ãã¿ã³ ã§http://eclipsefp.sourceforge.net/updates/ã追å ã
- 追å ãããã¤ã«ãã§ãã¯ãå ¥ãã¦ãInstall...ãã¿ã³ã§ã¤ã³ã¹ãã¼ã«ã
- Windw -> Preferences -> Functional Programming -> Haskell -> Compiler -> GHC compiler -> Browseãã¿ã³ã§ã¤ã³ã¹ãã¼ã«ããghcã®ã³ã³ãã¤ã©é¸æã
- ããã¸ã§ã¯ãçæãFile -> New -> Project -> Functional Programming -> Haskell Projectã§ã
- src以ä¸ã«ãã¡ã¤ã«ä½ã£ã¦ã½ã¼ã¹æ¸ããæ¡å¼µåã¯ã.hsãã
main = print("Hello world.")
- ã³ã³ãã¤ã«ãRun -> GHCi session
- æåãããä¸ã®Consoleã«ãmainãã¨æã¦ã°ãHello world.ãã£ã¦çãã¦ãããã¯ãï¼