Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created September 5, 2017 09:24
Show Gist options
  • Save reactormonk/ebd1751c99eeec84411d64da671ee258 to your computer and use it in GitHub Desktop.
Save reactormonk/ebd1751c99eeec84411d64da671ee258 to your computer and use it in GitHub Desktop.
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeSynonymInstances #-}
import Data.Functor.Foldable
newtype Object a = Object {getObject :: a} deriving (Show, Eq, Functor)
data Label l a = Label { label :: l, inner :: a } deriving (Show, Eq, Functor)
data FooF l a = FooF { nested :: (Label l) (Object a) }
type LabelFunctor l = Fix (FooF l)
instance Functor LabelFunctor where
fmap = undefined
main = print ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment