Created
June 2, 2018 12:15
-
-
Save AlistairB/273c69dcb15022a43ba8a8756d3731d2 to your computer and use it in GitHub Desktop.
Haskell Learnings
This file contains 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 FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
class Zomg a where | |
zomg :: a -> String | |
data Errr a = Errr a | |
instance Zomg (Errr a) where | |
zomg a = "ROckin" | |
class Zomg2 (f :: * -> *) where | |
zomg2 :: f a -> String | |
instance Zomg2 Errr where | |
zomg2 a = "ROckin" | |
instance Functor Errr where | |
fmap f (Errr a) = Errr $ f a | |
instance Num a => Zomg (Blah a) | |
zomg = undefined | |
instance IsString a => Zomg (Blah a) | |
zomg = undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment