<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 10:21 AM, Kim-Ee Yeoh <span dir="ltr"><<a href="mailto:ky3@atamo.com" target="_blank">ky3@atamo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">No problems here:<br>
<br># ghci<br>GHCi, version 7.6.3: <a href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a>  :? for help<br>Loading package ghc-prim ... linking ... done.<br>

Loading package integer-gmp ... linking ... done.<br>Loading package base ... linking ... done.<br>Prelude> let whee :: Show a => Eq a => a => Bool; whee x = x == x && null (show x)<br>Prelude> :t whee<br>


whee :: (Eq a, Show a) => a -> Bool</div></div></blockquote><div><br></div><div>It seems to be an issue with giving everything on a single line:</div><div><br></div><div><div>$ ghci</div><div>GHCi, version 7.6.3: <a href="http://www.haskell.org/ghc/">http://www.haskell.org/ghc/</a>  :? for help</div>
<div>Loading package ghc-prim ... linking ... done.</div><div>Loading package integer-gmp ... linking ... done.</div><div>Loading package base ... linking ... done.</div><div>Prelude ë> let whee x = x == x && null (show x) :: Show a => Eq a => a => Bool</div>
<div><br></div><div><interactive>:2:14:</div><div>    Couldn't match expected type `a -> Bool' with actual type `Bool'</div><div>    In the expression:</div><div>        x == x && null (show x) :: Show a => Eq a => a => Bool</div>
<div>    In an equation for `whee':</div><div>        whee x = x == x && null (show x) :: Show a => Eq a => a => Bool</div></div><div><br></div><div>I see now to make it work as a one liner I could do it this way:</div>
<div><div>Prelude ë> :t (\x -> x == x && null (show x)) :: Show a => Eq a => a => Bool</div><div>(\x -> x == x && null (show x)) :: Show a => Eq a => a => Bool</div><div>  :: (Eq a, Show a) => a -> Bool</div>
</div><div><br></div><div>Thanks!</div></div></div></div>