pugs-DrIFT-2.2.3.20150815: DrIFT with pugs-specific rules.

Safe HaskellNone
LanguageHaskell98

DrIFT.Perl6Class

Synopsis

Documentation

showPerl6RoleDef Source

Arguments

:: NamespaceMangler 
-> String 
-> String

Perl 6 role definition

showMooseRoleDef Source

Arguments

:: NamespaceMangler 
-> String 
-> String

Perl 6 role definition

showPerl6ClassDef Source

Arguments

:: NamespaceMangler

(e.g, ("v6::AST::" ++))

-> String

role name (Hs datatype)

-> String

class name (Hs variant)

-> [(String, String, String)]

member type+name pairs

-> String

Perl 6 class definition

showMooseClassDef Source

Arguments

:: NamespaceMangler

(e.g, ("v6::AST::" ++))

-> String

role name (Hs datatype)

-> String

class name (Hs variant)

-> [(String, String, String)]

member type+name pairs

-> String

Perl 6 class definition

class Typeable a => MooseClass a where Source

Minimal complete definition

Nothing

class PLit a => Perl6Class a where Source

Minimal complete definition

Nothing

showKV :: (PLit a, PLit b) => (a, b) -> Doc Source

ts :: PLit a => a -> Doc Source

qbraces :: [Doc] -> [Doc] Source

class (Typeable a, Show a) => PLit a where Source

typeclass for dumping literals in Perl 6 source code.

Minimal complete definition

Nothing

Methods

plShow :: a -> String Source

Instances

PLit String 
(Typeable * a, Show a) => PLit a 
PLit ByteString 
PLit ByteString 
PLit a => PLit [a] 
PLit a => PLit (Maybe a) 

showStringLiteral :: String -> [Doc] Source

Turn a string into source-code fitting Perl 6 string literal. May result in code for concatenation of several such literals. The restult is a [Doc] rather than a single String so that calling pretty-printers can render linebreaks at the correct places trivially with cat.

showSLiteral :: ByteString -> [Doc] Source

An FPS version of showStringLiteral. Since the pretty-printing library isn't fps, this isn't as fast as it might have been.

showLLiteral :: ByteString -> [Doc] Source

An FPS version of showStringLiteral. Since the pretty-printing library isn't fps, this isn't as fast as it might have been.