Opened 11 years ago

Closed 9 years ago

#70 closed enhancement (fixed)

Implement operator sectioning

Reported by: benl Owned by: erikd
Priority: project Milestone:
Component: Source Parser Version:
Keywords: Cc:


Added by Jared.

The following function fails to compile.

example = (0 ==)

The error message is:

ddc: PANIC in Source.DefixApps
        makeXDefixApps: parse error at
        ./Test.ds:1:13   xx = []

Change History (3)

comment:1 Changed 10 years ago by erikd

  • Owner set to erikd

It should be possible to fix this during the current Parser refactoring.

comment:2 Changed 10 years ago by erikd

I was thinking about converting:

isZero = 0 ==

to a lambda expression:

isZero = \ x -> 0 == x

but that was problematic because there was no easy way to generate a variable name for 'x' without threading a State monad through DefixApps?. Mentioned this to Ben and he suggested converting it to:

isZero = flip (==) 0

This requires making Data.Function.flip available as a primitive in Shared.VarPrim?.

comment:3 Changed 9 years ago by erikd

  • Resolution set to fixed
  • Status changed from new to closed

Turned out to be a simple fix.

In DefixApps?, when we detect:

Var : XOp : []

then return them in switched order.

Note: See TracTickets for help on using tickets.