stan-0.1.2.1: Haskell STatic ANalyser
Copyright(c) 2020 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Stan.Core.Id

Description

Safe Id representation.

Synopsis

Documentation

newtype Id a Source #

A wrapper around the textual value to safely represent IDs for different structures by using a phantom parameter.

Constructors

Id 

Fields

Instances

Instances details
Show (Id a) Source # 
Instance details

Defined in Stan.Core.Id

Methods

showsPrec :: Int -> Id a -> ShowS #

show :: Id a -> String #

showList :: [Id a] -> ShowS #

Eq (Id a) Source # 
Instance details

Defined in Stan.Core.Id

Methods

(==) :: Id a -> Id a -> Bool #

(/=) :: Id a -> Id a -> Bool #

Ord (Id a) Source # 
Instance details

Defined in Stan.Core.Id

Methods

compare :: Id a -> Id a -> Ordering #

(<) :: Id a -> Id a -> Bool #

(<=) :: Id a -> Id a -> Bool #

(>) :: Id a -> Id a -> Bool #

(>=) :: Id a -> Id a -> Bool #

max :: Id a -> Id a -> Id a #

min :: Id a -> Id a -> Id a #

Hashable (Id a) Source # 
Instance details

Defined in Stan.Core.Id

Methods

hashWithSalt :: Int -> Id a -> Int #

hash :: Id a -> Int #

ToJSON (Id a) Source # 
Instance details

Defined in Stan.Core.Id

Methods

toJSON :: Id a -> Value #

type AnyId = Id () Source #

A type alias for the situations when we don't care about the parameter of Id but don't want to deal with type variables.

castId :: forall to from to'. (to == to') ~ 'True => Id from -> Id to' Source #

Unsafe cast of Id. Implementation uses smart trick to enforce usage always with TypeApplications.