Changes between Initial Version and Version 1 of Ticket #7828, comment 24


Ignore:
Timestamp:
Jun 12, 2014 5:51:30 PM (5 years ago)
Author:
jstolarek
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7828, comment 24

    initial v1  
    5656}}}
    5757These `GHC.Prim.Any` look wrong. Notice that there are two calls of `>>>` and `arr` but only one of each has these extra `GHC.Prim.Any` parameters. The incorrect `>>>` and `arr` are generated by my modified `HsCmdTop`. The other pair of `>>>` and `arr` is generated by `HsCmdArrApp` constructor, which has not been modified yet. Simon, help?
     58
     59EDIT: For completeness sake here's the code I was compiling:
     60
     61{{{
     62{-# LANGUAGE GADTs, Arrows, NullaryTypeClasses #-}
     63{-# LANGUAGE RebindableSyntax #-}
     64module T7828 where
     65
     66import Prelude          (Either(..), flip, Int, return)
     67
     68import Control.Category (Category)
     69import Control.Arrow    (Arrow)
     70
     71test :: Foo a => R a a
     72test = proc n -> returnA -< n
     73
     74instance Category R where
     75instance Arrow R where
     76
     77class Foo a where
     78
     79data R a b where
     80  Id       :: R a a
     81  Comp     :: R b c -> R a b -> R a c
     82  Arr      :: (a -> b) -> R a b
     83  Split    :: R b c -> R b' c' -> R (b,b') (c,c')
     84
     85infixr 1 >>>
     86infixr 3 ***
     87
     88arr :: (a -> b) -> R a b
     89arr = Arr
     90
     91first :: R b c -> R (b, d) (c, d)
     92first = (*** Id)
     93
     94(***) :: R b c -> R b' c' -> R (b,b') (c,c')
     95(***) = Split
     96
     97(>>>) :: R a b -> R b c -> R a c
     98(>>>) = flip Comp
     99
     100returnA :: R a a
     101returnA = Id
     102}}}