multirec-0.7.7: Generic programming for families of recursive datatypes

Copyright(c) 2009--2010 Universiteit Utrecht
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Generics.MultiRec.Read

Contents

Description

Generic read.

Synopsis

Documentation

class CountAtoms f where Source

Methods

countatoms :: f r ix -> Int Source

Generic read

class HReadPrec phi f where Source

Methods

hreader :: forall ix. phi ix -> (forall ix1. phi ix1 -> ReadPrec (I0 ix1)) -> ReadPrec (f I0 ix) Source

Instances

HReadPrec phi U Source 
El phi xi => HReadPrec phi (I xi) Source 
Read a => HReadPrec phi (K a) Source 
(Constructor c, CountAtoms ((:*:) f g), HReadPrec phi f, HReadPrec phi g) => HReadPrec phi (C c ((:*:) f g)) Source 
(Constructor c, HReadPrec phi ((:.:) f g)) => HReadPrec phi (C c ((:.:) f g)) Source 
(Constructor c, HReadPrec phi (K a)) => HReadPrec phi (C c (K a)) Source 
(Constructor c, HReadPrec phi (I xi)) => HReadPrec phi (C c (I xi)) Source 
Constructor c => HReadPrec phi (C c U) Source 
(Read1 f, HReadPrec phi g) => HReadPrec phi ((:.:) f g) Source 
(HReadPrec phi f, EqS phi, El phi ix) => HReadPrec phi ((:>:) f ix) Source 
(HReadPrec phi f, HReadPrec phi g) => HReadPrec phi ((:*:) f g) Source 
(HReadPrec phi f, HReadPrec phi g) => HReadPrec phi ((:+:) f g) Source 

class Read1 f where Source

Methods

read1 :: ReadPrec (g I0 ix) -> ReadPrec (f (g I0 ix)) Source

Instances

readCons :: Constructor c => ReadPrec (f I0 ix) -> ReadPrec (C c f I0 ix) Source

readInfixCons :: (HReadPrec phi f, HReadPrec phi g) => phi ix -> (forall ix1. phi ix1 -> ReadPrec (I0 ix1)) -> (Associativity, Int, Bool) -> String -> ReadPrec ((f :*: g) I0 ix) Source

readPrec :: (Fam phi, HReadPrec phi (PF phi)) => phi ix -> ReadPrec ix Source

readsPrec :: (Fam phi, HReadPrec phi (PF phi)) => phi ix -> Int -> ReadS ix Source

read :: (Fam phi, HReadPrec phi (PF phi)) => phi ix -> String -> ix Source