Skip to content

Commit

Permalink
fixup! X.Prelude: Add infinite stream type
Browse files Browse the repository at this point in the history
  • Loading branch information
slotThe committed Oct 16, 2023
1 parent 90f1643 commit 00a457f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XMonad/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ instance IsList (Stream a) where
type (Item (Stream a)) = a

fromList :: [a] -> Stream a
fromList [] = errorWithoutStackTrace "TODO"
fromList (x : xs) = x :~ fromList xs
fromList [] = errorWithoutStackTrace "XMonad.Prelude.Stream.fromList: Can't create stream out of finite list."

toList :: Stream a -> [a]
toList (x :~ xs) = x : toList xs
Expand Down

0 comments on commit 00a457f

Please sign in to comment.