Starting Hugs n UNIX hugs ghci n Windows

  • Slides: 21
Download presentation

Starting Hugs n UNIX では、シェルプロンプトから hugs (ghci) を起動する n Windows では、スタートメニュの Haskell Platformから、 GHCi

Starting Hugs n UNIX では、シェルプロンプトから hugs (ghci) を起動する n Windows では、スタートメニュの Haskell Platformから、 GHCi か Win. GHCi を起動する % hugs __ __ || || ||___|| ||---|| || || __ __ ___ || || ||__|| ___|| _____________________ Hugs 98: Based on the Haskell 98 standard Copyright (c) 1994 -2005 World Wide Web: http: //haskell. org/hugs Bugs: http: //hackage. haskell. org/trac/hugs Version: September 2006 _____________________ Haskell 98 mode: Restart with command line option -98 to enable extensions Type : ? for help Hugs> % ghci GHCi, version 6. 12. 3: http: //www. haskell. org/ghc/ Loading package ghc-prim. . . linking. . . done. Loading package integer-gmp. . . linking. . . done. Loading package base. . . linking. . . done. Prelude> : ? for help 1

Examples Mathematics Haskell f(x) f x f(x, y) f x y f(g(x)) f (g

Examples Mathematics Haskell f(x) f x f(x, y) f x y f(g(x)) f (g x) f(x, g(y)) f x (g y) f(x)g(y) f x * g y 11

役に立つHugs (ghci)コマンド Command Meaning : load name : reload : edit name : edit

役に立つHugs (ghci)コマンド Command Meaning : load name : reload : edit name : edit : type expr : ? : quit load script name reload current script edit script name edit current script show type of expr show all commands quit Hugs 20