Created
September 5, 2017 09:24
-
-
Save reactormonk/ebd1751c99eeec84411d64da671ee258 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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