-----------------------------------------------------------------------------
-- |
-- Module      :  Debug.SimpleReflect.Vars
-- Copyright   :  (c) 2008-2014 Twan van Laarhoven
-- License     :  BSD-style
-- 
-- Maintainer  :  twanvl@gmail.com
-- Stability   :  experimental
-- Portability :  portable
--
-- Single letter variable names.
--
-- All names have type @Expr@, except for @f@, @g@ and @h@, which are generic functions.
-- This means that @show (f x :: Expr) == \"f x\"@, but that @show (a x :: Expr)@ gives a type error.
-- On the other hand, the type of @g@ in @show (f g)@ is ambiguous.
--
-----------------------------------------------------------------------------
module Debug.SimpleReflect.Vars
    ( -- * Variables
      a,b,c,d,e,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
      -- * Functions
    , f,f',f'',g,h
      -- * Operators
    , (⊗), (⊕), (@@)
    ) where

import Debug.SimpleReflect.Expr

------------------------------------------------------------------------------
-- Variables!
------------------------------------------------------------------------------

a,b,c,d,e,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z :: Expr
[a :: Expr
a,b :: Expr
b,c :: Expr
c,d :: Expr
d,e :: Expr
e,i :: Expr
i,j :: Expr
j,k :: Expr
k,l :: Expr
l,m :: Expr
m,n :: Expr
n,o :: Expr
o,p :: Expr
p,q :: Expr
q,r :: Expr
r,s :: Expr
s,t :: Expr
t,u :: Expr
u,v :: Expr
v,w :: Expr
w,x :: Expr
x,y :: Expr
y,z :: Expr
z]
   = [String -> Expr
var [Char
letter] | Char
letter <- ['a'..'e']String -> String -> String
forall a. [a] -> [a] -> [a]
++['i'..'z']]

f,f',f'',g,h :: FromExpr a => a
f :: a
f   = String -> a
forall a. FromExpr a => String -> a
fun "f"
f' :: a
f'  = String -> a
forall a. FromExpr a => String -> a
fun "f'"
f'' :: a
f'' = String -> a
forall a. FromExpr a => String -> a
fun "f''"
g :: a
g   = String -> a
forall a. FromExpr a => String -> a
fun "g"
h :: a
h   = String -> a
forall a. FromExpr a => String -> a
fun "h"

------------------------------------------------------------------------------
-- Operators
------------------------------------------------------------------------------

-- | A non-associative infix 9 operator
(@@) :: Expr -> Expr -> Expr
@@ :: Expr -> Expr -> Expr
(@@) = Associativity -> Int -> String -> Expr -> Expr -> Expr
op Associativity
Infix 9 " @@ "

infix 9 @@

-- | A non-associative infix 7 operator
(⊗) :: Expr -> Expr -> Expr
⊗ :: Expr -> Expr -> Expr
(⊗) = Associativity -> Int -> String -> Expr -> Expr -> Expr
op Associativity
Infix 7 " ⊗ "

infix 7 

-- | A non-associative infix 6 operator
(⊕) :: Expr -> Expr -> Expr
⊕ :: Expr -> Expr -> Expr
(⊕) = Associativity -> Int -> String -> Expr -> Expr -> Expr
op Associativity
Infix 6 " ⊕ "

infix 6