Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"dependencies": {
"purescript-foldable-traversable": "^1.0.0-rc.1",
"purescript-generics": "^1.0.0-rc.1",
"purescript-lazy": "^1.0.0-rc.1",
"purescript-unfoldable": "^1.0.0-rc.1"
},
Expand Down
3 changes: 3 additions & 0 deletions src/Data/List.purs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import Control.MonadZero (class MonadZero)
import Control.Plus (class Plus)

import Data.Foldable (class Foldable, foldl, foldr, any)
import Data.Generic (class Generic)
import Data.Maybe (Maybe(..))
import Data.Monoid (class Monoid, mempty)
import Data.Traversable (class Traversable, traverse, sequence)
Expand Down Expand Up @@ -689,6 +690,8 @@ foldM f a (Cons b bs) = f a b >>= \a' -> foldM f a' bs
-- Instances -------------------------------------------------------------------
--------------------------------------------------------------------------------

derive instance genericList :: Generic a => Generic (List a)

instance showList :: Show a => Show (List a) where
show Nil = "Nil"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this changed to render something like toList [1,2,3]?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh never mind, it's in an open PR.

show (Cons x xs) = "(Cons " <> show x <> " " <> show xs <> ")"
Expand Down