Effective Haskell: Example doesn’t work (page 8)

Title: Effective Haskell - Example doesn’t work (page 8)

Middle of page 8 says: "Create a new Main.hs and copy the example below to get started.

module Main where

makeGreeting salutation person =
salutation <> " " <> person

Now load up ghci and test out…"

If I load this file into ghci (or try to compile it), I get errors: "The IO action ‘main’ is not defined in the module ‘Main’.

The text shown is not complete as it doesn’t include a main module. The reader is left to figure out why it doesn’t work.

1 Like