debug module
This commit is contained in:
@@ -2,7 +2,7 @@ Applicative
|
||||
===========
|
||||
|
||||
Functor
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
```haskell
|
||||
class Functor (f :: * -> *) where
|
||||
@@ -19,7 +19,7 @@ class Functor (f :: * -> *) where
|
||||
```
|
||||
|
||||
Applicatives
|
||||
~~~~~~~~~~~~
|
||||
-------
|
||||
|
||||
```haskell
|
||||
class Functor f => Applicative (f :: * -> *) where
|
||||
@@ -46,7 +46,7 @@ eitherA :: (Alternative f) => f a -> f b -> f (Either a b)
|
||||
```
|
||||
|
||||
Alternative
|
||||
~~~~~~~~~~~
|
||||
-------
|
||||
|
||||
```haskell
|
||||
class Applicative f => Alternative (f :: * -> *) where
|
||||
@@ -0,0 +1,38 @@
|
||||
Debug
|
||||
=====
|
||||
|
||||
```haskell
|
||||
undefined :: a
|
||||
```
|
||||
|
||||
```haskell
|
||||
notImplemented :: a
|
||||
```
|
||||
|
||||
```haskell
|
||||
trace :: Print b => b -> a -> a
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceM :: (Monad m) => Text -> m ()
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceId :: Text -> Text
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceShowM :: (P.Show a, Monad m) => a -> m ()
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceShowId :: P.Show a => a -> a
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceShow :: P.Show a => a -> b -> b
|
||||
```
|
||||
|
||||
```haskell
|
||||
traceIO :: Print b => b -> a -> IO a
|
||||
```
|
||||
@@ -2,7 +2,7 @@ List
|
||||
====
|
||||
|
||||
Slicing
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
```haskell
|
||||
head :: Foldable f => f a -> Maybe a
|
||||
@@ -49,7 +49,7 @@ take :: Int -> [a] -> [a]
|
||||
```
|
||||
|
||||
Unpacking
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
uncons :: [a] -> Maybe (a, [a])
|
||||
@@ -60,21 +60,21 @@ unsnoc :: [x] -> Maybe ([x],x)
|
||||
```
|
||||
|
||||
Sorting
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
sortOn :: Ord o => (a -> o) -> [a] -> [a]
|
||||
```
|
||||
|
||||
Removing
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
ordNub :: Ord a => [a] -> [a]
|
||||
```
|
||||
|
||||
Splitting
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
splitAt :: Int -> [a] -> ([a], [a])
|
||||
@@ -89,14 +89,14 @@ intercalate :: [a] -> [[a]] -> [a]
|
||||
```
|
||||
|
||||
Comparison
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
isPrefixOf :: Eq a => [a] -> [a] -> Bool
|
||||
```
|
||||
|
||||
Filtering
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
```haskell
|
||||
filter :: (a -> Bool) -> [a] -> [a]
|
||||
@@ -2,7 +2,7 @@ Monads
|
||||
======
|
||||
|
||||
Monad
|
||||
~~~~~
|
||||
-----
|
||||
|
||||
```haskell
|
||||
class Applicative m => Monad (m :: * -> *) where
|
||||
@@ -121,7 +121,7 @@ ap :: Monad m => m (a -> b) -> m a -> m b
|
||||
```
|
||||
|
||||
MonadPlus
|
||||
~~~~~~~~~
|
||||
-----
|
||||
|
||||
```haskell
|
||||
class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where
|
||||
@@ -30,6 +30,16 @@ vacuous :: Functor f => f Void -> f a
|
||||
data Proxy (t :: k) = Proxy
|
||||
```
|
||||
|
||||
#### Symbol
|
||||
|
||||
* symbolVal
|
||||
* someSymbolVal
|
||||
|
||||
#### Nat
|
||||
|
||||
* natVal
|
||||
* someNatVal
|
||||
|
||||
#### Type Equality
|
||||
|
||||
```haskell
|
||||
@@ -6,6 +6,7 @@ An alternative Prelude.
|
||||
.. toctree::
|
||||
:maxdepth: 0
|
||||
Printing
|
||||
Debug
|
||||
Files
|
||||
Strings
|
||||
Function
|
||||
|
||||
Reference in New Issue
Block a user