unwrap -package:pinch

Remove a layer.
Unwrap the fields of a constructor
Turns a pattern of patterns into a single pattern. (this is actually join) 1/ For query arc, get the events from the outer pattern pp 2/ Query the inner pattern using the part of the outer 3/ For each inner event, set the whole and part to be the intersection of the outer whole and part, respectively 4 Concatenate all the events together (discarding wholesparts that didn't intersect) TODO - what if a continuous pattern contains a discrete one, or vice-versa?
This is the simple phase unwrapping algorithm from Oppenheim and Schafer.
Get bare list from wrapped type which can be parsed directly from JSON.
Defines a QuasiQuoter to extract a schema within the given schema. The base schema needs to be defined in a separate module. For example:
-- | MyFoo ~ Object [schema| { b: Maybe Bool } |]
type MyFoo = [unwrap| MySchema.foo.nodes[] |]
If the schema is imported qualified, you can use parentheses to distinguish it from the expression:
type MyFoo = [unwrap| (MyModule.Schema).foo.nodes[] |]
You can then use the type alias as usual:
parseBar :: MyFoo -> String
parseBar = maybe "null" show . [get| .b |]

foo = map parseBar [get| result.foo.nodes[] |]
The syntax is mostly the same as get, except the operations run on the type itself, instead of the values. Differences from get:
  • x! is only valid if x is a Maybe a type. Returns a, the type wrapped in the Maybe.
  • x? is the same as x!.
  • x[] is only valid if x is a [a] type. Returns a, the type contained in the list.
  • x@# is only valid if x is a SumType. Returns the type at that branch in the sum type.
Unwrap every value in the vector from the type constructor.
Forget type-level length, obtaining the underlying value.
unwrap the phase of signal (input expected to be within (-pi,pi))
Unwraps an Either Reply a by throwing an exception if not Right.