on master help sign in
Move extensions into source files
5d7388bEdwin Brady
idris.cabal+7−10
@@ -40,7 +40,7 @@ Description: Idris is a general purpose language with full dependent types.
40 .
40 .
41 * Hugs style interactive environment
41 * Hugs style interactive environment
42
42
43−Cabal-Version: >= 1.8.1
43+Cabal-Version: >= 1.18
44
44
45Build-type: Custom
45Build-type: Custom
46
46
@@ -320,13 +320,7 @@ Library
320 if impl(ghc < 7.8.4)
320 if impl(ghc < 7.8.4)
321 build-depends: tagsoup < 0.14.1
321 build-depends: tagsoup < 0.14.1
322
322
323− Extensions: MultiParamTypeClasses
323+ Default-Language: Haskell2010
324− , DeriveFoldable
325− , DeriveTraversable
326− , FunctionalDependencies
327− , FlexibleContexts
328− , FlexibleInstances
329− , TemplateHaskell
330
324
331 ghc-prof-options: -auto-all -caf-all
325 ghc-prof-options: -auto-all -caf-all
332
326
@@ -365,6 +359,7 @@ Executable idris
365 , haskeline >= 0.7
359 , haskeline >= 0.7
366 , transformers
360 , transformers
367
361
362+ Default-Language: Haskell2010
368 ghc-prof-options: -auto-all -caf-all
363 ghc-prof-options: -auto-all -caf-all
369 ghc-options: -threaded -rtsopts -funbox-strict-fields -with-rtsopts=-I0
364 ghc-options: -threaded -rtsopts -funbox-strict-fields -with-rtsopts=-I0
370
365
@@ -389,10 +384,9 @@ Test-suite regression-and-feature-tests
389 , tasty-rerun >= 1.0.0
384 , tasty-rerun >= 1.0.0
390 , bytestring
385 , bytestring
391 , transformers
386 , transformers
392− if impl(ghc < 7.10)
393− Extensions: DeriveDataTypeable
394
387
395
388
389+ Default-Language: Haskell2010
396 ghc-prof-options: -auto-all -caf-all
390 ghc-prof-options: -auto-all -caf-all
397 ghc-options: -threaded -rtsopts -with-rtsopts=-N -funbox-strict-fields
391 ghc-options: -threaded -rtsopts -with-rtsopts=-N -funbox-strict-fields
398
392
@@ -406,6 +400,7 @@ Executable idris-codegen-c
406 , haskeline >= 0.7
400 , haskeline >= 0.7
407 , transformers
401 , transformers
408
402
403+ Default-Language: Haskell2010
409 ghc-prof-options: -auto-all -caf-all
404 ghc-prof-options: -auto-all -caf-all
410 ghc-options: -threaded -rtsopts -funbox-strict-fields
405 ghc-options: -threaded -rtsopts -funbox-strict-fields
411
406
@@ -419,6 +414,7 @@ Executable idris-codegen-javascript
419 , haskeline >= 0.7
414 , haskeline >= 0.7
420 , transformers
415 , transformers
421
416
417+ Default-Language: Haskell2010
422 ghc-prof-options: -auto-all -caf-all
418 ghc-prof-options: -auto-all -caf-all
423 ghc-options: -threaded -rtsopts -funbox-strict-fields
419 ghc-options: -threaded -rtsopts -funbox-strict-fields
424
420
@@ -432,5 +428,6 @@ Executable idris-codegen-node
432 , haskeline >= 0.7
428 , haskeline >= 0.7
433 , transformers
429 , transformers
434
430
431+ Default-Language: Haskell2010
435 ghc-prof-options: -auto-all -caf-all
432 ghc-prof-options: -auto-all -caf-all
436 ghc-options: -threaded -rtsopts -funbox-strict-fields
433 ghc-options: -threaded -rtsopts -funbox-strict-fields
src/IRTS/CodegenC.hs+2
@@ -5,6 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE FlexibleContexts #-}
9+
8module IRTS.CodegenC (codegenC) where
10module IRTS.CodegenC (codegenC) where
9
11
10import Idris.AbsSyntax hiding (getBC)
12import Idris.AbsSyntax hiding (getBC)
src/IRTS/Compiler.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE CPP, PatternGuards, TypeSynonymInstances #-}
8+{-# LANGUAGE CPP, FlexibleContexts, PatternGuards, TypeSynonymInstances #-}
9
9
10module IRTS.Compiler(compile, generate) where
10module IRTS.Compiler(compile, generate) where
11
11
src/IRTS/Defunctionalise.hs+1−1
@@ -19,7 +19,7 @@ To defunctionalise:
198. Add explicit EVAL to case, primitives, and foreign calls
198. Add explicit EVAL to case, primitives, and foreign calls
20
20
21-}
21-}
22−{-# LANGUAGE PatternGuards #-}
22+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
23module IRTS.Defunctionalise(module IRTS.Defunctionalise
23module IRTS.Defunctionalise(module IRTS.Defunctionalise
24 , module IRTS.Lang
24 , module IRTS.Lang
25 ) where
25 ) where
src/IRTS/Lang.hs+2−1
@@ -5,7 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric, PatternGuards #-}
8+{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric, FlexibleContexts,
9+ PatternGuards #-}
9
10
10module IRTS.Lang where
11module IRTS.Lang where
11
12
src/IRTS/Portable.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE OverloadedStrings #-}
8+{-# LANGUAGE FlexibleInstances, OverloadedStrings, TypeSynonymInstances #-}
9module IRTS.Portable (writePortable) where
9module IRTS.Portable (writePortable) where
10
10
11import Idris.Core.CaseTree
11import Idris.Core.CaseTree
src/IRTS/Simplified.hs+1
@@ -5,6 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE FlexibleContexts #-}
8module IRTS.Simplified(simplifyDefs, SDecl(..), SExp(..), SAlt(..)) where
9module IRTS.Simplified(simplifyDefs, SDecl(..), SExp(..), SAlt(..)) where
9
10
10import Idris.Core.CaseTree
11import Idris.Core.CaseTree
src/Idris/AbsSyntax.hs+1−1
@@ -6,7 +6,7 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9−{-# LANGUAGE DeriveFunctor, PatternGuards #-}
9+{-# LANGUAGE DeriveFunctor, FlexibleContexts, PatternGuards #-}
10
10
11module Idris.AbsSyntax(
11module Idris.AbsSyntax(
12 module Idris.AbsSyntax
12 module Idris.AbsSyntax
src/Idris/AbsSyntaxTree.hs+3−1
@@ -6,7 +6,9 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9−{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric, PatternGuards #-}
9+{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,
10+ DeriveTraversable, FlexibleContexts, FlexibleInstances,
11+ MultiParamTypeClasses, PatternGuards, TypeSynonymInstances #-}
10
12
11module Idris.AbsSyntaxTree where
13module Idris.AbsSyntaxTree where
12
14
src/Idris/Apropos.hs+1
@@ -5,6 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE FlexibleInstances #-}
8module Idris.Apropos (apropos, aproposModules) where
9module Idris.Apropos (apropos, aproposModules) where
9
10
10import Idris.AbsSyntax
11import Idris.AbsSyntax
src/Idris/CaseSplit.hs+1−1
@@ -17,7 +17,7 @@ Always take the "more specific" argument when there is a discrepancy, i.e.
17names over '_', patterns over names, etc.
17names over '_', patterns over names, etc.
18-}
18-}
19
19
20−{-# LANGUAGE PatternGuards #-}
20+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
21
21
22module Idris.CaseSplit(
22module Idris.CaseSplit(
23 splitOnLine, replaceSplits
23 splitOnLine, replaceSplits
src/Idris/Chaser.hs+2
@@ -5,6 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE FlexibleContexts #-}
9+
8module Idris.Chaser(
10module Idris.Chaser(
9 buildTree, getImports
11 buildTree, getImports
10 , getModuleFiles
12 , getModuleFiles
src/Idris/Core/Binary.hs+2
@@ -5,6 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE FlexibleInstances #-}
9+
8{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
9module Idris.Core.Binary where
11module Idris.Core.Binary where
10
12
src/Idris/Core/CaseTree.hs+2−2
@@ -18,8 +18,8 @@ allows casing on arbitrary terms, here we choose to maintain the distinction
18in order to allow for better optimisation opportunities.
18in order to allow for better optimisation opportunities.
19
19
20-}
20-}
21+{-# LANGUAGE DeriveFunctor, DeriveGeneric, FlexibleContexts, FlexibleInstances,
21−{-# LANGUAGE DeriveFunctor, DeriveGeneric, PatternGuards, TypeSynonymInstances
22+ PatternGuards, TypeSynonymInstances #-}
22− #-}
23
23
24module Idris.Core.CaseTree (
24module Idris.Core.CaseTree (
25 CaseDef(..), SC, SC'(..), CaseAlt, CaseAlt'(..), ErasureInfo
25 CaseDef(..), SC, SC'(..), CaseAlt, CaseAlt'(..), ErasureInfo
src/Idris/Core/DeepSeq.hs+2−1
@@ -5,7 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE BangPatterns, CPP, FlexibleInstances, TypeSynonymInstances,
8−{-# LANGUAGE BangPatterns, CPP, ViewPatterns #-}
9+ ViewPatterns #-}
9{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10
11
11module Idris.Core.DeepSeq where
12module Idris.Core.DeepSeq where
src/Idris/Core/ProofState.hs+2−1
@@ -10,7 +10,8 @@ proofs, and some high level commands for introducing new theorems,
10evaluation/checking inside the proof system, etc.
10evaluation/checking inside the proof system, etc.
11-}
11-}
12
12
13−{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards #-}
13+{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses,
14+ PatternGuards #-}
14module Idris.Core.ProofState(
15module Idris.Core.ProofState(
15 ProofState(..), newProof, envAtFocus, goalAtFocus
16 ProofState(..), newProof, envAtFocus, goalAtFocus
16 , Tactic(..), Goal(..), processTactic, nowElaboratingPS
17 , Tactic(..), Goal(..), processTactic, nowElaboratingPS
src/Idris/Core/TT.hs+4−2
@@ -22,8 +22,10 @@ TT is the core language of Idris. The language has:
22 * We have a simple collection of tactics which we use to elaborate source
22 * We have a simple collection of tactics which we use to elaborate source
23 programs with implicit syntax into fully explicit terms.
23 programs with implicit syntax into fully explicit terms.
24-}
24-}
25−{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric, FlexibleContexts,
25+{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,
26+ DeriveTraversable, FlexibleContexts, FlexibleInstances,
26− FunctionalDependencies, MultiParamTypeClasses, PatternGuards #-}
27+ FunctionalDependencies, MultiParamTypeClasses, PatternGuards,
28+ TypeSynonymInstances #-}
27{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
29{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
28module Idris.Core.TT(
30module Idris.Core.TT(
29 AppStatus(..), ArithTy(..), Binder(..), Const(..), Ctxt(..)
31 AppStatus(..), ArithTy(..), Binder(..), Const(..), Ctxt(..)
src/Idris/Core/Typecheck.hs+2−2
@@ -6,8 +6,8 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9−{-# LANGUAGE DeriveFunctor, FlexibleInstances, MultiParamTypeClasses,
9+{-# LANGUAGE DeriveFunctor, FlexibleContexts, FlexibleInstances,
10− PatternGuards #-}
10+ MultiParamTypeClasses, PatternGuards #-}
11
11
12module Idris.Core.Typecheck where
12module Idris.Core.Typecheck where
13
13
src/Idris/Core/Unify.hs+1−1
@@ -11,7 +11,7 @@ Returns a list of hole names paired with the term which solves them, and
11a list of things which need to be injective.
11a list of things which need to be injective.
12
12
13-}
13-}
14−{-# LANGUAGE PatternGuards #-}
14+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
15
15
16module Idris.Core.Unify(
16module Idris.Core.Unify(
17 match_unify, unify
17 match_unify, unify
src/Idris/Core/WHNF.hs+1−1
@@ -6,7 +6,7 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9−{-# LANGUAGE PatternGuards #-}
9+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
11module Idris.Core.WHNF(whnf, whnfArgs, WEnv) where
11module Idris.Core.WHNF(whnf, whnfArgs, WEnv) where
12
12
src/Idris/Coverage.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE PatternGuards #-}
8+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
9module Idris.Coverage(genClauses, validCoverageCase, recoverableCoverage,
9module Idris.Coverage(genClauses, validCoverageCase, recoverableCoverage,
10 mkPatTm) where
10 mkPatTm) where
11
11
src/Idris/DataOpts.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE PatternGuards #-}
8+{-# LANGUAGE FlexibleInstances, PatternGuards #-}
9
9
10module Idris.DataOpts(applyOpts) where
10module Idris.DataOpts(applyOpts) where
11
11
src/Idris/Docstrings.hs+2−1
@@ -6,7 +6,8 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9−{-# LANGUAGE DeriveFunctor, DeriveGeneric, ScopedTypeVariables #-}
9+{-# LANGUAGE DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable,
10+ ScopedTypeVariables #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
11{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
11module Idris.Docstrings (
12module Idris.Docstrings (
12 Docstring(..), Block(..), Inline(..), parseDocstring, renderDocstring
13 Docstring(..), Block(..), Inline(..), parseDocstring, renderDocstring
src/Idris/Elab/Utils.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE PatternGuards #-}
8+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
9module Idris.Elab.Utils where
9module Idris.Elab.Utils where
10
10
11import Idris.AbsSyntax
11import Idris.AbsSyntax
src/Idris/IBC.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE TypeSynonymInstances #-}
8+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
9{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
9{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10
10
11module Idris.IBC (loadIBC, loadPkgIndex,
11module Idris.IBC (loadIBC, loadPkgIndex,
src/Idris/Output.hs+1
@@ -6,6 +6,7 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8
8
9+{-# LANGUAGE FlexibleInstances #-}
9{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
10
11
11module Idris.Output where
12module Idris.Output where
src/Idris/Package/Parser.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE CPP, ConstraintKinds #-}
8+{-# LANGUAGE CPP, ConstraintKinds, FlexibleInstances, TypeSynonymInstances #-}
9module Idris.Package.Parser where
9module Idris.Package.Parser where
10
10
11import Idris.AbsSyntaxTree
11import Idris.AbsSyntaxTree
src/Idris/Parser.hs+2−1
@@ -5,7 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards #-}
8+{-# LANGUAGE ConstraintKinds, FlexibleContexts, GeneralizedNewtypeDeriving,
9+ PatternGuards #-}
9{-# OPTIONS_GHC -O0 #-}
10{-# OPTIONS_GHC -O0 #-}
10module Idris.Parser(module Idris.Parser,
11module Idris.Parser(module Idris.Parser,
11 module Idris.Parser.Expr,
12 module Idris.Parser.Expr,
src/Idris/Parser/Helpers.hs+3−2
@@ -5,8 +5,9 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+{-# LANGUAGE CPP, ConstraintKinds, FlexibleInstances,
8−{-# LANGUAGE CPP, ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards,
9+ GeneralizedNewtypeDeriving, PatternGuards, StandaloneDeriving,
9− StandaloneDeriving #-}
10+ TypeSynonymInstances #-}
10module Idris.Parser.Helpers where
11module Idris.Parser.Helpers where
11
12
12import Idris.AbsSyntax
13import Idris.AbsSyntax
src/Idris/Parser/Ops.hs+2−1
@@ -5,7 +5,8 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards #-}
8+{-# LANGUAGE ConstraintKinds, FlexibleContexts, GeneralizedNewtypeDeriving,
9+ PatternGuards #-}
9module Idris.Parser.Ops where
10module Idris.Parser.Ops where
10
11
11import Idris.AbsSyntax
12import Idris.AbsSyntax
src/Idris/PartialEval.hs+1−1
@@ -5,7 +5,7 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8−{-# LANGUAGE PatternGuards #-}
8+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
9
9
10module Idris.PartialEval(
10module Idris.PartialEval(
11 partial_eval, getSpecApps, specType
11 partial_eval, getSpecApps, specType
src/Idris/REPL.hs+1−1
@@ -5,7 +5,7 @@ License : BSD3
5Maintainer : The Idris Community.
5Maintainer : The Idris Community.
6-}
6-}
7
7
8−{-# LANGUAGE PatternGuards #-}
8+{-# LANGUAGE FlexibleContexts, PatternGuards #-}
9
9
10module Idris.REPL
10module Idris.REPL
11 ( idemodeStart
11 ( idemodeStart
src/Util/Pretty.hs+3
@@ -5,6 +5,9 @@ Copyright :
5License : BSD3
5License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8+
9+{-# LANGUAGE MultiParamTypeClasses #-}
10+
8module Util.Pretty (
11module Util.Pretty (
9 module Text.PrettyPrint.Annotated.Leijen
12 module Text.PrettyPrint.Annotated.Leijen
10 , Sized(..)
13 , Sized(..)