Skip to content

Commit

Permalink
Enabled default fixities in myDefaultParseMode
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasDuregard committed Jun 20, 2018
1 parent 595d900 commit 8bfa70a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/Language/Haskell/Meta/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@ parseDecs = either Left (Right . toDecs) . parseHsDecls
{-# DEPRECATED myDefaultParseMode, myDefaultExtensions
"The provided ParseModes aren't very meaningful, use your own instead" #-}
myDefaultParseMode :: ParseMode
myDefaultParseMode = ParseMode
myDefaultParseMode = defaultParseMode
{parseFilename = []
,baseLanguage = Haskell2010
,extensions = map EnableExtension myDefaultExtensions
,ignoreLinePragmas = False
,ignoreLanguagePragmas = False
,fixities = Nothing
,ignoreFunctionArity = False
}

myDefaultExtensions :: [KnownExtension]
Expand Down
4 changes: 3 additions & 1 deletion tests/Splices.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
-- | Tests stuff mostly by just compiling correctly
import Language.Haskell.Meta


----- Testing names -----

-- Test that the unit constructor works
Expand All @@ -23,8 +22,11 @@ $(either error return $ parseDecs $ unlines
,"instance MyClass Bool where mymethod a b = (a,b)"
])



-- Just to check that it works as intended
main = do
-9 <- return $(either error return $ parseExp "-3^2") :: IO Int
() <- unit
[] <- return (nilp [])
(1,2) <- return pair
Expand Down

0 comments on commit 8bfa70a

Please sign in to comment.