File: fontlock.hs

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 116,928 kB
  • ctags: 88,975
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,611; makefile: 4,036; asm: 3,007; perl: 839; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (31 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- Comments are coloured brightly and stand out clearly.

repeat :: a -> [a]
repeat xs = xs where xs = x:xs          -- Keywords are also bright.

head :: [a] -> a
head (x:_) = x
head [] = error "PreludeList.head: empty list" -- Strings are coloured softly.

data Maybe a = Nothing | Just a              -- Type constructors, data
             deriving (Eq, Ord, Read, Show)  -- constructors, class names
                                             -- and module names are coloured
                                             -- closer to ordinary code.

recognize +++ infix :: Operator Declarations
as `well` as = This Form
(+) and this one = as well

instance Show Toto where
    fun1 arg1 = foo             -- FIXME: `fun1' should be highlighted.

constStr = "hello \
           \asdgfasgf\
           \asf"

{-
map :: (a -> b) -> [a] -> [b]           -- Commenting out large sections of
map f []     = []                       -- code can be misleading.  Coloured
map f (x:xs) = f x : map f xs           -- comments reveal unused definitions.
-}