ghc-source-gen-0.1.0.0: Constructs Haskell syntax trees for the GHC API.

Safe HaskellNone
LanguageHaskell2010

GHC.SourceGen.Lit

Description

This module provides combinators for constructing Haskell literals, which may be used in either patterns or expressions.

Synopsis

Documentation

class HasLit e where Source #

Methods

lit :: HsLit' -> e Source #

overLit :: HsOverLit' -> e Source #

Instances
HasLit Pat' Source # 
Instance details

Defined in GHC.SourceGen.Lit

HasLit HsExpr' Source # 
Instance details

Defined in GHC.SourceGen.Lit

char :: HasLit e => Char -> e Source #

string :: HasLit e => String -> e Source #

int :: HasLit e => Integer -> e Source #

Note: this is an *overloaded* integer.

frac :: HasLit e => Rational -> e Source #

Note: this is an *overloaded* rational, e.g., a decimal number.