flay

Work generically on your datatype without knowing its shape nor its contents.

https://github.com/k0001/flay

Version on this page:0.4@rev:1
LTS Haskell 22.41:0.4@rev:1
Stackage Nightly 2024-11-12:0.5
Latest on Hackage:0.5

See all snapshots flay appears in

BSD-3-Clause licensed by Renzo Carbonara
Maintained by renλren!zone
This version can be pinned in stack with:flay-0.4@sha256:41bc295a07049212e9de1f35dc2ae1a60653f31529b3230dbe3605aafcea2d76,1129

Module documentation for 0.4

flay

See the BSD3 LICENSE file to learn about the legal terms and conditions for this library.

Find documentation for this library in the Flay module.

You can build this library with Nix by running nix-build on the top level of this module. nix-shell works as well.

Changes

Version 0.4

  • COMPILER ASSISTED BREAKING CHANGE: Fixed TypeApplications for flay1 so that @c@ comes first.

  • COMPILER ASSISTED BREAKING CHANGE: Not exporting GFlay', gflay', gterminal anymore.

  • COMPILER ASSISTED BREAKING CHANGE: GFlay and All are now type synonyms rather than classes.

  • COMPILER ASSISTED BREAKING CHANGE: Flayable1 is not a typeclass anymore. Now it is a type synonym for Flayable using “quantified constraints” as implemented in Data.Constraint.Forall. Accordingly, flay1 is not a typeclass method anymore.

  • Generic types parametrized by a type constructor who have all of their immediate children fields using said type constructor get a Flayable instance for free.

  • Added pump, dump, Pump and GPump.

  • Added GTerminal instance for GHC.Generics.U1.

  • Added Fields, GFields, FieldsF and GFieldsF.

Version 0.3

  • BREAKING CHANGE: zip, zip1 and unsafeZip now take a monadic pairing function, and return Maybe where Nothing happens in the target indexes do not match.

  • BREAKING CHANGE: Remove Record and GRecord.

  • Added trivialize.

  • Generalized type of trivial'.

Version 0.2

  • BREAKING CHANGE: The m parameter in in Flay and Flayable has been existentialized, to be chosen by the caller.

  • BREAKING CHANGE: We don’t use DefaultSignatures for flay = gflay anymore. This is very sad, but unfortunately type inferrence for the c type variable in new Flayable instances doesn’t work.

  • Added Flayable1, trivial1, collect1, Terminal, GTerminal, zip1, zip, Record, GRecord.

  • Removed outer.

  • Made compatible with GHC 8.2.2.

Version 0.1

  • Initial version.