<div dir="ltr">How are you invoking ghci? If it's a stack project you can try <span style="font-family:monospace">stack ghci</span> if you haven't already.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 4 Jun 2021 at 21:51, Galaxy Being <<a href="mailto:borgauf@gmail.com">borgauf@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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"><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>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>