File: SimpleReflect.hs

package info (click to toggle)
haskell-simple-reflect 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 72 kB
  • sloc: haskell: 178; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (6)
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
32
33
34
35
36
-----------------------------------------------------------------------------
-- |
-- Module      :  Debug.SimpleReflect
-- Copyright   :  (c) 2008-2014 Twan van Laarhoven
-- License     :  BSD-style
-- 
-- Maintainer  :  twanvl@gmail.com
-- Stability   :  experimental
-- Portability :  portable
--
-- Simple reflection of haskell expressions containing variables.
-- 
-- Some examples:
-- 
-- > > sum [1..5] :: Expr
-- > 0 + 1 + 2 + 3 + 4 + 5
-- 
-- > > foldr1 f [a,b,c]
-- > f a (f b c)
-- 
-- > > take 5 (iterate f x)
-- > [x,f x,f (f x),f (f (f x)),f (f (f (f x)))]
-- 
-- > > mapM_ print $ reduction (1+2*(3+4))
-- > 1 + 2 * (3 + 4)
-- > 1 + 2 * 7
-- > 1 + 14
-- > 15
-----------------------------------------------------------------------------
module Debug.SimpleReflect
    ( module Debug.SimpleReflect.Expr
    , module Debug.SimpleReflect.Vars
    ) where

import Debug.SimpleReflect.Expr
import Debug.SimpleReflect.Vars