m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-10-28 18:03:04 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-10-28 18:03:04 +0100
commit59ea210a554fd3b5e62994ec44e15b5df06bd0ed (patch)
treec9e3c0027f93be77bc0cdbe079cc16f9e9b8b44f
parent878caf2eaaa3beeed9f9161408c68e2846de4f2c (diff)
Add haskell extensions file
-rw-r--r--haskellExtensions.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/haskellExtensions.md b/haskellExtensions.md
new file mode 100644
index 0000000..9346691
--- /dev/null
+++ b/haskellExtensions.md
@@ -0,0 +1,21 @@
+# LANGUAGE pragma Haskell extensions
+
+List: https://downloads.haskell.org/~ghc/7.0.3/docs/html/libraries/Cabal-1.10.1.0/Language-Haskell-Extension.html
+
+## Using
+
+Put as *first* line of file:
+
+ {-# LANGUAGE Extension, ... -#}
+
+## FlexibleContexts
+
+Relax some restrictions on the form of the context of a type signature.
+
+Normally typeclass constraints have to have type variable arguments.
+
+ modify :: MonadState s m => (s -> s) -> m ()
+
+With FlexibleContexts, can be any type (?)
+
+ modifyFst :: MonadState (a, b) m => (a -> a) -> m ()