| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Unison.Hashing.V2.Convert
Description
Synopsis
- type ResolutionResult a r = Either (Seq (ResolutionFailure a)) r
- data HashingWarning = IncompleteElementOrderingError (NonEmpty (NonEmpty String))
- crashOnHashingWarning :: HasCallStack => ([HashingWarning], a) -> a
- hashBranch0 :: Branch0 m -> Hash
- hashCausal :: ContentAddressable e => e -> Set CausalHash -> (CausalHash, HashFor e)
- hashDataDecls :: Var v => Map v (DataDeclaration v a) -> ResolutionResult a [(v, Id, DataDeclaration v a)]
- hashDecls :: Var v => Map v (Decl v a) -> ResolutionResult a [(v, Id, Decl v a)]
- hashPatch :: Patch -> Hash
- hashClosedTerm :: Var v => Term v a -> Id
- hashTermComponents :: forall v a extra. Var v => Map v (Term v a, Type v a, extra) -> ([HashingWarning], Map v (TermReferenceId, Term v a, Type v a, extra))
- hashTermComponentsWithoutTypes :: forall v a. Var v => Map v (Term v a) -> ([HashingWarning], Map v (TermReferenceId, Term v a))
- typeToReference :: Var v => Type v a -> Reference
- typeToReferenceMentions :: Var v => Type v a -> Set Reference
Documentation
type ResolutionResult a r = Either (Seq (ResolutionFailure a)) r #
data HashingWarning #
Constructors
| IncompleteElementOrderingError (NonEmpty (NonEmpty String)) | two or more component elements can not be completely ordered with respect to one another https://github.com/unisonweb/unison/issues/2787 |
Instances
| Exception HashingWarning | |
Defined in Unison.Hashing.V2.ABT Methods toException :: HashingWarning -> SomeException # | |
| Show HashingWarning | |
Defined in Unison.Hashing.V2.ABT Methods showsPrec :: Int -> HashingWarning -> ShowS # show :: HashingWarning -> String # showList :: [HashingWarning] -> ShowS # | |
| Eq HashingWarning | |
Defined in Unison.Hashing.V2.ABT Methods (==) :: HashingWarning -> HashingWarning -> Bool # (/=) :: HashingWarning -> HashingWarning -> Bool # | |
| Ord HashingWarning | |
Defined in Unison.Hashing.V2.ABT Methods compare :: HashingWarning -> HashingWarning -> Ordering # (<) :: HashingWarning -> HashingWarning -> Bool # (<=) :: HashingWarning -> HashingWarning -> Bool # (>) :: HashingWarning -> HashingWarning -> Bool # (>=) :: HashingWarning -> HashingWarning -> Bool # max :: HashingWarning -> HashingWarning -> HashingWarning # min :: HashingWarning -> HashingWarning -> HashingWarning # | |
crashOnHashingWarning :: HasCallStack => ([HashingWarning], a) -> a #
Crash if hashing produced any warnings.
In the future we will hopefully prevent this error entirely.
hashBranch0 :: Branch0 m -> Hash Source #
hashCausal :: ContentAddressable e => e -> Set CausalHash -> (CausalHash, HashFor e) Source #
hashDataDecls :: Var v => Map v (DataDeclaration v a) -> ResolutionResult a [(v, Id, DataDeclaration v a)] Source #
hashTermComponents :: forall v a extra. Var v => Map v (Term v a, Type v a, extra) -> ([HashingWarning], Map v (TermReferenceId, Term v a, Type v a, extra)) Source #
hashTermComponentsWithoutTypes :: forall v a. Var v => Map v (Term v a) -> ([HashingWarning], Map v (TermReferenceId, Term v a)) Source #
This shouldn't be used when storing terms in the codebase, as it doesn't incorporate the type into the hash. this should only be used in cases where you just need a way to identify some terms that you have, but won't be saving them.