google-code-export / omega

Automatically exported from code.google.com/p/omega
Other
2 stars 0 forks source link

Printing type of polymorphic constructor #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In this code

data ValueA :: forall (k :: *1). (k ~> *0) ~> k ~> *0 where
  A :: forall (k :: *1) m (n :: k). m n -> ValueA m n

data ValueB :: forall (k :: *1). (k ~> *0) ~> k ~> *0 where
  B :: forall (k :: *1) (m :: k ~> *0) (n :: k). m n -> ValueB m n

ValueA and ValueB should work the same. They mostly do - both can be used as 
constructors and in pattern matching. But ":t A" gives an error, and ":t B" 
works well.

prompt> :t A

Different types
   'b   !=   'a
(dbd,ebd)
prompt> :t B
B :: forall (a:*1) (b:a ~> *0) (c:a:*1).b c -> ValueB b c

Original issue reported on code.google.com by krz.gogo...@gmail.com on 30 Aug 2011 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by ggr...@gmail.com on 8 Sep 2011 at 9:09