Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created September 5, 2017 09:37
Show Gist options
  • Save reactormonk/941f3ab35ca0aa470c4984a2b7e3e655 to your computer and use it in GitHub Desktop.
Save reactormonk/941f3ab35ca0aa470c4984a2b7e3e655 to your computer and use it in GitHub Desktop.
#!/usr/bin/env stack
{- stack --resolver lts-9.1
script
--compile
--package recursion-schemes
-}
{-# 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