On Wednesday 21 September 2011, 01:02:52, [email protected] wrote:
> Would it be possible to have no command at all? Types are
> distinguished by upper-case letters, so it should be possible to tell
> whether a given expression is a value-level or a type-level expression.
Unless I'm misunderstanding, no:
{-# LANGUAGE TypeFamilies #-}
module TFEx where
type family F a
type instance F Int = Bool
type instance F Bool = Int
type instance F (a, b) = (F a, F b)
data Foo a = F a deriving Show
data Moo = Int | Bool deriving Show
*TFEx> F (Int,Bool)
F (Int,Bool)
*TFEx> :t F (Int,Bool)
F (Int,Bool) :: Foo (Moo, Moo)
*TFEx> :t undefined :: F (Int,Bool)
undefined :: F (Int,Bool) :: (Bool, Int)
*TFEx>
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users