Commit 6a4eb29b authored by simonpj's avatar simonpj
Browse files

More update to deriving

parent 316afaf2
{-# LANGUAGE TypeFamilies, StandaloneDeriving, FlexibleInstances, GADTs #-}
module Main where
import Ix
-- Deriving Enum with phantom type parameter
data T a = R | S | T deriving( Enum, Show, Ix )
-- Tests that deriving works for data families
data family Foo a
......@@ -20,5 +25,6 @@ data Bar a where
deriving instance (Eq (Bar Int))
main = do { print (map f [B .. D])
main = do { print [R .. T]
; print (map f [B .. D])
; print [P 3 == P 3, P 4 == Q] }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment