I go to a directory. I run

stack install Safe

I start up ghci and get the Prelude prompt. I run

import Safe

and I get 

import Safe
  | ^^^^^^^^^^^
Failed, no modules loaded.


I'm once again frustrated. I try to load this hs file

{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE NoMonomorphismRestriction #-}

import Safe

lookupDefault :: Eq a => a -> b -> [(a,b)] -> b
lookupDefault k _ (lookup k -> Just s) = s
lookupDefault _ d _ = d

headTup :: (a, [t]) -> [t]
headTup (headMay . snd -> Just n) = [n]
headTup _ = []

headNil :: [a] -> [a]
headNil (headMay -> Just x) = [x]
headNil _ = []


with the same result. What do I need to do?
--

Lawrence Bottorff
Grand Marais, MN, USA
borgauf@gmail.com