Skip to content

LANGUAGE pragma parser nit

Language pragmas like

{-# LANGUAGE 
    TypeOperators,
    FlexibleContexts #-}

or

{-# LANGUAGE 
    TypeOperators,
    FlexibleContexts
  #-}

parse just fine but

{-# LANGUAGE 
    TypeOperators,
    FlexibleContexts
#-}

doesn't (note the missing spaces before the closing #-}), saying:

    Cannot parse LANGUAGE pragma
    Expecting comma-separated list of language options,
    each starting with a capital letter

An OPTIONS_GHC pragma, on the other hand, accepts either format without complaint.

Edited by Thomas Miedema
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information