module Language.Drasil.Literal.Class where

import Language.Drasil.Literal.Lang (Literal(..))

class LiteralC r where
    int      :: Integer -> r
    str      :: String -> r
    dbl      :: Double -> r
    exactDbl :: Integer -> r
    perc     :: Integer -> Integer -> r

instance LiteralC Literal where
    int :: Integer -> Literal
int = Integer -> Literal
Int
    str :: String -> Literal
str = String -> Literal
Str
    dbl :: Double -> Literal
dbl = Double -> Literal
Dbl
    exactDbl :: Integer -> Literal
exactDbl = Integer -> Literal
ExactDbl
    perc :: Integer -> Integer -> Literal
perc = Integer -> Integer -> Literal
Perc