Skip to content

C pragma and Illegal token: else #970

Closed
@YoEight

Description

@YoEight

Hi,

{-# LANGUAGE CPP #-}
module Test where

foo :: Int -> Int
#ifdef FOO
foo = succ
#else
foo = pred
#endif

gets me Illegal token: else message when I hit ENTER.

Thanks for your time,
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions