debug module

This commit is contained in:
Stephen Diehl
2016-12-08 13:12:42 +00:00
parent e041d6de8a
commit c28fa6b00c
14 changed files with 61 additions and 12 deletions
+3 -3
View File
@@ -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
View File
+38
View File
@@ -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
```
View File
+7 -7
View File
@@ -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]
View File
+2 -2
View File
@@ -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
View File
View File
+10
View File
@@ -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
+1
View File
@@ -6,6 +6,7 @@ An alternative Prelude.
.. toctree::
:maxdepth: 0
Printing
Debug
Files
Strings
Function