!)E      !" # $ % &' ( ) *+,-./0123456789:; < = >?@A B CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v w x y z {|}~          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw xyz{|}~                                    !"#$%&'()*+,-./ 0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                  !!!!""""""##$$$$$$$$$$$$$$$%%%%%&&'''0 V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe(reludeShorter alias for pure ().pass :: Maybe ()Just ();(');(')V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Unsafe+ *NM+ OPRQ,-+*)('&%$#"! . GF/EDCBA@2{|  zy356LKJIH78>?@DE_FaGHIJKLMOghiPQRSTUVWYZ[\]^jklmnrst,-./89:;<=>?Sx}~/DSGHIJKSTUVW,-.M,3OghiRj ]YZ8rstmn~*NM+ OPRQkl-+*)('&%$#"! E_Fa>2{|  zyLx. GF/EDCBA@56LKJIHPQ89:;<=>?7?[\@^}V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe2 C`d0 C`d0V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None5t !tuvtuv !V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None;<=FT<relude>Typeclass for data types that can be created from one element.one True :: [Bool][True]one 'a' :: Text"a"&one (3, "hello") :: HashMap Int StringfromList [(3,"hello")]relude(Type of single element of the structure.reludeCreate a list, map, Text, etc from a single element.(V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None> !tuv (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe@X<=<=V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeCreludeRenamed version of )*. 123 123V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeFj1qpo}|~457}|~1457qpoV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeMrelude Alias for  fmap . fmap%. Convenient to work with two nested 1s.negate <<$>> Just [1,2,3]Just [-1,-2,-3]reludeTakes a function in a 1* context and applies it to a normal value.flap (++) "relude" "P" "Prelude"reludeOperator version of the  function.[(+2), (*3)] ?? 5[7,15]Just (+3) ?? 5Just 86644+V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafePR1qpo}|~4567 V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeY relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of .relude Lifted to  version of . relude Lifted to  version of . relude Lifted to  version of . relude Lifted to  version of . relude Lifted to  version of .w    w    V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe^$ reludeLifted version of ,-.reludeLifted version of ,..reludeLifted version of ,/.reludeLifted version of ,0.   V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafedreludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .  V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com> Trustworthyf0{TUVWYZ[\]^_`abcdei0TUVWYZ[\]^_`abcdei{V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safej7U&09NbcXef     klmnoqrsU&09NbcklmnoqrsXef     V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe}#relude Similar to o but with flipped arguments.readMaybe "True" ?: FalseTruereadMaybe "Tru" ?: FalseFalsereludeSpecialized version of for_ for NC. It's used for code readability. Also helps to avoid space leaks:  Ohttp://www.snoyman.com/blog/2017/01/foldable-mapm-maybe-and-recursive-functionsFoldable.mapM_ space leak.&whenJust Nothing $ \b -> print (not b)*whenJust (Just True) $ \b -> print (not b)FalsereludeMonadic version of .reludePerforms default ; action if b) is given. Otherwise returns content of c pured to ;.!whenNothing Nothing [True, False] [True,False]%whenNothing (Just True) [True, False][True]reludePerforms default ; action if b is given. Do nothing for c. Convenient for discarding c content.+whenNothing_ Nothing $ putTextLn "Nothing!"Nothing!/whenNothing_ (Just True) $ putTextLn "Nothing!"reludeMonadic version of .reludeMonadic version of .0V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None reludeLifted version of .!reludeLifted version of ."reludeLifted version of .#reludeLifted version of .$reludeLifted version of . !"#$ !"#$V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe/ %relude$Shorter and more readable alias for flip runReaderT.&relude$Shorter and more readable alias for flip runReader.'relude$Shorter and more readable alias for flip runStateT.(relude$Shorter and more readable alias for  flip runState.)relude Alias for flip evalStateTF. It's not shorter but sometimes more readable. Done by analogy with using* functions family.*relude Alias for flip evalStateF. It's not shorter but sometimes more readable. Done by analogy with using* functions family.+relude Alias for flip execStateTF. It's not shorter but sometimes more readable. Done by analogy with using* functions family.,relude Alias for flip execStateF. It's not shorter but sometimes more readable. Done by analogy with using* functions family.-reludeLift a N to the  monad.reludeLift a X to the  monad %&'()*+,-. &%*),+('-. V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe/relude Extracts B value from N returning # if Nothing.+maybeToMonoid (Just [1,2,3] :: Maybe [Int])[1,2,3]&maybeToMonoid (Nothing :: Maybe [Int])[]-A"B#$%uvwzyx/-B#$%A"uvwzyx/V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe0reludeLike )1 but runs in  O(n * log n) time and requires 3.ordNub [3, 3, 3, 2, 2, -1, 1] [3,2,-1,1]1reludeLike )1 but runs in O(n * log_16(n)) time and requires .hashNub [3, 3, 3, 2, 2, -1, 1] [3,2,-1,1]2reludeLike 0 but also sorts a list.sortNub [3, 3, 3, 2, 2, -1, 1] [-1,1,2,3]3reludeLike 1< but has better performance and also doesn't save the order."unstableNub [3, 3, 3, 2, 2, -1, 1] [1,2,3,-1]01231023V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeQ4::4V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe;=>?AV4relude'Type class for lazy-strict conversions.7relude+Type class for converting other strings to .9relude+Type class for converting other strings to .;relude+Type class for converting other strings to .=relude9Type class for conversion to utf8 representation of text.>reludeEncode as utf8 string (usually ).$encodeUtf8 @Text @ByteString "?0B0:"*"\208\191\208\176\209\130\208\176\208\186"?reludeDecode from utf8 string.GdecodeUtf8 @Text @ByteString "\208\191\208\176\209\130\208\176\208\186""\1087\1072\1090\1072\1082"SputTextLn $ decodeUtf8 @Text @ByteString "\208\191\208\176\209\130\208\176\208\186"?0B0:@reludeLDecode as utf8 string but returning execption if byte sequence is malformed.CdecodeUtf8 @Text @ByteString "\208\208\176\209\130\208\176\208\186""\65533\1072\1090\1072\1082"IdecodeUtf8Strict @Text @ByteString "\208\208\176\209\130\208\176\208\186"\Left Cannot decode byte '\xd0': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 streamAreludeType synonym for 23.BreludeType synonym for 45.CreludePolymorhpic version of .readEither @Text @Int "123" Right 123readEither @Text @Int "aa"Left "Prelude.read: no parse"DreludeGeneralized version of )6.Erelude Alias for 6 function.Frelude Alias for 5 function.465789:;<=?>@ABCDEFBA=?>@789:;<465EFCD7V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe%4:465789:;<=?>@ABCDEFV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com> Trustworthy;<=V)XreludeLifted version of .YreludeLifted version of .ZreludeLifted version of .[reludeLifted version of .\reludeLifted version of .]reludeLifted version of  .^reludeLifted version of  ._reludeLifted version of  .XYZ[\]^_XYZ[\]^_V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe `reludeMaps left part of X to N.leftToMaybe (Left True) Just TrueleftToMaybe (Right "aba")NothingareludeMaps right part of X to N.rightToMaybe (Left True)NothingrightToMaybe (Right "aba") Just "aba"breludeMaps N to X wrapping default value into e.maybeToRight True (Just "aba") Right "aba"maybeToRight True Nothing Left TruecreludeMaps N to X wrapping default value into f.maybeToLeft True (Just "aba") Left "aba"maybeToLeft True Nothing Right TruedreludeApplies given action to X content if e. is given and returns the result. In case of f$ the default value will be returned.ereludeApplies given action to X content if e is given.freludeMonadic version of d.greludeMonadic version of e.hreludeApplies given action to X content if f. is given and returns the result. In case of e$ the default value will be returned.ireludeApplies given action to X content if f is given.jreludeMonadic version of h.kreludeMonadic version of i.`abcdefghijkcb`adefghijk8V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe_t&09NbcXef     klmnoqrs%&'()*+,-.`abcdefghijkV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe:mrelude.For safe work with lists using functinons for .viaNonEmpty head [1]Just 1viaNonEmpty head []NothingnreludePerforms given action over ! list if given list is non empty.+whenNotNull [] $ \(b :| _) -> print (not b)5whenNotNull [False,True] $ \(b :| _) -> print (not b)TrueoreludeMonadic version of n.mnomno9V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safeo3{TUVWYZ[\]^_`abcdeimnoV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe%>?epreludeType that represents exceptions used in cases when a particular codepath is not meant to be ever executed, but happens to be executed anyway.rreludeaPattern synonym to easy pattern matching on exceptions. So intead of writing something like this: isNonCriticalExc :: SomeException -> Bool isNonCriticalExc e | Just (_ :: NodeAttackedError) <- fromException e = True | Just DialogUnexpected{} <- fromException e = True | otherwise = False  you can use r pattern synonym: isNonCriticalExc :: SomeException -> Bool isNonCriticalExc = case Exc (_ :: NodeAttackedError) -> True -- matching all exceptions of type NodeAttackedError3 Exc DialogUnexpected{} -> True _ -> False +This pattern is bidirectional. You can use Exc e instead of  toException e. reludeHGenerate a pure value which, when forced, will throw the given exceptionsrelude_Generate a pure value which, when forced, will synchronously throw the exception wrapped into p data type. pqrs pqsrV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NonevreludeLifted alias for   with clearer name.wreludeLike  evaluateWNHF but discards value.xrelude Alias for evaluateWHNF . force with clearer name.yrelude Alias for evaluateWHNF . rnf . Similar to x but discards resulting value. vwxy xyvwV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafezreludeMonadic version of .+whenM (pure False) $ putTextLn "No text :(",whenM (pure True) $ putTextLn "Yes text :)" Yes text :)whenM (Just True) (pure ())Just ()whenM (Just False) (pure ())Just ()whenM Nothing (pure ())Nothing{reludeMonadic version of .-unlessM (pure False) $ putTextLn "No text :(" No text :(-unlessM (pure True) $ putTextLn "Yes text :)"|reludeMonadic version of  if-then-else.@ifM (pure True) (putTextLn "True text") (putTextLn "False text") True text}reludeMonadic version of @. Occasionally useful. Here some complex but real-life example: findSomePath :: IO (Maybe FilePath) somePath :: MaybeT IO FilePath somePath = do path <- MaybeT findSomePath guardM $ liftIO $ doesDirectoryExist path return path z{|}}|{z:V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe VC`d0z{|}V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None ,-FSTV08 relude Similar to 1 but takes a function with its arguments flipped."flipfoldl' (/) 5 [2,3] :: Rational15 % 2reludePolymorphic version of  concatMapA function.+foldMapA @[Int] (Just . replicate 3) [1..3]Just [1,1,1,2,2,2,3,3,3]reludePolymorphic version of  concatMapM function.+foldMapM @[Int] (Just . replicate 3) [1..3]Just [1,1,1,2,2,2,3,3,3]reludeStricter version of . sum [1..10]55reludeStricter version of .product [1..10]3628800reludeLike  but doesn't work on  and  for performance reasons.elem 'x' ("abc" :: String)False!elem False (one True :: Set Bool) ...D " Do not use 'elem' and 'notElem' methods from 'Foldable' on Set Suggestions: Instead of< elem :: (Foldable t, Eq a) => a -> t a -> Bool use# member :: ??? -- TODO... Instead of? notElem :: (Foldable t, Eq a) => a -> t a -> Bool use& notMember :: ??? -- TODO...reludeLike  but doesn't work on  and  for performance reasons.notElem 'x' ("abc" :: String)True$notElem False (one True :: Set Bool) ...D " Do not use 'elem' and 'notElem' methods from 'Foldable' on Set Suggestions: Instead of< elem :: (Foldable t, Eq a) => a -> t a -> Bool use# member :: ??? -- TODO... Instead of? notElem :: (Foldable t, Eq a) => a -> t a -> Bool use& notMember :: ??? -- TODO...reludeMonadic version of .andM [Just True, Just False] Just FalseandM [Just True] Just True%andM [Just True, Just False, Nothing] Just FalseandM [Just True, Nothing]NothingZandM [putTextLn "1" >> pure True, putTextLn "2" >> pure False, putTextLn "3" >> pure True]12FalsereludeMonadic version of .orM [Just True, Just False] Just TrueorM [Just True, Nothing] Just TrueorM [Nothing, Just True]NothingreludeMonadic version of .,allM (readMaybe >=> pure . even) ["6", "10"] Just True-allM (readMaybe >=> pure . even) ["5", "aba"] Just False.allM (readMaybe >=> pure . even) ["aba", "10"]NothingreludeMonadic version of .,anyM (readMaybe >=> pure . even) ["5", "10"] Just True.anyM (readMaybe >=> pure . even) ["10", "aba"] Just True.anyM (readMaybe >=> pure . even) ["aba", "10"]Nothing ~ ~;(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>None1,<=~(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NoneFT?reludeModifiable Map.reludeWRead-only map or set. Contains polymorphic functions which work for both sets and maps.reludeOperator version of  function.relude Inverse of  function.reludexReturn the value to which the specified key is mapped, or the default value if this map contains no mapping for the key.relude:Converts the structure to the list of the key-value pairs.7toPairs (HashMap.fromList [('a', "xxx"), ('b', "yyy")])[('a',"xxx"),('b',"yyy")]relude/Converts the structure to the list of the keys.4keys (HashMap.fromList [('a', "xxx"), ('b', "yyy")])"ab"relude1Converts the structure to the list of the values.5elems (HashMap.fromList [('a', "xxx"), ('b', "yyy")]) ["xxx","yyy"]reludeDefault value to return.relude Key to searchreludeContainer to search9 (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NoneG reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .reludeLifted version of .   V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com> Trustworthy ,-16FQVP& relude Similar to  but data type.relude Version of <= that leaves warning.relude Version of <> that leaves warning.relude Version of <? that leaves warning.relude Version of <@ that leaves warning.relude Version of <A that leaves warning.relude Version of <B that leaves warning.relude that takes  as an argument.relude, that leaves warning in code on every usage.  !(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NoneVSmreludeLifted version of CD.reludeLifted version of )E.reludeLifted version of  .reludeLifted version of !.FV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NoneU)w      !"#$GV(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com> TrustworthyX~  !&*NM+ OPRQ,-+*)('&%$#"! . GF/EDCBA@012{|  zy3456LKJIH789:;(')<=>?@A"B#$%C`dDE_FaGHIJKLMNbcOghiPQRSTUVWXefYZ[\]^jklmnqporstuvwzyx{}|~     ,-./0123456789:;<=>?STUVWYZ[\]^_`abcdeiklmnoqrstuvwx}~      !"#$%&'()*+,-./0123465789:;<=?>@ABCDEFXYZ[\]^_`abcdefghijkmnopqrsvwxyz{|}~"(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeVsreludeUnwraps value from newtype.%newtype Size = Size Int deriving Showun @Int (Size 5)5%un (Size 5) == length ['a', 'x', 'b']FalsereludeWraps value to newtype. Behaves exactly as I but has more meaningnful name in case you need to convert some value to newtype.,newtype Flag = Flag Bool deriving (Show, Eq)wrap False == Flag TrueFalserelude#Applies function to the content of newtype.. This function is not supposed to be used on newtype7s that are created with the help of smart constructors.$newtype Foo = Foo Bool deriving Showunder not (Foo True) Foo False&newtype Bar = Bar String deriving Show'under (filter (== 'a')) (Bar "abacaba") Bar "aaaa"reludeLift binary function for newtypes to work over underlying newtype representation.#under2 @(Sum Int) (<>) (3 :: Int) 47under2 @All (<>) True FalseFalserelude Version of  that works on newtypeAs parametrized by their representation. Provided for convenience.underF2 @Sum (<>) (3 :: Int) 47underF2 @Max (<>) 'p' 't''t'reludeCoercible composition#(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>NoneFTVyrelude<Groups elements using results of the given function as keys.2groupBy even [1..6] :: HashMap Bool (NonEmpty Int)/fromList [(False,5 :| [3,1]),(True,6 :| [4,2])]relude Similar to % but keeps only one element as value.,groupOneBy even [1 .. 6] :: HashMap Bool IntfromList [(False,1),(True,2)]$7(c) 2011-2015 Edward Kmett (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Safe.i{ relude;The class of foldable data structures that cannot be empty.reludeTMap each element of the non-empty structure to a semigroup, and combine the results. foldMap1 SG.Sum (1 :| [2, 3, 4])Sum {getSum = 10}relude@Combine the elements of a non-empty structure using a semigroup.$fold1 (1 :| [2, 3, 4 :: SG.Sum Int])Sum {getSum = 10}&fold1 (4 :| [5, 10 :: SG.Product Int])Product {getProduct = 200}relude5Convert a non-empty data structre to a NonEmpty list.toNonEmpty (Identity 2)2 :| []relude0The first element of a non-empty data structure.head1 (1 :| [2, 3, 4])1relude/The last element of a non-empty data structure.last1 (1 :| [2, 3, 4])4relude2The largest element of a non-empty data structure.!maximum1 (32 :| [64, 8, 128, 16])128relude4The smallest elemenet of a non-empty data structure.!minimum1 (32 :| [64, 8, 128, 16])8relude7Strictly folds non-empty structure with given function f: 0foldl1' f [x0, x1, x2 ...] = f (f x0 x1) x2 ... &foldl1' (++) ([1,2] :| [[3,4], [5,6]]) [1,2,3,4,5,6]  %(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafeVi_reludeReturns all values of some * + in ascending order.Edata TrafficLight = Red | Blue | Green deriving (Show, Enum, Bounded)universe :: [TrafficLight][Red,Blue,Green]universe :: [Bool] [False,True]relude inverseMap f< creates a function that is the inverse of a given function f. It does so by constructing  for every value f a). The implementation makes sure that the 9 is constructed only once and then shared for every call.-The complexity of reversed mapping though is \mathcal{O}(\log n).Usually you want to use  to inverse D function.>data Color = Red | Green | Blue deriving (Show, Enum, Bounded)0parse = inverseMap show :: String -> Maybe Color parse "Red"Just Red parse "Black"NothingreludeLike R, but doesn't fail on M. Instead it returns N. next FalseTrue next TrueFalse succ True3*** Exception: Prelude.Enum.Bool.succ: bad argumentreludeLike Q, but doesn't fail on N. Instead it returns M. prec FalseTrue prec TrueFalse pred False3*** Exception: Prelude.Enum.Bool.pred: bad argumentreludeReturns b if given G outside range.safeToEnum @Bool 0 Just FalsesafeToEnum @Bool 1 Just TruesafeToEnum @Bool 2NothingsafeToEnum @Bool (-1)Nothing&(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>SafereludedThis function returns the name of its caller function, but it requires that the caller function has # constraint. Otherwise, it returns " unknown".,foo :: HasCallStack => String; foo = ownNamefoo"foo"(bar :: HasCallStack => String; bar = foobar"foo"reludeThis function returns the name of its caller of the caller function, but it requires that the caller function and caller of the caller function have # constraint. Otherwise, it returns " unkown". It's useful for logging:Qlog :: HasCallStack => String -> IO (); log s = putStrLn $ callerName ++ ":" ++ sggreeting :: HasCallStack => IO (); greeting = log "Starting..." >> putStrLn "Hello!" >> log "Ending..."greetinggreeting:Starting...Hello!greeting:Ending...'(c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Saferelude0Fmaps functions for nested bifunctor. Short for fmap (bimap f g).,bimapF not length $ Just (False, ['a', 'b']) Just (True,2)relude Short for  fmap . first.%firstF not $ Just (False, ['a', 'b'])Just (True,"ab")relude Short for  fmap . second.*secondF length $ Just (False, ['a', 'b'])Just (False,2)V(c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikMITKowainik <xrom.xkov@gmail.com>Unsafe relude Similar to X but with flipped arguments.XfghjpXfghjp"HIJKLMHNOHNPHQRHQSHITHIUHIVKLWHXYHXZH[\H]^H]_H]`H]aKbcKbdHXeHIfHIgHIhHIiHjkHlmH[nH[oH[pH[qHrsHtuHtvHtwHIxHIyHIzHI{HI|HI}HI~HIH]H]KbHH[H[HIHIHXKbHH[H[HHHjHlHIHHHHHHIHIKKKKKHHHHHHIKH[H[KKHHHHHKKKHKHKKKHIHIKHHKKKHH]H]HIHIHHHHHHHHHHHHHtHHHHHHHHHHHHHHHrHrHrHrHrHrHrHrHrHrHrHrHHHHHHH H  H  H  H  HHHHHHHHHHHHHH H!H"#H$%H&'H&(H&)H&*H&+H&,H&-H./H.0H.0H1H2H3H4H5H6H7H8H9H:H;H<H=H>H?H@HAHBHCHDHEHFHGHHGIHGIHGJHGKHGKHLMHLNHLOHLPHLPHLQHLRHLRHLSHLTHLTHLUHLVHLVHLWHLXHLXHLYHLZHLZHL[HL\HL\H]H^H_H_H`aH`bH`cH`dH`eH`fH`gH`hH`iH`jH`kH`lH`mH`nH`oH`pH`qH`rHstHsuHvHwHxHyHzH{H|H}H~H~H~HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H[H]H]H]H]H]H]HHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHNHHHHHHHHHHQHQHQHHXHXHXHXHXHHIHIHIHIHIHI*HIHIHIHIHIHIHIHIHIHIHIHIHIHIHIHIHIHI HI HI HI H&)H HHLKbKbKbKbKbKbKbKbKbKb3 !"#$%&'()'(*'(+'(,'(-./0./12342352672689:;9:<9:=9:>9:?9:@9:A9BC9BD9BE9BF9BG2HI2HI2HJ2KL2KL2KM2KN2KO2KP2KQ2RS2RS2RT2RU2RV2RW2RX2RY2RZ2R[\]^_C`_Ca_Cb_Cc_de_df_g5_hi_hj_hk_hl_hm2no2np2nq2nr2nrstusvw xyz{|}~            -./0         6      !"#$%&'()*+,-./0123456 7 7 = > ? @ A B 8 9 : ; < = > ? @ A!D!E!B!C"D"E"F"G"H"I#J#K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z%[%\%]%^%_&`&a'b'c'deHHHHHfHHHHHHHH"H"H"HgHgHgHgHgHHHHHh_i5Hs_jB_jC_kB_kClBmC2BnCoH$pH H H H _j_j_j_k_k_klll222Hq8Hq9HBHCr#relude-0.3.0-K70PhEDeoq32TbRyPP5PWYRelude.List.Reexport Relude.BaseRelude.Container.ReexportRelude.Bool.ReexportRelude.FunctionRelude.Monad.ReexportRelude.Functor.ReexportRelude.String.Reexport Relude.MonoidRelude.ApplicativeRelude.Foldable.ReexportRelude.Lifted.ConcurrentRelude.Lifted.IORefRelude.ExceptionRelude.Monad.EitherRelude.Functor.Fmap Relude.UnsafeRelude.DeepSeqRelude.Container.OneRelude.Lifted.ExitRelude.Monad.MaybeRelude.Lifted.FileRelude.Monad.Trans Relude.NubRelude.String.Conversion Relude.PrintRelude.List.NonEmptyRelude.Bool.GuardRelude.Foldable.FoldRelude.Extra.Map Relude.File Relude.DebugRelude.Lifted.TerminalRelude.Extra.NewtypeRelude.Extra.GroupRelude.Extra.Foldable1Relude.Extra.EnumRelude.Extra.CallStackRelude.Extra.BifunctorRelude.ContainerPreludeidRelude.Functor System.ExitexitWith exitFailure exitSuccessdienubData.ByteString.Lazy ByteStringData.Text.LazyTextshow Relude.String Relude.Monad Relude.List Relude.BoolRelude.Foldable Debug.Tracetrace traceShow traceShowId traceShowMtraceMtraceId Data.TextgetLineprint Relude.LiftedReludebaseGHC.Base++ghc-primGHC.PrimseqGHC.Listfilterzip Data.Tuplefstsnd otherwisemap$coerceGHC.Num fromInteger-GHC.Real fromRationalGHC.EnumenumFrom enumFromThen enumFromToenumFromThenTo GHC.Classes==>=negate>>=>>fmapreturnControl.Monad.Failfail Data.String fromString fromIntegral realToFrac toInteger toRational Control.MonadguardGHC.ExtsIsListfromList fromListN<>memptymappendmconcatjoin<*>pure*>BoundedEnumEq GHC.FloatFloating FractionalIntegralMonadFunctorNumOrdGHC.ReadReadRealRealFracGHC.ShowShowData.Typeable.InternalTypeable MonadFailIsString Applicative Data.FoldableFoldableData.Traversable Traversable GHC.GenericsGeneric GHC.TypeNatsKnownNatGHC.OverloadedLabelsIsLabel SemigroupMonoid GHC.TypesBoolCharDoubleFloatIntGHC.IntInt8Int16Int32Int64 integer-gmpGHC.Integer.TypeInteger GHC.NaturalNaturalMaybeOrderingRatioRationalIOWordGHC.WordWord8Word16Word32Word64 Data.EitherEitherType ConstraintNatCmpNat CoercibleGHC.Stack.Types CallStackD#FalseF#NothingJustTrueLeftRightLTEQGTGHC.IO.Handle.TypesHandleboundedEnumFromThenboundedEnumFrommaxIntminIntData.Functor.Compose getComposeCompose Data.VoidvacuousabsurdVoidData.Semigroup mtimesDefaultcycle1 WrappedMonoid getOptionOptionsortWithData.Bifunctorsecondfirstbimap BifunctorData.List.NonEmptyinitlasttailheadnonEmptyGHC.ExecutionStackshowStackTrace getStackTraceControl.Monad.IO.ClassliftIOMonadIO fromLabelmfilter<$!>unless replicateM_ replicateM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterM mapAccumR mapAccumLforMsequencemapM sequenceAtraverseControl.Applicativeoptional getZipListZipList Control.Arrow&&&Data.Functor.Identity runIdentityIdentity System.IOwithFileGHC.IO.Handle.FDstderrstdin GHC.StackwithFrozenCallStack callStack GHC.Conc.Sync writeTVarreadTVarnewTVarSTMTVarstdout GHC.IORefIORefGHC.IOFilePath GHC.ExceptionprettyCallStack prettySrcLoc SomeExceptiondisplayException fromException toException ExceptionData.Functor.ConstgetConstConstfindallanyorand concatMapconcatasum sequence_ sequenceA_forM_mapM_for_ traverse_foldlMlengthnulltoListfoldl'foldrfoldMapfold Data.MonoidgetFirstFirstgetLastLastData.Semigroup.Internal stimesMonoidstimesIdempotentgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetAltAlt someNatValnatValSomeNat Data.OldListunfoldrsortOnsortBysort permutations subsequencestailsinitsgroupgenericReplicategenericSplitAt genericDrop genericTake genericLength transpose intercalate intersperse isPrefixOf Text.Read readMaybereads fromRightfromLeftisRightisLeftpartitionEithersrightsleftseitherData.Ord comparingDown Data.ProxyProxyControl.Category>>><<< GHC.IO.IOMode ReadWriteMode AppendMode WriteModeReadModeIOModeatanhacoshasinhtanhcoshsinhatanacosasintancossinlogBase**sqrtexppi byteSwap64 byteSwap32 byteSwap16 Data.Bitsxor Data.Boolbool Data.Function&onfix Data.Functorvoid$><&><$>lcmgcd^^^oddeven denominator numeratordivModquotRemmoddivremquotrecip/floorceilingroundtruncateproperFractionmaxBoundminBoundfromEnumtoEnumpredsuccGHC.Charchrunzip3unzipzipWithzip3!!reversebreaksplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanrscanluncons Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybefromJust isNothingisJustmaybeswapuncurrycurryGHC.MVarMVarsubtractsignumabs*+ GHC.Stack.CCScurrentCallStackasTypeOf$!flip.constordwhen=<<liftA3<**>stimessconcat<$<*liftA2manysome<|>empty Alternativemplusmzero MonadPlus:|NonEmptyString getCallStack HasCallStackstimesIdempotentMonoid/=compare<=&&||not<>maxminbytestring-0.10.8.2Data.ByteString.Internalcontainers-0.5.11.0Data.IntMap.InternalIntMapData.IntSet.InternalIntSetData.Map.InternalMapData.Sequence.InternalSeqData.Set.InternalSetdeepseq-1.4.3.0Control.DeepSeqforce$!!deepseqrnfNFData&hashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZData.Hashable.Class hashWithSaltHashabletransformers-0.5.5.0Control.Monad.Trans.Classlift MonadTransControl.Monad.Trans.Identity runIdentityT IdentityT mtl-2.2.2Control.Monad.State.Classgetsmodify'modifystateputget MonadStateControl.Monad.Reader.Classasksreaderlocalask MonadReaderControl.Monad.Trans.ExceptExceptT runExceptTControl.Monad.Trans.ReaderReaderT runReaderTReader runReader withReader withReaderT Control.Monad.Trans.State.StrictStateT runStateTStaterunState evalState execState withState evalStateT execStateT"stm-2.4.5.1-1n1oRyz2WxkGi5pMiXlR3yControl.Concurrent.STM.TVar modifyTVar' text-1.2.3.0unwordsunlineslineswordsData.Text.Encoding decodeUtf8'decodeUtf8WithData.Text.InternalData.Text.Encoding.Error lenientDecode strictDecodeOnError OnDecodeErrorUnicodeExceptionControl.Monad.Trans.MaybeexceptToMaybeTmaybeToExceptT runMaybeTMaybeT3unordered-containers-0.2.9.0-HQtYJEH7265DslRAJ09vVD Data.HashSetHashSetData.HashMap.BaseHashMappassOneOneItemone $fOneIntSet $fOneHashSet$fOneSet $fOneIntMap $fOneHashMap$fOneMap$fOneByteString$fOneByteString0 $fOneText $fOneText0$fOneSeq $fOneNonEmpty$fOne[]identity<<$>>flap?? newEmptyMVarnewMVarputMVarreadMVarswapMVartakeMVar tryPutMVar tryReadMVar tryTakeMVar atomically newTVarIO readTVarIOnewIORef readIORef writeIORef modifyIORef modifyIORef'atomicModifyIORefatomicModifyIORef'atomicWriteIORef?:whenJust whenJustM whenNothing whenNothing_ whenNothingM whenNothingM_readFile writeFile appendFileopenFilehClose usingReaderT usingReader usingStateT usingStateevaluatingStateTevaluatingStateexecutingStateTexecutingState hoistMaybe hoistEither maybeToMonoidordNubhashNubsortNub unstableNub LazyStricttoLazytoStrictToStringtoStringToLTexttoLTextToTexttoText ConvertUtf8 encodeUtf8 decodeUtf8decodeUtf8Strict LByteStringLText readEitherfromLazy fromStrict$fConvertUtf8TextByteString$fConvertUtf8TextByteString0$fConvertUtf8[]ByteString$fConvertUtf8TextByteString1$fConvertUtf8TextByteString2$fConvertUtf8[]ByteString0 $fToTextText $fToTextText0 $fToText[] $fToLTextText$fToLTextText0 $fToLText[]$fToStringText$fToStringText0 $fToString[]$fLazyStrictTextText $fLazyStrictByteStringByteStringputText putTextLnputLText putLTextLnputBSputBSLnputLBSputLBSLn leftToMaybe rightToMaybe maybeToRight maybeToLeftwhenLeft whenLeft_ whenLeftM whenLeftM_ whenRight whenRight_ whenRightM whenRightM_$fMonadFailEither viaNonEmpty whenNotNull whenNotNullMBugExcbug$fExceptionBug $fShowBug evaluateWHNF evaluateWHNF_ evaluateNF evaluateNF_whenMunlessMifMguardMElemErrorMessage DisallowElem flipfoldl'foldMapAfoldMapMsumproductelemnotElemandMorMallManyM DynamicMapinsert insertWithdeletealter StaticMapKeyValsizelookupmember!? notMember lookupDefaulttoPairskeyselems$fStaticMapIntSet$fStaticMapHashSet$fStaticMapSet$fStaticMapIntMap$fStaticMapHashMap$fStaticMapMap$fDynamicMapIntMap$fDynamicMapHashMap$fDynamicMapMap readFileText writeFileTextappendFileText readFileLTextwriteFileLTextappendFileLText readFileBS writeFileBS appendFileBS readFileLBS writeFileLBS appendFileLBS Undefinederror undefined $fEqUndefined$fOrdUndefined$fShowUndefined$fReadUndefined$fEnumUndefined$fBoundedUndefined$fDataUndefined$fGenericUndefinedputStrputStrLnunwrapunderunder2underF2#.groupBy groupOneBy Foldable1foldMap1fold1 toNonEmptyhead1last1maximum1minimum1foldl1'$fFoldable1Sum$fFoldable1Product$fFoldable1Compose$fFoldable1(,)$fFoldable1Identity$fFoldable1NonEmptyuniverse inverseMapnextprec safeToEnumownName callerNamebimapFfirstFsecondFatControl.Concurrent.MVar Data.IORef GHC.IO.HandleData.Text.Internal.Lazy Data.Text.IOData.Text.Lazy.IOData.ByteStringData.ByteString.Char8Data.ByteString.Lazy.Char8 impureThrowevaluateGHC.Err