Fails with arrow syntax and line break #306

Open
opened 2020-05-30 14:55:22 +02:00 by chrissound · 0 comments
chrissound commented 2020-05-30 14:55:22 +02:00 (Migrated from github.com)

Not 100% sure this is a bug - not too familiar with the Arrows lang ext.

{-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}

module MyModel where

import Data.Time

personSelect :: Select UserMatchA
personSelect =
  proc () -> row -< ()

outputs

brittany --output-on-errors MyModel.hs
ERROR: brittany pretty printer returned syntactically invalid result.
ERROR: encountered unknown syntactical constructs:
HsProc{} at MyModel.hs:10:3-22
{-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}

module MyModel where

import           Data.Time

personSelect :: Select UserMatchA
personSelect = {- BRITTANY ERROR UNHANDLED SYNTACTICAL CONSTRUCT -}

The above fails while if we remove a line break it works:

{-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}

module MyModel where

import Data.Time

personSelect :: Select UserMatchA
personSelect = proc () -> row -< ()
Not 100% sure this is a bug - not too familiar with the Arrows lang ext. ``` {-# LANGUAGE Arrows #-} {-# LANGUAGE OverloadedStrings #-} module MyModel where import Data.Time personSelect :: Select UserMatchA personSelect = proc () -> row -< () ``` outputs ``` brittany --output-on-errors MyModel.hs ERROR: brittany pretty printer returned syntactically invalid result. ERROR: encountered unknown syntactical constructs: HsProc{} at MyModel.hs:10:3-22 {-# LANGUAGE Arrows #-} {-# LANGUAGE OverloadedStrings #-} module MyModel where import Data.Time personSelect :: Select UserMatchA personSelect = {- BRITTANY ERROR UNHANDLED SYNTACTICAL CONSTRUCT -} ``` The above fails while if we remove a line break it works: ``` {-# LANGUAGE Arrows #-} {-# LANGUAGE OverloadedStrings #-} module MyModel where import Data.Time personSelect :: Select UserMatchA personSelect = proc () -> row -< () ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#306
There is no content yet.