cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2015 Galois, Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.ModuleSystem.Interface

Description

Synopsis

- data Iface = Iface {
  - ifModName :: ModName
  - ifPublic :: IfaceDecls
  - ifPrivate :: IfaceDecls
  }
- data IfaceDecls = IfaceDecls {
  - ifTySyns :: Map QName [IfaceTySyn]
  - ifNewtypes :: Map QName [IfaceNewtype]
  - ifDecls :: Map QName [IfaceDecl]
  }
- type IfaceTySyn = TySyn
- ifTySynName :: TySyn -> QName
- type IfaceNewtype = Newtype
- data IfaceDecl = IfaceDecl {
  - ifDeclName :: QName
  - ifDeclSig :: Schema
  - ifDeclPragmas :: [Pragma]
  }
- mkIfaceDecl :: Decl -> IfaceDecl
- shadowing :: IfaceDecls -> IfaceDecls -> IfaceDecls
- interpImport :: Import -> Iface -> Iface
- unqualified :: IfaceDecls -> IfaceDecls
- genIface :: Module -> Iface

# Documentation

data Iface Source

The resulting interface generated by a module that has been typechecked.

Constructors

Iface |

Fields

ifModName :: ModName
ifPublic :: IfaceDecls
ifPrivate :: IfaceDecls

Instances

Show Iface Source |
BindsNames Iface Source | Produce a naming environment from an interface file, that contains a mapping only from unqualified names to qualified ones.

data IfaceDecls Source

Constructors

IfaceDecls |

Fields

ifTySyns :: Map QName [IfaceTySyn]
ifNewtypes :: Map QName [IfaceNewtype]
ifDecls :: Map QName [IfaceDecl]

Instances

Show IfaceDecls Source |
Monoid IfaceDecls Source |
BindsNames IfaceDecls Source | Translate a set of declarations from an interface into a naming environment.

type IfaceTySyn = TySyn Source

ifTySynName :: TySyn -> QName Source

type IfaceNewtype = Newtype Source

data IfaceDecl Source

Constructors

IfaceDecl |

Fields

ifDeclName :: QName
ifDeclSig :: Schema
ifDeclPragmas :: [Pragma]

Instances

Show IfaceDecl Source |

mkIfaceDecl :: Decl -> IfaceDecl Source

shadowing :: IfaceDecls -> IfaceDecls -> IfaceDecls Source

Like mappend for IfaceDecls, but preferring entries on the left.

interpImport :: Import -> Iface -> Iface Source

Interpret an import declaration in the scope of the interface it targets.

unqualified :: IfaceDecls -> IfaceDecls Source

genIface :: Module -> Iface Source

Generate an Iface from a typechecked module.