alexander.fuchs: > Hi there, > > I am trying to write my first serious Haskell program, but have > problems understanding 'strange' performance results. It seems to be > a ghc specific question, so I am asking here. > > In a happy parser I have this code 1): > > %monad { Parsed } { thenP } { returnP } > > type Parsed = State Env.Env > > returnP :: a -> Parsed a > returnP a = return a > > thenP :: Parsed a -> (a -> Parsed b) -> Parsed b > thenP x k = x >>= k > > > An alternative was this 2) (yes, redundant in happy): > > returnP :: a -> Parsed a > returnP = return > > thenP :: Parsed a -> (a -> Parsed b) -> Parsed b > thenP = (>>=) >
Could you submit a minimal, complete grammar file, so we can look at the generated code? -- Don _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users