Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added Emacs support for this style guide.

  • Loading branch information...
commit 70c88fa073bdcdf30adeb143073bece976d95743 1 parent fc42348
Johan Tibell authored

Showing 1 changed file with 46 additions and 0 deletions. Show diff stats Hide diff stats

  1. 46  haskell-style.el
46  haskell-style.el
... ...
@@ -0,0 +1,46 @@
  1
+;; Copyright (c) 2009, Johan Tibell
  2
+;; All rights reserved.
  3
+;;
  4
+;; Redistribution and use in source and binary forms, with or without
  5
+;; modification, are permitted provided that the following conditions
  6
+;; are met:
  7
+;;
  8
+;;     * Redistributions of source code must retain the above
  9
+;;       copyright notice, this list of conditions and the following
  10
+;;       disclaimer.
  11
+;;
  12
+;;     * Redistributions in binary form must reproduce the above
  13
+;;       copyright notice, this list of conditions and the following
  14
+;;       disclaimer in the documentation and/or other materials
  15
+;;       provided with the distribution.
  16
+;;
  17
+;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18
+;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19
+;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20
+;; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21
+;; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22
+;; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23
+;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  24
+;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  25
+;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  26
+;; STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27
+;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  28
+;; OF THE POSSIBILITY OF SUCH DAMAGE.
  29
+
  30
+;; Installation:
  31
+;;
  32
+;; Add `haskell-style' to you `haskell-mode-hook' after requiring this
  33
+;; file. For example:
  34
+;;
  35
+;;    (add-hook 'haskell-mode-hook 'haskell-style)
  36
+
  37
+(defun haskell-style ()
  38
+  "Sets the current buffer to use Haskell Style. Meant to be
  39
+  added to `haskell-mode-hook'"
  40
+  (interactive)
  41
+  (setq tab-width 4
  42
+        haskell-indentation-layout-offset 4
  43
+        haskell-indentation-left-offset 4
  44
+        haskell-indentation-ifte-offset 4))
  45
+
  46
+(provide 'haskell-style)

0 notes on commit 70c88fa

Please sign in to comment.
Something went wrong with that request. Please try again.