adding OverloadedStrings extension, hiding conflicting <$> operator
This commit is contained in:
parent
d68ba45367
commit
1448d3400a
|
@ -1,2 +1,4 @@
|
|||
/Setup
|
||||
/dist/
|
||||
**/#*
|
||||
**/.#*
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Nix.Eval where
|
||||
|
||||
import Control.Applicative
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Nix.Parser (parseNixFile, parseNixString, Result(..)) where
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Nix.Parser.Library ( module Nix.Parser.Library, module X) where
|
||||
|
||||
import Control.Applicative
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Nix.Pretty where
|
||||
|
||||
import Prelude hiding ((<$>))
|
||||
import Data.Fix
|
||||
import Data.Map (toList)
|
||||
import Data.Maybe (isJust)
|
||||
|
@ -23,12 +25,12 @@ data NixDoc = NixDoc
|
|||
}
|
||||
|
||||
-- | A simple expression is never wrapped in parentheses. The expression
|
||||
-- behaves as if it's root operator had a precedence higher than all
|
||||
-- behaves as if its root operator had a precedence higher than all
|
||||
-- other operators (including function application).
|
||||
simpleExpr :: Doc -> NixDoc
|
||||
simpleExpr = flip NixDoc $ OperatorInfo maxBound NAssocNone "simple expr"
|
||||
|
||||
-- | An expression that behaves as if it's root operator
|
||||
-- | An expression that behaves as if its root operator
|
||||
-- had a precedence lower than all other operators.
|
||||
-- That ensures that the expression is wrapped in parantheses in
|
||||
-- almost always, but it's still rendered without parentheses
|
||||
|
|
Loading…
Reference in New Issue