Ticket #70 (new enhancement)

Opened 7 years ago

Last modified 6 years ago

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

Changed 6 years ago by erikd

  • owner set to erikd

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

Changed 6 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?.

Note: See TracTickets for help on using tickets.