ermine-0.6: Ermine

Copyright(c) Edward Kmett and Dan Doel 2013-2014
LicenseBSD3
MaintainerDan Doel <dan.doel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Builtin.Core

Contents

Description

$setup >>> :m + Text.Groom Ermine.Builtin.Core Data.Int

>>> putStrLn $ groom (lit (1 :: Int32) `cons` nil :: Core Convention a)
Data [C, C] 1
  (glob (Infix R 5) (mkModuleName "ermine" "Prelude") "(::)")
  [Data [U] 0
     (glob Idfix (mkModuleName "ermine" "Prelude") "Literal")
     [HardCore (Lit (Int 1))],
   Data [] 0 (glob Idfix (mkModuleName "ermine" "Prelude") "[]") []]

Synopsis

Host Literals

class Lit a where Source

Lifting of literal values to core.

Minimal complete definition

lit

Methods

lit :: AsConvention cc => a -> Core cc b Source

lits :: AsConvention cc => [a] -> Core cc b Source

Instances

Lit Char 
Lit Int8 
Lit Int16 
Lit Int32 
Lit Int64 
Lit Text 
Lit a => Lit [a] 
Lit a => Lit (Maybe a) 
(Lit a, Lit b) => Lit (a, b) 

Lists

cons :: AsConvention cc => Core cc a -> Core cc a -> Core cc a Source

The built-in '::' constructor for a list.

nil :: Core cc a Source

The built-in '[]' constructor for a list.

Maybe

just :: AsConvention cc => Core cc a -> Core cc a Source

The built-in Just constructor for Maybe.

nothing :: Core cc a Source

The built-in Nothing constructor for Maybe.

prim wrappers

stringh :: AsConvention cc => Core cc a -> Core cc a Source

inth :: AsConvention cc => Core cc a -> Core cc a Source

longh :: AsConvention cc => Core cc a -> Core cc a Source

primops