[GHC] #1799: ghci ':browse *<module>' does not list items in
source order
GHC
trac at galois.com
Wed Oct 24 11:25:21 EDT 2007
#1799: ghci ':browse *<module>' does not list items in source order
------------------------+---------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
------------------------+---------------------------------------------------
Comment (by guest):
as a workaround, i've got a minor patch that adds a -s option to :browse,
so
{{{
Prelude> :browse Data.Maybe
data Maybe a = Nothing | Just a
maybe :: b -> (a -> b) -> Maybe a -> b
isJust :: Maybe a -> Bool
isNothing :: Maybe a -> Bool
fromJust :: Maybe a -> a
fromMaybe :: a -> Maybe a -> a
maybeToList :: Maybe a -> [a]
listToMaybe :: [a] -> Maybe a
catMaybes :: [Maybe a] -> [a]
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
Prelude>
Prelude> :browse -s Data.Maybe
data Maybe a = Nothing | Just a
catMaybes :: [Maybe a] -> [a]
fromJust :: Maybe a -> a
fromMaybe :: a -> Maybe a -> a
isJust :: Maybe a -> Bool
isNothing :: Maybe a -> Bool
listToMaybe :: [a] -> Maybe a
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
maybe :: b -> (a -> b) -> Maybe a -> b
maybeToList :: Maybe a -> [a]
}}}
i wouldn't want that as the default, but it should enable reproducable
tests, and it might occasionally be useful in itself. in the longer term,
the default order should be source order, rather than some odd mixture of
use/source.
claus
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1799#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list