<div dir="ltr">I go to a directory. I run<div><br></div><div><font face="monospace">stack install Safe</font></div><div><br></div><div>I start up ghci and get the Prelude prompt. I run</div><div><br></div><div><font face="monospace">import Safe</font></div><div><br></div><div>and I get </div><div><br></div><div><font face="monospace">import Safe<br>  | ^^^^^^^^^^^<br>Failed, no modules loaded.</font><br clear="all"><div><br></div><div>I'm once again frustrated. I try to load this hs file</div><div><br></div><div><font face="monospace">{-# LANGUAGE ViewPatterns #-}<br>{-# LANGUAGE NoMonomorphismRestriction #-}<br><br>import Safe<br><br>lookupDefault :: Eq a => a -> b -> [(a,b)] -> b<br>lookupDefault k _ (lookup k -> Just s) = s<br>lookupDefault _ d _ = d<br><br>headTup :: (a, [t]) -> [t]<br>headTup (headMay . snd -> Just n) = [n]<br>headTup _ = []<br><br>headNil :: [a] -> [a]<br>headNil (headMay -> Just x) = [x]<br>headNil _ = []</font><br></div><div><br></div><div>with the same result. What do I need to do?</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>⨽<br></div>Lawrence Bottorff<div>Grand Marais, MN, USA</div><div><a href="mailto:borgauf@gmail.com" target="_blank">borgauf@gmail.com</a></div></div></div></div></div>