Re: [Haskell-cafe] Newbie Q: GHCi: Where “List” module is imported from?
Aaron McDaid
aaron at aaronmcdaid.com
Fri Feb 16 17:39:25 EST 2007
On 2/16/07, Dmitri O.Kondratiev <dokondr at gmail.com> wrote:
>
> where then declaration:
>
> instance Ord []
>
> can be found?
>
With Hugs, it can be found in /usr/lib/hugs/libraries/Hugs/Prelude.hs
(on Debian anyway). For GHC, I guess it's in compiled into one of the
.hi files? From Hugs' Prelude.hs:
instance Ord a => Ord [a] where
compare [] (_:_) = LT
compare [] [] = EQ
compare (_:_) [] = GT
compare (x:xs) (y:ys) = primCompAux x y (compare xs ys)
Aaron
More information about the Haskell-Cafe
mailing list