stefan@stefans-MacBook-Pro week01 % ghci Loaded package environment from /Users/stefan/.ghc/x86_64-darwin-9.4.8/environments/default GHCi, version 9.4.8: https://www.haskell.org/ghc/ :? for help macro 'doc' overwrites builtin command. Use ':def!' to overwrite. Loaded GHCi configuration from /Users/stefan/.ghci ghci> 1 + 2 3 ghci> True && False False ghci> 2 ^ 3 8 ghci> 2 / 3 0.6666666666666666 ghci> True || False True ghci> 40 `div` 3 13 ghci> 40 `mod` 3 1 ghci> "asdf" "asdf" ghci> ln :9:1: error: Variable not in scope: ln ghci> log :10:1: error: • No instance for (Show (Double -> Double)) arising from a use of ‘print’ (maybe you haven't applied a function to enough arguments?) • In a stmt of an interactive GHCi command: print it ghci> log 23 3.1354942159291497 ghci> sin 23 -0.8462204041751706 ghci> log 23 + 1 4.13549421592915 ghci> log (23 + 1) 3.1780538303479458 ghci> log(23 + 1) 3.1780538303479458 ghci> :help Commands available from the prompt: evaluate/run : repeat last command :{\n ..lines.. \n:}\n multiline command :add [*] ... add module(s) to the current target set :browse[!] [[*]] display the names defined by module (!: more details; *: all top-level names) :cd change directory to :cmd run the commands returned by ::IO String :complete [] list completions for partial input string :ctags[!] [] create tags file for Vi (default: "tags") (!: use regex instead of line number) :def[!] define command : (later defined command has precedence, :: is always a builtin command) (!: redefine an existing command name) :doc display docs for the given name (experimental) :edit edit file :edit edit last module :etags [] create tags file for Emacs (default: "TAGS") :help, :? display this list of commands :info[!] [ ...] display information about the given names (!: do not filter instances) :instances display the class instances available for :issafe [] display safe haskell information of module :kind[!] show the kind of (!: also print the normalised type) :load[!] [*] ... load module(s) and their dependents (!: defer type errors) :main [ ...] run the main function with the given arguments :module [+/-] [*] ... set the context for expression evaluation :quit exit GHCi :reload[!] reload the current module set (!: defer type errors) :run function [ ...] run the function with the given arguments :script run the script :type show the type of :type +d show the type of , defaulting type variables :unadd ... remove module(s) from the current target set :undef undefine user-defined command : :: run the builtin command :! run the shell command -- Commands for debugging: :abandon at a breakpoint, abandon current computation :back [] go back in the history N steps (after :trace) :break [] [] set a breakpoint at the specified location :break set a breakpoint on the specified function :continue [] resume after a breakpoint [and set break ignore count] :delete ... delete the specified breakpoints :delete * delete all breakpoints :disable ... disable the specified breakpoints :disable * disable all breakpoints :enable ... enable the specified breakpoints :enable * enable all breakpoints :force print , forcing unevaluated parts :forward [] go forward in the history N step s(after :back) :history [] after :trace, show the execution history :ignore for break set break ignore :list show the source code around current breakpoint :list show the source code for :list [] show the source code around line number :print [ ...] show a value without forcing its computation :sprint [ ...] simplified version of :print :step single-step after stopping at a breakpoint :step single-step into :steplocal single-step within the current top-level binding :stepmodule single-step restricted to the current module :trace trace after stopping at a breakpoint :trace evaluate with tracing on (see :history) -- Commands for changing settings: :set