Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.haskell > #287 > unrolled thread
| Started by | jobmattcon@gmail.com |
|---|---|
| First post | 2014-04-25 07:24 -0700 |
| Last post | 2014-04-25 15:38 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.haskell
how to list all methods of a class or type in haskell jobmattcon@gmail.com - 2014-04-25 07:24 -0700
Re: how to list all methods of a class or type in haskell Mark Carroll <mtbc@bcs.org> - 2014-04-25 15:38 +0100
| From | jobmattcon@gmail.com |
|---|---|
| Date | 2014-04-25 07:24 -0700 |
| Subject | how to list all methods of a class or type in haskell |
| Message-ID | <1f29f803-7267-483c-a7c3-9acac128e694@googlegroups.com> |
how to list all methods of a class or type in haskell
[toc] | [next] | [standalone]
| From | Mark Carroll <mtbc@bcs.org> |
|---|---|
| Date | 2014-04-25 15:38 +0100 |
| Message-ID | <87vbtxqxs0.fsf@ixod.org> |
| In reply to | #287 |
jobmattcon@gmail.com writes:
> how to list all methods of a class or type in haskell
I don't know if this helps:
$ ghci
GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :info Double
data Double = GHC.Types.D# GHC.Prim.Double#
-- Defined in `GHC.Types'
instance Enum Double -- Defined in `GHC.Float'
instance Eq Double -- Defined in `GHC.Classes'
instance Floating Double -- Defined in `GHC.Float'
instance Fractional Double -- Defined in `GHC.Float'
instance Num Double -- Defined in `GHC.Float'
instance Ord Double -- Defined in `GHC.Classes'
instance Read Double -- Defined in `GHC.Read'
instance Real Double -- Defined in `GHC.Float'
instance RealFloat Double -- Defined in `GHC.Float'
instance RealFrac Double -- Defined in `GHC.Float'
instance Show Double -- Defined in `GHC.Float'
Prelude> :info RealFrac
class (Real a, Fractional a) => RealFrac a where
properFraction :: Integral b => a -> (b, a)
truncate :: Integral b => a -> b
round :: Integral b => a -> b
ceiling :: Integral b => a -> b
floor :: Integral b => a -> b
-- Defined in `GHC.Real'
instance RealFrac Float -- Defined in `GHC.Float'
instance RealFrac Double -- Defined in `GHC.Float'
Prelude>
Remember that Haskell isn't object-orientated. (-:
-- Mark
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.haskell
csiph-web