Skip to content
forked from pa-ba/compdata

Haskell library to generically lift/inject subtypes into supertypes and extract/project back

Notifications You must be signed in to change notification settings

yairchu/subtypes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subtypes

This library provides generic inj and proj functions to lift/inject subtypes into types containing them, or extract subtypes from other types.

It is based on snippets from compdata and inspired by generic-lens.

  • IIUC it generally does the same thing as generic-lens's Data.Generics.Sum.Subtype module but it seems to work on some cases where generic-lens did not work for me
  • I based the code on compdata because I succeeded in following along with its implementation
  • Possibly this can all be replaced with a PR to generic-lens to make it handle more cases

About

Haskell library to generically lift/inject subtypes into supertypes and extract/project back

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%