haskell-tools-rewrite-1.1.1.0: Facilities for generating new parts of the Haskell-Tools AST

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Rewrite.Create.Literals

Description

Generation of literals for refactorings. The bindings defined here are the AST constructor names with an "mk" prefix.

Synopsis

Documentation

mkCharLit :: Char -> Literal Source #

Character literal: c

mkStringLit :: String -> Literal Source #

String literal: "abc"

mkIntLit :: Integer -> Literal Source #

Integer literal: 12

mkFracLit :: Rational -> Literal Source #

Fractional literal: 3.14

mkPrimIntLit :: Integer -> Literal Source #

Primitive integer literal (of type Int#): 32#

mkPrimWordLit :: Integer -> Literal Source #

Primitive word literal (of type Word#): 32##

mkPrimFloatLit :: Rational -> Literal Source #

Primitive float literal (of type Float#): 3.14#

mkPrimDoubleLit :: Rational -> Literal Source #

Primitive double literal (of type Double#): 3.14##

mkPrimCharLit :: Char -> Literal Source #

Primitive character literal (of type Char#): c#

mkPrimStringLit :: String -> Literal Source #

Primitive string literal (of type Addr#): "xxx"#