aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Mili.hs
blob: b407d0087d0ac4115391bd1d27e8cf7e47b5aabb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Data.Mili
  ( Term(..)
  ) where

data Term = Abs Term      -- | Abstraction
          | App Term Term -- | Application
          | Lvl Int       -- | de Bruijn level

instance Show Term where
  showsPrec _ (Abs m) = showString "[" . shows m . showString "]"
  showsPrec _ (App m n) =
    showString "(" . shows m . showString " " . shows n . showString ")"
  showsPrec _ (Lvl i) = shows i