@@ -6,7 +6,7 @@ module Ur.Deconstructor exposing
6 , int, signedInt, bigint
6 , int, signedInt, bigint
7 , float32, float64
7 , float32, float64
8 , cord, tape
8 , cord, tape
9− , bytes, sig, ignore, tar, lazy, debug
9+ , bytes, sig, ignore, tar, lazy
12{-| This module provides an API to deconstruct `Noun`s into arbitrary Elm data structures.
12{-| This module provides an API to deconstruct `Noun`s into arbitrary Elm data structures.
@@ -55,7 +55,7 @@ You would parse a `[%edit @ cord]` like this:
56# Miscellaneous
56# Miscellaneous
58−@docs bytes, sig, ignore, tar, lazy, debug
58+@docs bytes, sig, ignore, tar, lazy
@@ -66,7 +66,7 @@ import Bytes exposing (Bytes, Endianness(..))
66import Bytes.Decode as BD
66import Bytes.Decode as BD
67import Bytes.Encode as BE
67import Bytes.Encode as BE
68import Bytes.Extra
68import Bytes.Extra
69−import Ur.Jam exposing (cue, isSig)
69+import Ur.Jam exposing (cue)
70import Ur.Types exposing (..)
70import Ur.Types exposing (..)
@@ -113,8 +113,6 @@ const f value noun =
116−{-| Extracts a `BigInt`.
118bigint : Deconstructor BigInt
116bigint : Deconstructor BigInt
119bigint x =
117bigint x =
120 case x of
118 case x of
@@ -274,8 +272,6 @@ lazy f noun =
274 f () noun
272 f () noun
277−{-| Maps over the result of the deconstructor.
279map : (a -> b) -> Deconstructor a -> Deconstructor b
275map : (a -> b) -> Deconstructor a -> Deconstructor b
280map g f noun =
276map g f noun =
281 f noun |> Maybe.map g
277 f noun |> Maybe.map g
@@ -337,42 +333,3 @@ Always succeeds.
337tar : Deconstructor Noun
333tar : Deconstructor Noun
342−{-| Debug a deconstructor.
343−If the deconstructor from the second argument fails then the failed nock will be printed to the console.
345−debug : (String -> String) -> Deconstructor a -> Deconstructor a
354− log (prettyNoun noun)
359−prettyNoun : Noun -> String
371− Cell ( lhs, rhs ) ->
373− go False lhs ++ " " ++ go True rhs
376− "[" ++ go False lhs ++ " " ++ go True rhs ++ "]"