Created
September 5, 2017 09:37
-
-
Save reactormonk/941f3ab35ca0aa470c4984a2b7e3e655 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
#!/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