From 59ea210a554fd3b5e62994ec44e15b5df06bd0ed Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Mon, 28 Oct 2019 18:03:04 +0100 Subject: Add haskell extensions file --- haskellExtensions.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 haskellExtensions.md 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 () -- cgit v1.2.3