code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
#ifdef DataPolyKinds
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
#endif
#ifdef... | duairc/has-lens | has-optic/src/Data/Optic.hs | bsd-3-clause | 981 | 0 | 5 | 190 | 119 | 86 | 33 | 20 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Util (
reader
, logFail
, logRunExceptT
, liftEither
) where
import Control.Monad.Except
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Read as T
import ... | nurpax/snaplet-sqlite-simple | example/src/Util.hs | bsd-3-clause | 1,230 | 0 | 9 | 272 | 321 | 174 | 147 | 27 | 3 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.CullVertex
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stabil... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/CullVertex.hs | bsd-3-clause | 1,516 | 0 | 11 | 168 | 186 | 118 | 68 | -1 | -1 |
{-# LANGUAGE PolyKinds #-}
module Zero.Account.Internal (
Account(..)
, RecoveryMethod(..)
, AccountStatus(..)
, defaultAccount
, defaultAccountStatus
, defaultRecoveryMethod
) where
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Text (T... | et4te/zero | src-shared/Zero/Account/Internal.hs | bsd-3-clause | 3,052 | 0 | 11 | 498 | 554 | 312 | 242 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1996-1998
This module contains "tidying" code for *nested* expressions, bindings, rules.
The code for *top-level* bindings is in GHC.Iface.Tidy.
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module CoreTidy (... | sdiehl/ghc | compiler/coreSyn/CoreTidy.hs | bsd-3-clause | 10,590 | 0 | 18 | 3,036 | 2,030 | 1,101 | 929 | 138 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
module Handler.Builder where
import Import
import Data.Text (Text)
import qualified Data.Text as Text
import qualified System.IO as SIO (IOMode(ReadMode), hSetEncodin... | Greif-IT/hs-yesod-proto | hs-yesod-proto-builder/src/Handler/Builder.hs | bsd-3-clause | 11,627 | 0 | 16 | 5,822 | 1,755 | 1,014 | 741 | 195 | 2 |
-----------------------------------------------------------
-- |
-- Module : DBSpecToDBDirect
-- Copyright : HWT Group (c) 2004, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
--
-- Maintainer : haskelldb-users@lists.sourceforge.net
-- Stability : experimental
-- Portability : non-port... | m4dc4p/haskelldb | src/Database/HaskellDB/DBSpec/DBSpecToDBDirect.hs | bsd-3-clause | 8,330 | 44 | 27 | 1,947 | 2,287 | 1,203 | 1,084 | 163 | 2 |
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.ByteString.Lens
-- Copyright : (C) 2012 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : exper... | np/lens | src/Data/ByteString/Lens.hs | bsd-3-clause | 2,790 | 0 | 8 | 528 | 280 | 181 | 99 | 36 | 0 |
module ParseSpec where
import Test.Hspec
import LambdaQuest.SystemF
spec :: Spec
spec = describe "SystemF.Parse" $ do
it "can parse a function type" $ do
parseType "" "Int -> Bool -> Real" `shouldBe` Right (TyArr TyInt (TyArr TyBool TyReal))
it "can parse a universal type" $ do
parseType "" "forall a. a ->... | minoki/LambdaQuest | test/ParseSpec.hs | bsd-3-clause | 752 | 0 | 20 | 161 | 282 | 135 | 147 | 13 | 1 |
module Sols.Prob8 (
solution
) where
parse :: String -> [Int]
-- Concatenate the lines of the input file together, then map a function that parses integers over the characters
parse = map (read . return) . concat . lines
--
chunks :: Int -> [a] -> [[a]]
chunks n l
| length chunk < n = []
| otherw... | authentik8/haskell-euler | src/Sols/Prob8.hs | bsd-3-clause | 564 | 0 | 9 | 150 | 194 | 100 | 94 | 14 | 1 |
module Main where
import qualified Database.Migrate.Tests
import Test.Framework
main ::
IO ()
main =
defaultMain tests
tests ::
[Test]
tests =
[
testGroup "Tests"
[
Database.Migrate.Tests.test
]
]
| markhibberd/database-migrate | test/Main.hs | bsd-3-clause | 237 | 0 | 8 | 68 | 62 | 37 | 25 | 14 | 1 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an
-- orphan
module TcEnv(
TyThing(..), TcTyThing(..), TcId,
-- Instance environment, and InstInfo type
... | siddhanathan/ghc | compiler/typecheck/TcEnv.hs | bsd-3-clause | 35,924 | 6 | 18 | 10,446 | 6,293 | 3,318 | 2,975 | 478 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- | Main stack tool entry point.
module Main where
import Control.Exception
import ... | agrafix/stack | src/main/Main.hs | bsd-3-clause | 38,359 | 0 | 30 | 14,229 | 7,723 | 3,921 | 3,802 | -1 | -1 |
module Wigner.OperatorAlgebra(
bosonicCommutationRelation,
toNormalProduct,
toSymmetricProduct
) where
import qualified Data.Map as M
import qualified Data.List as L
import qualified Wigner.DefineExpression as D
import qualified Wigner.Symbols as S
import Wigner.Expression
import Wigner.ExpressionHelpe... | fjarri/wigner | src/Wigner/OperatorAlgebra.hs | bsd-3-clause | 4,671 | 0 | 13 | 872 | 989 | 535 | 454 | 55 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
-- | Con... | vigoo/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | 27,985 | 0 | 31 | 10,344 | 6,673 | 3,352 | 3,321 | 586 | 11 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module PublisherInfo
( PublisherInfo(..)
) where
import Data.Aeson
import Data.Text
import Data.Typeable
import GHC.Generics
import Publisher (PublisherId)
type PublisherName = Text
data PublisherInfo = PublisherInfo { publisherId :: Publi... | cutsea110/servant-sample-book | src/PublisherInfo.hs | bsd-3-clause | 497 | 0 | 8 | 157 | 93 | 57 | 36 | 13 | 0 |
module Zero.Sjcl
(
module Zero.Sjcl.BitArray
) where
------------------------------------------------------------------------------
import Zero.Sjcl.BitArray
| et4te/zero | src/Zero/Sjcl.hs | bsd-3-clause | 169 | 0 | 5 | 21 | 22 | 15 | 7 | 4 | 0 |
module Util where
modifyPosition :: Int -> (a -> a) -> [a] -> [a]
modifyPosition _ _ [] = []
modifyPosition 0 f (x:xs) = (f x) : xs
modifyPosition pos f (x:xs) = x : (modifyPosition (pos - 1) f xs)
replacePosition :: Int -> a -> [a] -> [a]
replacePosition _ _ [] = []
replacePosition 0 y (x:xs) = y : xs
replacePositio... | xymostech/Hi-editor | src/Util.hs | bsd-3-clause | 760 | 0 | 9 | 151 | 412 | 219 | 193 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Web.EmbedThis.DataParser.Class (
DataParser(..)
) where
import Control.Applicative
import Data.Aeson
import Data.Aeson.Types (parseMaybe)
import Data.HashMap.Lazy
import Data.Maybe
import Data.Monoid
import Data.Text as T
import Data.Text (Text)
import Network.URI
class ... | rtrvrtg/embed-this | src/Web/EmbedThis/DataParser/Class.hs | bsd-3-clause | 683 | 0 | 10 | 162 | 207 | 116 | 91 | 22 | 0 |
module Fib where
import System
-- | Calculate Fibonacci number of given 'Num'.
--
-- >>> bar 20
-- <BLANKLINE>
-- <interactive>:1:1: Not in scope: `bar'
fib :: (Num t, Num t1) => t -> t1
fib _ = undefined
| beni55/doctest-haskell | tests/integration/testNotInScope/Fib.hs | mit | 207 | 0 | 6 | 42 | 44 | 27 | 17 | 4 | 1 |
{-# OPTIONS #-}
-- ----------------------------------------------------------------------------
{- |
Module : Data.StringMap.Types
Copyright : Copyright (C) 2009-2014 Uwe Schmidt
License : MIT
Maintainer : Uwe Schmidt (uwe@fh-wedel.de)
Stability : experimental
Portability: portable
Data types... | alexbiehl/StringMap | Data/StringMap/Types.hs | mit | 616 | 0 | 5 | 115 | 27 | 20 | 7 | 4 | 0 |
module DataFiles (getDataFileName) where
import qualified Paths_ch06_svm as P
getDataFileName :: FilePath -> IO FilePath
getDataFileName = P.getDataFileName
| rcook/mlutil | ch06-svm/src/DataFiles.hs | mit | 159 | 0 | 6 | 20 | 34 | 21 | 13 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/SetPermission.hs | mpl-2.0 | 5,209 | 0 | 12 | 1,134 | 739 | 447 | 292 | 93 | 1 |
module Distribution.Server.Framework.Types where
import Distribution.Server.Framework.BlobStorage (BlobStorage)
import Happstack.Server
import qualified Network.URI as URI
-- | The internal server environment as used by 'HackageFeature's.
--
-- It contains various bits of static information (and handles of
-- server... | isomorphism/hackage2 | Distribution/Server/Framework/Types.hs | bsd-3-clause | 1,383 | 0 | 9 | 272 | 118 | 82 | 36 | 12 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-}
module Numeric.Covector
( Covector(..)
-- * Covectors as linear functionals
, counitM
, unitM
, comultM
, multM
, invM
, coinvM
, antipodeM
, convolveM
) where
import Numeric.Additive.Class
import Numeric.Additive.Group
i... | athanclark/algebra | src/Numeric/Covector.hs | bsd-3-clause | 4,416 | 9 | 13 | 955 | 1,847 | 946 | 901 | 101 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE Scoped... | vincenthz/hs-foundation | basement/Basement/Nat.hs | bsd-3-clause | 4,763 | 2 | 14 | 1,029 | 1,122 | 637 | 485 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module HERMIT.Shell.Dictionary
( mkDictionary
, addToDictionary
, pp_dictionary
) where
import Data.Dynamic
import Data.List
import Data.Map (Map, fromList, toList, fromListWith)
import HERMIT.External
import HERMIT.PrettyPrinter.Common
import qualified HERMIT.Pre... | conal/hermit | src/HERMIT/Shell/Dictionary.hs | bsd-2-clause | 3,304 | 0 | 17 | 835 | 802 | 438 | 364 | 58 | 1 |
{-# LANGUAGE DeriveDataTypeable, PatternGuards #-}
module Type(module Type, Literal(..)) where
import Language.Haskell.Exts(Literal(..))
import Data.Data
import Data.Maybe
import Data.List
import Data.Generics.PlateData
import Control.Arrow
import Control.Monad
import Control.Monad.State
import Control.Monad.Identit... | ndmitchell/tagsoup | test/TagSoup/Generate/Type.hs | bsd-3-clause | 7,423 | 0 | 19 | 2,250 | 3,592 | 1,826 | 1,766 | 193 | 8 |
{-|
Module : Idris.Reflection
Description : Code related to Idris's reflection system. This module contains quoters and unquoters along with some supporting datatypes.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE CPP, PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-un... | kojiromike/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | 56,248 | 0 | 18 | 17,534 | 20,759 | 10,126 | 10,633 | 1,057 | 10 |
module LiftToTopLevel.Signature3 where
{- Lifting baz to the top level should bring in xx and a as parameters,
and update the signature to include these
-}
foo a = (baz xx a)
where
xx :: Int -> Int -> Int
xx p1 p2 = p1 + p2
baz :: ( Int -> Int -> Int) -> Int -> Int
baz xx a = xx 1 a
| RefactoringTools/HaRe | test/testdata/LiftToToplevel/Signature3.expected.hs | bsd-3-clause | 301 | 0 | 8 | 83 | 91 | 48 | 43 | 6 | 1 |
module Prog(prog) where
import Board
import Wins
import Game
import Tree
prog :: String -> String
prog _ =
"OXO\n" ++
concat (map showMove game)
where
game = alternate X max' min' testBoard
testBoard = [[Empty,O,Empty],[Empty,X,Empty],[Empty,Empty,Empty]]
| philderbeast/ghcjs | test/nofib/spectral/minimax/Prog.hs | mit | 267 | 4 | 8 | 47 | 114 | 67 | 47 | 11 | 1 |
{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
-- | This module defines a convenience typeclass for creating
-- normalised programs.
module Futhark.Binder.Class
( Bindable (..)
, mkLet
, mkLet'
, mkLetNames'
, MonadBinder (..)
, mkLetM
, mkLetNamesM'
, bodyStms
, insertStms
, insertStm
, letBind
... | ihc/futhark | src/Futhark/Binder/Class.hs | isc | 4,949 | 0 | 13 | 1,140 | 1,662 | 845 | 817 | 103 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{- Experimental DSL which allows to use relatively friendly syntax
to create financial models operating contracts, amounts, currencies.
Typechecks amounts - amounts in different currencies cannot be added
accidentally.
Defines primitive contracts (european, american, etc.) for co... | vbalalla/financial_contract_language | DSL.hs | mit | 12,422 | 0 | 17 | 3,088 | 3,680 | 1,989 | 1,691 | 169 | 12 |
{-# LANGUAGE TemplateHaskell #-}
-- | Have a look at the <https://github.com/sol/aeson-qq#readme README> for
-- documentation.
module Data.Aeson.QQ (aesonQQ) where
import Prelude ()
import Prelude.Compat
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import qualified Data.Vector as V
import qualified Da... | zalora/aeson-qq | src/Data/Aeson/QQ.hs | mit | 1,559 | 0 | 12 | 315 | 404 | 236 | 168 | 37 | 2 |
module Myopia.TypeCheck where
import Control.Applicative
import Control.Lens
import Control.Monad (unless)
import Control.Monad.RWS (asks)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Either (EitherT (..), left)
im... | miikka/myopia | Myopia/TypeCheck.hs | mit | 2,495 | 0 | 15 | 687 | 914 | 451 | 463 | 54 | 2 |
import Player
import Abalone
import Data.List
type Depth = Int
type Score = Int
type Heuristic = Game -> Score
type AI = Game -> Game
play :: AI -> Maybe Player
play ais = (winner . head) $ dropWhile (not . gameOver) $ iterate ais start
combineAIs :: AI -> AI -> AI
combineAIs white black = \g -> if nextPlayer g == ... | danmane/abalone | unsupported/hs/src/game.hs | mit | 1,242 | 0 | 13 | 266 | 531 | 279 | 252 | 32 | 2 |
module Main where
import Data.List (foldl', concatMap, transpose)
import Data.Maybe (catMaybes)
import Data.Char (toLower, isDigit, isSpace)
data Triangle
= Triangle Int Int Int
deriving Show
parseDigits :: String -> Maybe (String, String)
parseDigits "" = Just ("", "")
parseDigits (c : remainder)
| isDigit... | CarstenKoenig/AdventOfCode2016 | Day3/Main.hs | mit | 2,402 | 0 | 16 | 603 | 960 | 498 | 462 | 75 | 4 |
module Nameless.Data where
data NamelessExp =
NlFunc NamelessExp
| NlCall NamelessExp NamelessExp
| NlVar Int
instance Show NamelessExp where
show (NlFunc e) = "\\. " ++ show e
show (NlCall e1 e2) = "(" ++ show e1 ++ ")(" ++ show e2 ++ ")"
show (NlVar k) = show k
| mcapodici/haskelllearn | firstlang/simple/src/Nameless/Data.hs | mit | 282 | 0 | 10 | 68 | 111 | 56 | 55 | 9 | 0 |
module Main
where
main :: IO ()
main =
undefined
-- putStrLn "foldr" ; print $ foldrAppend 50 100
-- putStrLn "foldl" ; print $ foldlAppend 50 100
-- putStrLn "foldr'" ; print $ foldl'Append 50 100
| futtetennista/IntroductionToFunctionalProgramming | itfp/app/Main.hs | mit | 207 | 0 | 6 | 46 | 22 | 14 | 8 | 4 | 1 |
import Control.Monad (guard)
dozen :: Int
dozen = 12
isMultipleOfFive :: Int -> Bool
isMultipleOfFive n = mod n 5 == 0
-- Input is a tuple, output is a value (uncurried)
average :: (Double, Double) -> Double
average (x, y) = (x + y) / 2.0
-- Input is a value, output is a function (curried)
mean :: Double -> (Double... | rtoal/ple | haskell/definitions.hs | mit | 499 | 0 | 10 | 122 | 192 | 101 | 91 | 14 | 1 |
module Handler.HomeSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
it "loads top page" $ do
get HomeR
statusIs 200
htmlAllContain "h1" "Welcome to Yesod Raml"
it "test mock output" $ do
get UserR
statusIs 200
bodyContains "taro"
| junjihashimoto/yesod-raml | yesod-raml-mock-server/test/Handler/HomeSpec.hs | mit | 310 | 0 | 11 | 102 | 86 | 38 | 48 | 12 | 1 |
module Text.Parsers.IRC where
import Text.ParserCombinators.Parsec
import Data.List (intercalate)
data Command = PRIVMSG |
USER |
NICK |
JOIN |
PART |
TOPIC |
NOTICE |
PING |
PONG |
E... | bigs/7inch | Text/Parsers/IRC.hs | mit | 6,858 | 0 | 22 | 1,740 | 2,344 | 1,102 | 1,242 | 242 | 1 |
module Main where
f :: Int -> Int
f x = x + 1
g x y = x * y
b = \x -> x + 1
(+++) :: Int -> Int -> Int
x +++ y = x + y + x + y
data Foo = A | B
fromFoo :: Foo -> String
fromFoo A = "A"
fromFoo B = "B"
fromFoo' :: Foo -> String
fromFoo' x =
case x of
A -> "A"
B -> "B"
funk :: Int -> Int
funk... | aquatir/remember_java_api | code-sample-haskell/typed_fp_basics_cource/02_function_in_haskell/code.hs | mit | 834 | 0 | 10 | 278 | 458 | 229 | 229 | 40 | 2 |
-- | This module exports the basic ingredients defined in the 'tasty'
-- packages.
--
-- Note that if @defaultIngredients@ from "Test.Tasty" suits your needs,
-- use that instead of importing this module.
module Test.Tasty.Ingredients.Basic
(
-- ** Console test reporter
consoleTestReporter
, Quiet(..)
, H... | SAdams601/ParRegexSearch | test/tasty-0.9.0.1/Test/Tasty/Ingredients/Basic.hs | mit | 603 | 0 | 5 | 105 | 72 | 53 | 19 | 12 | 0 |
{--
- Problem 19
(**) Rotate a list N places to the left.
Hint: Use the predefined functions length and (++).
Examples:
* (rotate '(a b c d e f g h) 3)
(D E F G H A B C)
* (rotate '(a b c d e f g h) ‐2)
(G H A B C D E F)
Examples in Haskell:
*Main> rotate ['a','b','c','d',... | sighingnow/Functional-99-Problems | Haskell/19.hs | mit | 567 | 0 | 11 | 190 | 75 | 38 | 37 | 4 | 2 |
{- CIS 194 HW 11
due Monday, 8 April
-}
module SExpr where
import AParser
import Control.Applicative
import Data.Char
------------------------------------------------------------
-- 1. Parsing repetitions
------------------------------------------------------------
zeroOrMore :: Parser a -> Parser [a]
zeroOrMor... | bachase/cis194 | hw11/SExpr.hs | mit | 1,568 | 0 | 10 | 267 | 305 | 170 | 135 | 22 | 1 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
{-|
Car dataset
UCI ML Repository link <https://archive.ics.uci.edu/ml/datasets/car>
-}
module Numeric.Datasets.Car where
import Numeric.Datasets
import Data.Csv
import GHC.Generics
import Control.Applicative
data RelScore = Low | Med | High | VeryHigh deriving ... | glutamate/datasets | datasets/src/Numeric/Datasets/Car.hs | mit | 1,821 | 0 | 8 | 342 | 536 | 279 | 257 | 47 | 1 |
data Tree a = Empty | Branch a (Tree a) (Tree a)
deriving (Show, Eq)
symmetric Empty = True
symmetric (Branch _ l r) = mirror l r
mirror (Branch _ l1 r1) (Branch _ l2 r2) = mirror l1 l2 && mirror r1 r2
mirror Empty Empty = True
mirror _ _ = False
add :: Ord a => a -> Tree a -> Tree a
add x Empty = Branch x Empty Em... | curiousily/haskell-99problems | 57.hs | mit | 487 | 2 | 10 | 133 | 282 | 138 | 144 | 14 | 3 |
module Quiz(quizLoop, quizCards, quizFromDeck, quizSomeCards) where
import Card
import Tracker
import StatTracker
import Display
import Text.Printf(printf)
import Safe(readMay)
import Data.Time.Clock.POSIX
import Data.Maybe(isJust)
import qualified Input
import Control.Monad(filterM, liftM)
import System.IO(hSetBufferi... | marcusbuffett/Clanki | src/Quiz.hs | mit | 5,276 | 12 | 24 | 1,395 | 1,405 | 712 | 693 | 120 | 3 |
import System.Environment
import System.IO
import Data.Char
import Data.List
import Data.Maybe
-- Definitions
type Value = Char
type Matrix a = [[a]]
data Labyrinth = Labyrinth { matrix :: Matrix Value
, steps :: [(Int,Int)]
} deriving (Show)
empty = ' '
wall =... | MachinesAreUs/codeeval | labyrinth/labyrinth.hs | mit | 2,789 | 2 | 15 | 717 | 1,117 | 599 | 518 | 71 | 2 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLLegendElement
(js_getForm, getForm, js_setAlign, setAlign, js_getAlign, getAlign,
HTMLLegendElement, castToHTMLLegendElement, gTypeHTMLLegendElement)
where
import Prelude ((.), (==), (>>=... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/HTMLLegendElement.hs | mit | 2,286 | 20 | 11 | 303 | 568 | 337 | 231 | 37 | 1 |
{--
Starting in the top left corner of a 2×2 grid, and only being able to move to
the right and down, there are exactly 6 routes to the bottom right corner.
How many such routes are there through a 20×20 grid?
-}
main :: IO ()
main = print $ div (fat 40) ((fat 20)^2)
where fat = (\x -> product [1..x]) | Ladeia/ProjectEuler | Problem015/Haskell/solution_1.hs | mit | 311 | 0 | 10 | 69 | 68 | 36 | 32 | 3 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
module Data.AppConfig where
import Control.Applicative... | yan-ac/bbq.yan.ac | Data/AppConfig.hs | mit | 4,188 | 0 | 22 | 1,028 | 1,208 | 619 | 589 | 110 | 4 |
module BadIntel.Game.MechanismSpec
where
import Control.Monad.State
import Control.Lens hiding (assign)
import Data.Tree.Lens
import Test.Hspec
import BadIntel.TestData
import BadIntel.BadIntel
import BadIntel.Types.Agency
import BadIntel.Types.Agent hiding (describe)
import BadIntel.Game.Mechanism
main = hspec spec... | Raveline/BadIntel | testsuite/BadIntel/Game/MechanismSpec.hs | gpl-2.0 | 2,202 | 0 | 19 | 500 | 535 | 289 | 246 | 42 | 1 |
module Test_Ch_07 (ch_07Suite_Props,ch_07Suite_Units) where
import Test.Tasty
import Test.Tasty.SmallCheck as SC
--import Test.Tasty.QuickCheck as SC
import Test.Tasty.HUnit
import Ch_07
ch_07Suite_Props = testGroup "CH 7 Properties" []
ch_07Suite_Units = testGroup "Ch 7 Units" [eulersUnitTests,taylorsUnitTests,rkU... | Marcus-Rosti/numerical-methods | test/Test_Ch_07.hs | gpl-2.0 | 2,207 | 0 | 19 | 573 | 840 | 457 | 383 | 43 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
--
-- Copyright (C) 2008 JP Bernardy
--
-- | A normalized API to many buffer operations.
-- The idea is that most operations should be parametric in both
-- * the textual units they work on
-- * the direction towards which they operate (if applicable)
module Yi.Buffer.Normal (Te... | codemac/yi-editor | src/Yi/Buffer/Normal.hs | gpl-2.0 | 18,085 | 0 | 15 | 4,531 | 4,033 | 2,106 | 1,927 | 279 | 5 |
{-# LANGUAGE TemplateHaskell #-}
module Jumpie.Player where
import ClassyPrelude
import Jumpie.Types
import Jumpie.PlayerMode
import Wrench.Time
import Control.Lens(makeLenses,(+~),(&))
import Jumpie.MoveableObject
import Jumpie.TileIncrement
import Linear.V2(_x)
data Player = Player {
_playerPosition :: PointRe... | pmiddend/jumpie | lib/Jumpie/Player.hs | gpl-3.0 | 584 | 0 | 9 | 89 | 156 | 91 | 65 | -1 | -1 |
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad
import Data.Monoid
import System.Exit
import XMonad.Util.EZConfig
import... | benfarjan/config | xmonad.hs | gpl-3.0 | 13,513 | 7 | 16 | 3,351 | 2,297 | 1,373 | 924 | 132 | 1 |
{-
Copyright 2012, 2013, 2014, 2015 Colin Woodbury <colingw@gmail.com>
This file is part of Aura.
Aura is free s
oftwar
e:youcanredist
ributeitand/ormodify
itunderthetermsoftheGN
UGeneralPublicLicenseasp
ublishedbytheFreeSoftw
areFoundation,either ver sio n3o ... | joehillen/aura | src/aura.hs | gpl-3.0 | 7,546 | 18 | 13 | 1,925 | 2,039 | 1,071 | 968 | 146 | 40 |
{-
Python5 — a hypothetic language
Copyright (C) 2015 - Yuriy Syrovetskiy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... | cblp/python5 | python5/tests/Types.hs | gpl-3.0 | 1,248 | 0 | 17 | 283 | 166 | 96 | 70 | 13 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Object.Room where
import Data.Aeson.Compat (ToJSON)
import GHC.Generics
import Text.Mustache
import qualified Data.Text as T
import Data.Time.Clock
import Time
data Room = Room
{ rid :: Integer
, rname :: String
, rcreated :: DateTime
, r_uid ::... | Ferdinand-vW/collab | server/src/Object/Room.hs | gpl-3.0 | 625 | 0 | 10 | 149 | 171 | 96 | 75 | 22 | 0 |
module Controller
( runBot
) where
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.Maybe
import Control.Concurrent
import Data.Maybe
import Data.IORef
import Network.HTTP.Client (Manager, newManager)
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Web.Telegram.API.Bot
imp... | thenaesh/SoCFault | src/Controller.hs | gpl-3.0 | 1,808 | 0 | 11 | 376 | 438 | 225 | 213 | 46 | 1 |
module Lecture6
where
import System.Random
import Data.Bits
factorsNaive :: Integer -> [Integer]
factorsNaive n0 = factors' n0 2 where
factors' 1 _ = []
factors' n m
| n `mod` m == 0 = m : factors' (n `div` m) m
| otherwise = factors' n (m+1)
factors :: Integer -> [Integer]
factors n0 = let
... | vdweegen/UvA-Software_Testing | Lab6/Willem/Lecture6.hs | gpl-3.0 | 5,452 | 0 | 17 | 1,494 | 3,086 | 1,609 | 1,477 | 162 | 6 |
import Application.Caffe.LMDB
import Control.Arrow
import Control.Monad as M
import Control.Monad.Trans.Resource
import Data.Array.Repa as R
import Data.Conduit
import Data.Conduit.List as CL
import Da... | XinhuaZhang/PetaVisionHaskell | Application/Caffe/SizeTest.hs | gpl-3.0 | 1,161 | 0 | 13 | 367 | 377 | 204 | 173 | 29 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionBackendServices/Update.hs | mpl-2.0 | 4,885 | 0 | 17 | 1,098 | 549 | 328 | 221 | 88 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs | mpl-2.0 | 3,711 | 0 | 15 | 884 | 484 | 286 | 198 | 74 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Insert.hs | mpl-2.0 | 3,248 | 0 | 15 | 764 | 394 | 237 | 157 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/JobTriggers/Create.hs | mpl-2.0 | 6,668 | 0 | 17 | 1,372 | 795 | 470 | 325 | 120 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/FhirStores/Get.hs | mpl-2.0 | 5,377 | 0 | 15 | 1,123 | 697 | 408 | 289 | 108 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-
Copyright (C) 2015 Felix Schnizlein <felix@schnizle.in>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the Lic... | felixsch/moonbase-ng | src/Moonbase/Panel.hs | lgpl-2.1 | 8,577 | 0 | 20 | 2,273 | 1,460 | 768 | 692 | 131 | 3 |
{- |
Various methods of numerical integration.
Reference: Numerical Analysis (Gautschi 1997)
TODO: non-linear implicit (by fixpoint iteration or Newton's method)
TODO: multistep methods
TODO: multistep implicit methods
TODO: error estimation & step control
-}
module Physics.Integrators
( Integrator
, Simple... | gmaslov/rigbo3 | src/Physics/Integrators.hs | lgpl-3.0 | 4,497 | 0 | 12 | 989 | 644 | 346 | 298 | 42 | 1 |
module Palindromes.A254128 (a254128) where
a254128 :: Int -> Integer
a254128 = (!!) a254128_list
a254128_list :: [Integer]
a254128_list = [0, 0] ++ remainder 2 where
remainder n = 2 * a254128 (n - 1) + delta : remainder (n + 1) where
delta = if even n then 0 else 2^k - a254128 k where
k = n `div` 2 ... | peterokagey/haskellOEIS | src/Palindromes/A254128.hs | apache-2.0 | 324 | 0 | 12 | 81 | 144 | 79 | 65 | 8 | 2 |
--
-- Copyright 2017 Andrew Dawson
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed t... | aopp-pred/fp-truncate | test/Truncate/Test/Truncatable/FromBits.hs | apache-2.0 | 2,663 | 0 | 8 | 606 | 395 | 219 | 176 | 33 | 1 |
{-# LANGUAGE DataKinds, EmptyDataDecls, TypeOperators, UndecidableInstances #-}
module HaskHOL.Lib.Arith.Context
( ArithType
, ArithThry
, ArithCtxt
, ctxtArith
) where
import HaskHOL.Core
import HaskHOL.Deductive hiding (newDefinition, newSpecification)
import HaskHOL.Lib.Pair
import HaskHOL.Lib.... | ecaustin/haskhol-math | src/HaskHOL/Lib/Arith/Context.hs | bsd-2-clause | 3,266 | 1 | 11 | 1,277 | 679 | 433 | 246 | -1 | -1 |
import Prelude (IO)
import Tersus.Cluster (tersusProducction)
main :: IO ()
main = tersusProducction
| kmels/tersus | main.hs | bsd-2-clause | 129 | 0 | 6 | 41 | 34 | 19 | 15 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Api.Properties
( API
, handlers
) where
import Api.Base
import Data.Aeson
im... | jamesdabbs/pi-base-2 | src/Api/Properties.hs | bsd-3-clause | 1,763 | 0 | 20 | 502 | 455 | 235 | 220 | -1 | -1 |
-- CharactersSn.hs
-- Copyright (c) David Amos, 2006
import List (sort)
import MPS.Math.QQ
import MPS.Math.MPoly hiding (s)
import MPS.Math.PolyaCounting (cycleIndexSn)
import MPS.Math.CombinatoricsCounting (factorial)
-- SYMMETRIC POLYNOMIALS
-- elementary symmetric poly in m variables over partition l... | nfjinjing/mps | src/MPS/Math/CharactersSn.hs | bsd-3-clause | 3,564 | 3 | 14 | 1,011 | 1,651 | 843 | 808 | 58 | 3 |
module Database.DSH.Backend.Sql.MultisetAlgebra
( module Database.DSH.Backend.Sql.MultisetAlgebra.Lang
, module Database.DSH.Backend.Sql.MultisetAlgebra.Typing
, module Database.DSH.Backend.Sql.MultisetAlgebra.FlatRecords
, module Database.DSH.Backend.Sql.MultisetAlgebra.Opt
) where
import Database... | ulricha/dsh-sql | src/Database/DSH/Backend/Sql/MultisetAlgebra.hs | bsd-3-clause | 525 | 0 | 5 | 45 | 87 | 68 | 19 | 9 | 0 |
#!/usr/bin/env runhaskell
import Text.Pandoc.JSON
main = toJSONFilter haskell
haskell :: Block -> Block
haskell (CodeBlock (ident, classes, kvps) str)
| "haskell" `notElem` classes = CodeBlock (ident, "haskell":classes, kvps) str
haskell x = x
| liesen/emeralds | haskell.hs | bsd-3-clause | 250 | 0 | 8 | 39 | 88 | 48 | 40 | 6 | 1 |
{-# LANGUAGE TupleSections #-}
module Interpreter (runScript) where
import Control.Monad.Reader
import Data.Map (Map)
import qualified Data.Map as Map
import Debug.Trace
import Text.Parsec
import AbsSyn
import Parser
import ... | Lemmih/fvg | src/Interpreter.hs | bsd-3-clause | 6,138 | 0 | 16 | 1,827 | 2,602 | 1,260 | 1,342 | 160 | 25 |
-- Lab1.hs
{-# OPTIONS_GHC -Wall #-}
module Main where
import System.Environment(getArgs)
import System.IO(hReady, stdin)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import qualified Data.Map as M
import Data.List(sortBy)
import Control.Monad(when)
data WordCount = WordCount { wcString :: T... | ghorn/cs240h-class | Lab1/Lab1.hs | bsd-3-clause | 4,636 | 1 | 19 | 1,233 | 972 | 516 | 456 | 70 | 1 |
{-#LANGUAGE RankNTypes#-}
module Pipes.Text.IO
(
-- * Simple streaming text IO
-- $textio
-- * Caveats
-- $caveats
-- * Producers
fromHandle
, stdin
, readFile
-- * Consumers
, toHandle
, stdout
, writeFile
-- * Re-exports
, MonadSafe(..)
, runSafeT
... | michaelt/text-pipes | Pipes/Text/IO.hs | bsd-3-clause | 5,589 | 0 | 17 | 1,314 | 601 | 332 | 269 | 53 | 3 |
-- | Data information container declare the location of media information of a
-- 'Track' the actual location are stored in 'DataReference's.
module Data.ByteString.IsoBaseFileFormat.Boxes.DataInformation where
import Data.ByteString.IsoBaseFileFormat.Box
-- | Data information box phantom type.
data DataInformation
... | sheyll/isobmff-builder | src/Data/ByteString/IsoBaseFileFormat/Boxes/DataInformation.hs | bsd-3-clause | 594 | 0 | 8 | 79 | 85 | 50 | 35 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Types ( GhcSource(..)
, Options(..)
, MyState(..)
, DirStructure(..)
, MyException(..)
, Verbosity(..)
) where
import Control.Monad.Error (Error)
data GhcSource = System -- Use Sy... | Paczesiowa/virthualenv | src/Types.hs | bsd-3-clause | 2,110 | 0 | 8 | 858 | 237 | 159 | 78 | 30 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Horbits.OrbitEq
((&&&),
(|||),
AbsoluteApproxi... | chwthewke/horbits | testsuite/Horbits/OrbitEq.hs | bsd-3-clause | 2,990 | 0 | 10 | 892 | 933 | 506 | 427 | 56 | 1 |
module PPUtil where
--
-- Some additional pretty-print functions
-- for pretty-printing abstract syntax trees.
--
import Data.List
import qualified Data.Map as Map
import Pretty
import Options
ppListSep :: (PP s, PP c, PP o, PP a) => o -> c -> s -> [a] -> PP_Doc
ppListSep o c s pps = o >|< hlist (intersperse (pp s) ... | norm2782/uuagc | src/PPUtil.hs | bsd-3-clause | 1,807 | 0 | 18 | 429 | 870 | 454 | 416 | 39 | 3 |
module Test.Util where
import Control.Exception ( finally )
import Database.Redis
import Test.HUnit
-- ---------------------------------------------------------------------------
-- Utilities
--
-- | Prints the given string with pretty bars above and below it.
putFancyStr :: String -> IO ()
putFancyStr str = putSt... | brandur/redis-haskell | testsuite/tests/Test/Util.hs | bsd-3-clause | 1,242 | 0 | 12 | 281 | 291 | 147 | 144 | 17 | 1 |
-- | Description: Normal order evaluation Krivine machine.
module Rossum.Krivine.Normal where
import Data.Maybe
import Rossum.Krivine.Term
import qualified Rossum.LC as LC
type Configuration = (Env, Term, [Closure])
nf :: Configuration -> Bool
nf c = case c of
(_, Abs _, []) -> True
... | thsutton/rossum | src/Rossum/Krivine/Normal.hs | bsd-3-clause | 1,080 | 0 | 13 | 280 | 462 | 253 | 209 | 25 | 5 |
{-# LANGUAGE FlexibleContexts #-}
-- | This module re-exports SLogic.Smt and provides specialised commands for invoking the solver.
module Tct.Common.SMT
(
module SMT
, smtSolveTctM
, minismt, minismt'
, yices, yices'
, z3, z3'
, minismtArgs, yicesArgs, z3Args
-- encoding
, encodePoly
) where
impo... | ComputationWithBoundedResources/tct-common | src/Tct/Common/SMT.hs | bsd-3-clause | 3,989 | 0 | 15 | 1,007 | 1,236 | 666 | 570 | 78 | 5 |
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
-- | This module re-exports the @Github.Data.Definitions@ module, adding
-- instances of @FromJSON@ to it. If you wish to use the data without the
-- instances, use the @Github.Data.Definitions@ module instead.
module Github.Data (module Github.Data.Definitions) ... | mavenraven/github | Github/Data.hs | bsd-3-clause | 17,579 | 7 | 59 | 6,672 | 4,790 | 2,399 | 2,391 | 491 | 2 |
module Lasca.Compiler where
import Lasca.Namer
import Lasca.Desugar
import Lasca.Codegen
import Lasca.EmitCommon
import Lasca.Emit
import qualified Lasca.EmitStatic as EmitStatic
import qualified Lasca.EmitDynamic as EmitDynamic
import Lasca.JIT
import Lasca.Infer
import Lasca.Type
import Lasca.Syntax
import Lasca.Opt... | nau/lasca-compiler | src/lib/Lasca/Compiler.hs | bsd-3-clause | 7,047 | 0 | 17 | 1,640 | 1,952 | 961 | 991 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE OverloadedLabels #-}
module PostsAPI where
import Prelude hiding (show, index)
import Database.PostgreSQL.Simple as PGS
import Database
import Data.Aeson
import Data.Text hiding (index)
import Data.Time.Clock (U... | xldenis/xavio | src/PostsAPI.hs | bsd-3-clause | 2,468 | 0 | 17 | 511 | 703 | 377 | 326 | 60 | 2 |
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo
import Distribution.InstalledPackageInfo
import Distribution.Simple.Program
import qualified Distribution.Simple.PackageIndex as Pkg
import System.Exit
import System.IO
import Da... | beni55/ghc-paths | Setup.hs | bsd-3-clause | 3,050 | 0 | 15 | 1,112 | 747 | 378 | 369 | 66 | 6 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NondecreasingIndentation #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS -f... | nushio3/ghc | ghc/GHCi/UI.hs | bsd-3-clause | 141,447 | 1 | 104 | 40,398 | 34,643 | 17,264 | 17,379 | -1 | -1 |
-- | 'Formula' operations with newtype 'Var's instead of 'String's.
module Test.Var
( Var(..)
, names
, prenex
, skolemize
)
where
import qualified Logic
import Data.Stream
import Logic (Formula)
-- | Variable names.
newtype Var
= V String
deriving (Eq, Ord, Show)
-- | Unique variable na... | vituscze/logic | tests/Test/Var.hs | bsd-3-clause | 664 | 0 | 9 | 142 | 170 | 94 | 76 | 17 | 1 |
module Yawn.Util.List (
split,
concatWith,
endsWith,
find
) where
import Data.Maybe (fromMaybe)
import Data.List (isSuffixOf)
split :: (a -> Bool) -> [a] -> [[a]]
split _ [] = []
split f xs = let (y, ys) = break f xs in y : split f (dropWhile f ys)
concatWith :: Show a => String -> [a] -> String
concatWith... | ameingast/yawn | src/Yawn/Util/List.hs | bsd-3-clause | 544 | 0 | 10 | 131 | 299 | 159 | 140 | 16 | 1 |
{-| This names exported by this module are closely modeled on those in @Prelude@ and @Data.List@,
but also on
<http://hackage.haskell.org/package/pipes-4.1.9/docs/Pipes-Prelude.html Pipes.Prelude>,
<http://hackage.haskell.org/package/pipes-group-1.0.3/docs/Pipes-Group.html Pipes.Group>
and <http://hacka... | m0ar/safe-streaming | src/Streaming/Prelude.hs | bsd-3-clause | 80,380 | 0 | 25 | 20,597 | 14,742 | 7,790 | 6,952 | 723 | 6 |
-- {-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE OverloadedStrings, BangPatterns, FlexibleInstances,
ScopedTypeVariables, PatternGuards #-}
{-|
Very fast TagSoup parser.
Works only with strict bytestrings.
Correctly handles HTML @\<script\>@ and @\<style\>@ tags.
This module is intended to be used in co... | silkapp/fast-tagsoup | Text/HTML/TagSoup/Fast/Utf8Only.hs | bsd-3-clause | 17,699 | 0 | 24 | 6,821 | 6,737 | 3,294 | 3,443 | 304 | 26 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : prov... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/PixelRectangles.hs | bsd-3-clause | 43,982 | 0 | 17 | 7,696 | 9,077 | 5,002 | 4,075 | 593 | 30 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Core31.Tokens
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- ... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | 40,351 | 0 | 4 | 4,858 | 6,863 | 4,127 | 2,736 | 1,369 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.