Skip to content

Instantly share code, notes, and snippets.

@AlistairB
Created June 2, 2018 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlistairB/273c69dcb15022a43ba8a8756d3731d2 to your computer and use it in GitHub Desktop.
Save AlistairB/273c69dcb15022a43ba8a8756d3731d2 to your computer and use it in GitHub Desktop.
Haskell Learnings
{-# 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