Module

Type.Data.Peano.Int.Parse

Package
purescript-typelevel-peano
Repository
csicar/purescript-typelevel-peano

#ParseInt Source

class ParseInt (sym :: Symbol) (int :: Int) | int -> sym, sym -> int

Parse a Int from a Symbol

ParseInt "-10" N10
ParseInt "1337" P1337 -- P1137 would be type alias for Pos (Succ^1337 Z)

Instances

#parseInt Source

parseInt :: forall sym a. ParseInt sym a => SProxy sym -> IProxy a

parse Int a Value-Level

parseInt (undefined :: SProxy "-1337") N1337 
    -- N1137 would be type alias for Neg (Succ^1337 Z)