~ubuntu-branches/ubuntu/wily/agda/wily-proposed

« back to all changes in this revision

Viewing changes to src/transl/agda/Literal.hs

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-08-05 06:38:12 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140805063812-io8e77niomivhd49
Tags: 2.4.0.2-1
* [6e140ac] Imported Upstream version 2.4.0.2
* [2049fc8] Update Build-Depends to match control
* [93dc4d4] Install the new primitives
* [e48f40f] Fix typo dev→doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
module Literal(Literal(..)) where
2
 
import Position
3
 
import PPrint
4
 
 
5
 
data Literal
6
 
        = LString String
7
 
        | LChar Char
8
 
        | LInt Integer
9
 
        | LInteger Integer
10
 
        | LBool Bool
11
 
        | LRational Rational
12
 
        | LNative String
13
 
        | LImpossible
14
 
        | LNoMatch Position
15
 
        deriving (Eq, Ord,Show)
16
 
 
17
 
instance PPrint Literal where
18
 
    pPrint _ _ (LString s)  = text (show s)
19
 
    pPrint _ _ (LChar s)    = text (show s)
20
 
    pPrint _ _ (LInt s)     = text (show s)
21
 
    pPrint _ _ (LInteger s) = text (show s)
22
 
    pPrint _ _ (LBool s)    = text (show s)
23
 
    pPrint _ _ (LRational s) = text (show s)
24
 
    pPrint _ _ (LNative s)  = text (show s)
25
 
    pPrint _ _ LImpossible  = text "_impossible"
26
 
    pPrint _ _ (LNoMatch p) = text "_noMatch"