cryptol-2.10.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Cryptol.Utils.Fixity

Description

 
Synopsis

Documentation

data Assoc Source #

Information about associativity.

Constructors

LeftAssoc 
RightAssoc 
NonAssoc 

Instances

Instances details
Eq Assoc Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Methods

(==) :: Assoc -> Assoc -> Bool #

(/=) :: Assoc -> Assoc -> Bool #

Show Assoc Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Methods

showsPrec :: Int -> Assoc -> ShowS #

show :: Assoc -> String #

showList :: [Assoc] -> ShowS #

Generic Assoc Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Associated Types

type Rep Assoc :: Type -> Type #

Methods

from :: Assoc -> Rep Assoc x #

to :: Rep Assoc x -> Assoc #

NFData Assoc Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Methods

rnf :: Assoc -> () #

PP Assoc Source # 
Instance details

Defined in Cryptol.Utils.PP

Methods

ppPrec :: Int -> Assoc -> Doc Source #

type Rep Assoc Source # 
Instance details

Defined in Cryptol.Utils.Fixity

type Rep Assoc = D1 ('MetaData "Assoc" "Cryptol.Utils.Fixity" "cryptol-2.10.0-Bsi6VMfJ6GCFlOdda30jWW" 'False) (C1 ('MetaCons "LeftAssoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RightAssoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonAssoc" 'PrefixI 'False) (U1 :: Type -> Type)))

data Fixity Source #

Constructors

Fixity 

Fields

Instances

Instances details
Eq Fixity Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Methods

(==) :: Fixity -> Fixity -> Bool #

(/=) :: Fixity -> Fixity -> Bool #

Show Fixity Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Generic Fixity Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

NFData Fixity Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Methods

rnf :: Fixity -> () #

PP Fixity Source # 
Instance details

Defined in Cryptol.Utils.PP

Methods

ppPrec :: Int -> Fixity -> Doc Source #

type Rep Fixity Source # 
Instance details

Defined in Cryptol.Utils.Fixity

type Rep Fixity = D1 ('MetaData "Fixity" "Cryptol.Utils.Fixity" "cryptol-2.10.0-Bsi6VMfJ6GCFlOdda30jWW" 'False) (C1 ('MetaCons "Fixity" 'PrefixI 'True) (S1 ('MetaSel ('Just "fAssoc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Assoc) :*: S1 ('MetaSel ('Just "fLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))

defaultFixity :: Fixity Source #

The fixity used when none is provided.

data FixityCmp Source #

Constructors

FCError 
FCLeft 
FCRight 

Instances

Instances details
Eq FixityCmp Source # 
Instance details

Defined in Cryptol.Utils.Fixity

Show FixityCmp Source # 
Instance details

Defined in Cryptol.Utils.Fixity

compareFixity :: Fixity -> Fixity -> FixityCmp Source #

Let op1 have fixity f1 and op2 have fixity f2. Then compareFixity f1 f2 determines how to parse the infix expression x op1 y op2 z@.

  • FCLeft: (x op1 y) op2 z
  • FCRight: x op1 (y op2 z)
  • FCError: no parse