adding OverloadedStrings extension, hiding conflicting <$> operator

This commit is contained in:
Allen Nelson 2015-06-23 11:18:18 -05:00
parent d68ba45367
commit 1448d3400a
5 changed files with 9 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
/Setup
/dist/
**/#*
**/.#*

View File

@ -1,3 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
module Nix.Eval where
import Control.Applicative

View File

@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Nix.Parser (parseNixFile, parseNixString, Result(..)) where

View File

@ -1,5 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Nix.Parser.Library ( module Nix.Parser.Library, module X) where
import Control.Applicative

View File

@ -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