mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
New module: XMonad.Prelude
This is a convenience module in order to have less import noise. It re-exports the following: a) Commonly used modules in full (Data.Foldable, Data.Applicative, and so on); though only those that play nicely with each other, so that XMonad.Prelude can be imported unqualified without any problems. This prevents things like `Prelude.(.)` and `Control.Category.(.)` fighting with each other. b) Helper functions that don't necessarily fit in any other module; e.g., the often used abbreviation `fi = fromIntegral`.
This commit is contained in:
@@ -9,6 +9,7 @@ module XPrompt where
|
||||
|
||||
import Test.QuickCheck
|
||||
|
||||
import XMonad.Prelude (chunksOf)
|
||||
import XMonad.Prompt
|
||||
import qualified XMonad.Prompt.Shell as S
|
||||
|
||||
@@ -20,7 +21,7 @@ prop_split (str :: String) =
|
||||
-- of the string.
|
||||
prop_spliInSubListsAt (x :: Int) (str :: String) =
|
||||
x < length str ==> result == take x str
|
||||
where result = case splitInSubListsAt x str of
|
||||
where result = case chunksOf x str of
|
||||
[] -> []
|
||||
x -> head x
|
||||
|
||||
|
Reference in New Issue
Block a user