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 OverloadedLists #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
-- | This module defines the 'Frame' data type, as well as functions for using
-- it easily. The 'F' monad is a reader for a 'Frame' and can be consumed by
-- 'runFrame'.
module Frame where
import Control.Monad.IO.Class
import ... | expipiplus1/vulkan | examples/resize/Frame.hs | bsd-3-clause | 6,655 | 0 | 22 | 2,368 | 1,152 | 635 | 517 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
module Api
( app
, generateJavaScript
) where
import Control.Monad.Except
import Control.Monad.Reader (ReaderT, runReaderT)
import Control.Monad.Reader.Class
i... | Fisbang/fisbang-api | src/Api.hs | bsd-3-clause | 3,061 | 0 | 10 | 725 | 434 | 257 | 177 | 41 | 1 |
module Lang.LF.Internal.Hyps where
import Data.Set (Set)
import qualified Data.Set as Set
import Lang.LF.Internal.Model
-- | A sequence of hypotheses, giving types to the free variables in Ξ³.
data LFHyps (f :: Ctx * -> SORT -> *) (Ξ³ :: Ctx *) where
HNil :: LFHyps f E
HCons :: !(LFHyps f Ξ³) -> !Quant -> !Stri... | robdockins/canonical-lf | src/Lang/LF/Internal/Hyps.hs | bsd-3-clause | 1,762 | 0 | 12 | 550 | 560 | 285 | 275 | -1 | -1 |
n = 200
result = [ (a,b,c) | c <- [1..n], b <- [1..c], a <- [1..b], a^2 + b^2 == c^2]
main = print (result)
| kite-lang/kite | benchmarking/pythagoras.hs | mit | 109 | 0 | 11 | 27 | 97 | 53 | 44 | 3 | 1 |
-- https://www.codewars.com/kata/escape-the-mines-or-die
module EscapeTheMinesOrDie where
import Control.Arrow (first, second)
import Data.Function (on)
import Data.List (minimumBy)
import Data.Maybe (catMaybes)
import Data.Set (Set, empty, insert, member)
type XY = (Int, Int)
data Move = U | D | L | R
deriving (... | airtial/Codegames | codewars/escape-the-mines-or-die.hs | gpl-2.0 | 1,213 | 0 | 10 | 282 | 646 | 343 | 303 | 32 | 1 |
{-# LANGUAGE CPP #-}
{- |
Module : ./CASL/CompositionTable/ModelChecker.hs
Description : checks validity of models regarding a composition table
Copyright : (c) Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : no... | spechub/Hets | CASL/CompositionTable/ModelChecker.hs | gpl-2.0 | 8,008 | 129 | 20 | 2,104 | 2,685 | 1,422 | 1,263 | 181 | 15 |
{-# LANGUAGE PackageImports #-}
import "Carnap-Server" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| gleachkr/Carnap | Carnap-Server/app/devel.hs | gpl-3.0 | 131 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
type A a = a a
| roberth/uu-helium | test/kinderrors/KindError6.hs | gpl-3.0 | 15 | 0 | 5 | 6 | 11 | 6 | 5 | 1 | 0 |
{-|
Module : ParseSndOrderRule
Description : Imports 2-rules from .ggx to verigraph
Stability : experimental
AGG implements first-order rules in the SPO approach, to model 2-rules
(second-order rules in the DPO approach) a translation is needed.
AGG model: a rule is two graphs and a partial mapping between the... | rodrigo-machado/verigraph | src/library/XML/ParseSndOrderRule.hs | gpl-3.0 | 7,447 | 0 | 14 | 1,817 | 1,671 | 940 | 731 | 98 | 3 |
-- pick.hs -- picks the n-th value in a LeanCheck enumeration
--
-- Copyright (c) 2020 Rudy Matela.
-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
import Test.LeanCheck
import Test.LeanCheck.Utils
import Test.LeanCheck.Function ()
import System.Environment
u :: a
u = undefined
usage :: IO ()... | rudymatela/llcheck | bench/pick.hs | bsd-3-clause | 3,233 | 0 | 12 | 1,482 | 1,175 | 644 | 531 | 62 | 37 |
{-# LANGUAGE FlexibleContexts #-}
import Test.Hspec
import Control.Monad.Except.Union
data MyError = MyError deriving (Show)
data Another = Another deriving (Show)
data Yet = Yet deriving (Show)
raising :: (Raises MyError s m) => m ()
raising = raise MyError
again :: (Raises MyError s m, Raises Another s m... | rimmington/redolent-except | test/Spec.hs | bsd-3-clause | 1,030 | 0 | 10 | 199 | 379 | 200 | 179 | 27 | 1 |
{-# LANGUAGE CPP, DeriveDataTypeable, IncoherentInstances #-}
{- | an 'Interval' is a pair of 'lower' and 'upper',
representing some interval in ordered system.
The lower bound is inclusive and the upper bound is exclusive:
('lower' <= x < 'upper') .
The intersection of two intervals are also interval
... | nushio3/Paraiso | Language/Paraiso/Interval.hs | bsd-3-clause | 1,076 | 0 | 10 | 272 | 233 | 131 | 102 | 19 | 0 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 706
{-# LANGUAGE RecursiveDo #-}
#else
{-# LANGUAGE DoRec, RecursiveDo #-}
#e... | TomMD/cryptol | src/Cryptol/TypeCheck/Kind.hs | bsd-3-clause | 11,204 | 3 | 24 | 4,027 | 3,194 | 1,581 | 1,613 | 214 | 16 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Parallel
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experimental
-- Porta... | alekar/hugs | packages/base/Control/Parallel.hs | bsd-3-clause | 2,925 | 4 | 11 | 660 | 831 | 464 | 367 | 5 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[Specialise]{Stamping out overloading, and (optionally) polymorphism}
-}
{-# LANGUAGE CPP #-}
module Specialise ( specProgram, specUnfolding ) where
#include "HsVersions.h"
import Id
import TcType hiding( substTy )
import Type hiding( substTy, e... | olsner/ghc | compiler/specialise/Specialise.hs | bsd-3-clause | 96,464 | 1 | 22 | 27,877 | 11,162 | 6,058 | 5,104 | -1 | -1 |
-- | This module facilitates the use of vectors by providing various functionalities of vector calculus
module Vector (
-- * types
Vector,
-- * functions
dot,
sub,
add,
app,
size,
i,
j,
k,
cross,
norm,
unity
)where
type Vector = [Double] -- ^ List of Double elements
-... | ankeshs/numerikell | tmp/Vector.hs | bsd-3-clause | 1,631 | 0 | 10 | 451 | 734 | 410 | 324 | 45 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[Demand]{@Demand@: A decoupled implementation of a demand domain}
-}
{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances, RecordWildCards #-}
module Eta.BasicTypes.Demand (
StrDmd, UseDmd(..), Count,... | rahulmutt/ghcvm | compiler/Eta/BasicTypes/Demand.hs | bsd-3-clause | 80,826 | 5 | 19 | 22,522 | 14,301 | 7,492 | 6,809 | 946 | 9 |
{-# LANGUAGE CPP #-}
#ifdef __GHCJS__
{-# LANGUAGE JavaScriptFFI #-}
#else
{-# LANGUAGE RankNTypes, TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
#endif
module React.Imports
( RawEvent
, ImportedClass
-- * Foreign imports
, js_render
, js_createClass
... | seanhess/react-haskell | src/React/Imports.hs | mit | 2,645 | 25 | 10 | 425 | 310 | 171 | 139 | -1 | -1 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- 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 License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | rpc-proxy/Msg/Json.hs | gpl-2.0 | 13,227 | 11 | 54 | 3,618 | 4,135 | 2,083 | 2,052 | 287 | 6 |
module DotRender(
writeDotRun
) where
import Data.List
import Data.Maybe
import Dot
import Resolver.Log
import Resolver.PrettyPrint
import Resolver.Types
import System.IO
import Text.Printf
import Types
import qualified Data.Set as Set
inBounds :: Params -> Integer -> Bool
inBounds p... | dankamongmen/raptitude | tools/resolver-visualize/DotRender.hs | gpl-2.0 | 11,197 | 0 | 21 | 4,352 | 2,778 | 1,427 | 1,351 | 179 | 3 |
-- | The API for dealing with git blobs from Github repos, as described in
-- <http://developer.github.com/v3/git/blobs/>.
module Github.GitData.Blobs (
blob
,module Github.Data
) where
import Github.Data
import Github.Private
-- | Get a blob by SHA1.
--
-- > blob "thoughtbot" "paperclip" "bc5c51d1ece1ee45f94b056a0f... | fernandocastor/github | Github/GitData/Blobs.hs | bsd-3-clause | 481 | 0 | 10 | 72 | 94 | 56 | 38 | 8 | 1 |
{- |
Description : Test file for Parse_AS_DFOL
-}
import DFOL.AS_DFOL
import DFOL.Parse_AS_DFOL
import Text.ParserCombinators.Parsec
import Common.AnnoState
import Common.Doc
import Common.DocUtils
matrices :: String
matrices = "Nat :: Sort " ++
"Mat :: Nat -> Nat -> Sort " ++
"plus :: Pi m, ... | mariefarrell/Hets | DFOL/Tests/Test_Parse_AS_DFOL.hs | gpl-2.0 | 1,088 | 1 | 10 | 280 | 172 | 83 | 89 | 18 | 1 |
import qualified Data.Vector as U
import Data.Bits
main = print . U.elem 100 . U.map (`shiftL` 1) . U.enumFromTo 1 $ (10000 :: Int)
| dolio/vector | old-testsuite/microsuite/elem.hs | bsd-3-clause | 133 | 2 | 9 | 25 | 66 | 35 | 31 | 3 | 1 |
{-# LANGUAGE AllowAmbiguousTypes, TypeFamilies #-}
module ContextStack2 where
type family TF a :: *
type instance TF (a,b) = (TF a, TF b)
t :: (a ~ TF (a,Int)) => Int
t = undefined
{- a ~ TF (a,Int)
~ (TF a, TF Int)
~ (TF (TF (a,Int)), TF Int)
~ (TF (TF a, TF Int), TF Int)
~ ((TF (TF a), TF (T... | snoyberg/ghc | testsuite/tests/typecheck/should_fail/ContextStack2.hs | bsd-3-clause | 934 | 0 | 9 | 349 | 73 | 44 | 29 | 6 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Distribution.Solver.Types.SourcePackage
( PackageDescriptionOverride
, SourcePackage(..)
) where
import Distribution.Package
( PackageId, Package(..) )
import Distribution.PackageDescription
( GenericPackageDescript... | themoritz/cabal | cabal-install/Distribution/Solver/Types/SourcePackage.hs | bsd-3-clause | 1,102 | 0 | 8 | 190 | 201 | 124 | 77 | 22 | 0 |
module Record3 where
data C = F {f1, f2 :: Int, f3 :: Bool }
g = f1 (F 1 2 True) | kmate/HaRe | old/testing/addField/Record3_TokOut.hs | bsd-3-clause | 85 | 0 | 8 | 26 | 45 | 27 | 18 | 3 | 1 |
{-# LANGUAGE TypeFamilies #-}
module ShouldCompile where
class C8 a where
data S8 a :: * -> *
instance C8 Int where
data S8 Int a = S8Int a
| urbanslug/ghc | testsuite/tests/indexed-types/should_compile/Simple4.hs | bsd-3-clause | 147 | 0 | 7 | 36 | 48 | 26 | 22 | 6 | 0 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
-- Test for parallel list comp, which should work for monad comp as well:
--
-- On GHC 6.0 and earlier, this parallel list comprehension generated
-- an incorrect unused-binding warning.
module ShouldCompile where
t :: [(Char,Char)]
t = ... | urbanslug/ghc | testsuite/tests/rename/should_compile/mc12.hs | bsd-3-clause | 356 | 1 | 7 | 61 | 54 | 35 | 19 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Meinesweeper.Field where
import Control.Lens
data Field = Field { _mined :: Bool
, _flagged :: Bool
, _covered :: Bool
, _adjacentMines :: Int
, _xy :: (Int,Int)
}
instance Show Field... | IanConnolly/Meinesweeper | src/Meinesweeper/Field.hs | mit | 711 | 0 | 11 | 309 | 192 | 106 | 86 | 21 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Main where
-- import Data.Tape2D
-- import Experiments.Juicy
import Codec.Picture
import Control.Applicative
import Control.Comonad as C
import Control.Comonad.Store
import Data.Array.Repa as R
import Data.Array.Repa.Repr.Unboxed
import Data.Functor
i... | mstksg/cm-dip | src/Main.hs | mit | 2,295 | 0 | 13 | 479 | 576 | 303 | 273 | 35 | 1 |
module Main where
import ReferenceDatabase
import Text.EditDistance
import Text.CSL
import Text.CSL.Input.Identifier.Internal as Internal
import Text.CSL.Input.Identifier
import Text.CSL.Reference
import qualified Data.Map.Strict as Map
import Control.Monad.Trans.Either
import Control.Monad.State as State
import Data.... | AdamHarries/yggdrasil | spare/old/Main.hs | mit | 3,127 | 6 | 13 | 649 | 566 | 311 | 255 | 53 | 3 |
module Test.Hspec.Expectations.Pretty.MatcherSpec (main, spec) where
import Test.Hspec
import Test.Hspec.Expectations.Pretty.Matcher
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "matchList" $ do
it "succeeds if arguments are empty lists" $ do
matchList [] ([] :: [I... | myfreeweb/hspec-expectations-pretty-diff | test/Test/Hspec/Expectations/Pretty/MatcherSpec.hs | mit | 1,241 | 0 | 19 | 393 | 308 | 176 | 132 | 25 | 1 |
module THInstanceReification.Prelude.TH
(
module Exports,
purify,
tryToReify,
)
where
import THInstanceReification.Prelude.Basic
import Language.Haskell.TH as Exports
import Language.Haskell.TH.ExpandSyns as Exports
purify :: Q a -> a
purify = unsafePerformIO . runQ
tryToReify :: Name -> Q (Maybe Info)
tryTo... | nikita-volkov/th-instance-reification | src/THInstanceReification/Prelude/TH.hs | mit | 378 | 0 | 8 | 60 | 114 | 66 | 48 | 12 | 1 |
{-# LANGUAGE ExplicitForAll #-}
module Day1 where
import Data.List.Extra (groupOn)
readSingleLine :: FilePath -> IO String
readSingleLine fp = head . lines <$> readFile fp
getInputs :: IO [Int]
getInputs = map (read . (:[])) <$> readSingleLine "../input/01.txt"
-----------------------------------------------------... | wizzup/advent_of_code | 2017/haskell/Day_01.hs | mit | 1,897 | 0 | 13 | 447 | 574 | 311 | 263 | 30 | 2 |
import Test.QuickCheck
import Game.Spacegoo
map3 :: (a->b) -> (a,a,a) -> (b,b,b)
map3 f (a,b,c) = (f a, f b, f c)
nemesisWins :: Units -> Property
nemesisWins u = (map3 (max 0) u == u) ==> winsAgainst u (nemesisOf u) == False
minimizeUnitsWins :: Units -> Units -> Property
minimizeUnitsWins a d = winsAgainst a' d' =... | nomeata/haskell-spacegoo | test.hs | mit | 527 | 0 | 11 | 138 | 267 | 138 | 129 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Myracloud.DNS where
import Control.Applicative ((<$>))
import Control.Monad.Trans.Either
import qualified Data.Aeson as A
import qualified D... | zalora/myrapi | src/Myracloud/DNS.hs | mit | 7,527 | 0 | 19 | 2,216 | 2,136 | 1,090 | 1,046 | 169 | 3 |
{-# LANGUAGE DeriveGeneric #-}
module RevReport where
import Data.Functor
import qualified Data.Map as M
import qualified Data.ByteString.Lazy as BS
import Data.Aeson
import Development.Shake.Command
import Text.Read
import ReportTypes
import ReadResult
import qualified BenchmarkSettings as S
git args = cmd (words ... | nomeata/gipeda | src/RevReport.hs | mit | 1,638 | 5 | 17 | 356 | 565 | 291 | 274 | 40 | 4 |
data Matrix a = Matrix { width :: Int, height :: Int, data :: [a] } deriving (Show, Eq)
| 5outh/Haskell-Graphics-Projects | cellular.hs | mit | 89 | 0 | 9 | 20 | 43 | 26 | 17 | -1 | -1 |
-- @ mapR :: _ -> i:[a] -> {o:[b] | (len i) = (len o)} @-}
--needed when synth isnt using prelude (for speed of testing)
myId :: a -> a
myId = id
map2 :: (a->b)->[a]->[b]
map2 f []=[]
map2 f (x:xs)=
f x:f x:map2 f xs
mapR :: (a->b)->[a]->[b]
mapR f []=[]
mapR f (x:xs)= mapR f xs ++ [f x]
f :: a -> [a]
f x = [x,... | santolucito/ives | tests/stutter.hs | mit | 404 | 2 | 9 | 97 | 286 | 148 | 138 | 13 | 1 |
module Magento.Locale (
addLocale
) where
import Control.Monad (when)
import System.Directory (createDirectoryIfMissing, doesFileExist)
import System.FilePath.Posix (joinPath, takeDirectory)
import Template.Locale (localeXml)
import Magento.Module.Path (localeBasePath)
import Magento.Module (
ModuleInfo,
g... | prasmussen/magmod | Magento/Locale.hs | mit | 1,781 | 0 | 11 | 323 | 498 | 258 | 240 | 50 | 1 |
{-# LANGUAGE GADTs #-}
module Handler.Equipment
( equipment
) where
import Handler.Helpers
import Model
import View.Equipment
equipment :: App Response
equipment = routeResource $ defaultActions {
resActionList = equipmentList
, resActionNew = equipmentNew
, resActionEdit = equipmentEdit
, resActionCrea... | flipstone/glados | src/Handler/Equipment.hs | mit | 1,798 | 0 | 16 | 291 | 509 | 258 | 251 | 44 | 1 |
{-# LANGUAGE StaticPointers, GADTs #-}
module Data.Box ( Box
, intoBox
, closeBox
, outBox ) where
import GHC.StaticPtr
import Data.ByteString
import Data.Binary
data Box a where
Pure :: StaticPtr a -> Box a
Close :: Box (a -> b) -> Box a -> Box b
intoBox :: StaticP... | jozefg/modal | src/Data/Box.hs | mit | 508 | 0 | 9 | 148 | 195 | 102 | 93 | 18 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-
Generator for a JavaScript implementation of the Skein block function.
Based on the public domain C implementation by Doug Whiting.
Code size is ~1.7kB zipped after minification when fully unrolled
performance ~ 50MB/s on v8 and SpiderMonkey
author: Luite Stegeman - 2014
-}
... | ghcjs/ghcjs | lib/boot/shims/utils/threefish/Main.hs | mit | 14,786 | 2 | 17 | 4,712 | 3,868 | 2,060 | 1,808 | 224 | 2 |
module Common.GtkGoal where
import Data.List (isInfixOf)
import Data.Char (toLower)
import Interfaces.GenericATPState
import Logic.Prover
import Static.GTheory
-- * Datatypes and functions for prover
data Goal = Goal
{ gStatus :: GStatus
, gName :: String }
deriving (Eq, Ord)
toGtkGoal :: (String, Maybe Ba... | nevrenato/Hets_Fork | Common/GtkGoal.hs | gpl-2.0 | 3,146 | 0 | 12 | 828 | 778 | 403 | 375 | 84 | 8 |
module Main where
import Text.ParserCombinators.Parsec
import qualified Text.ParserCombinators.Parsec.Token as P
import Text.ParserCombinators.Parsec.Language (javaStyle)
import Data.Time.Calendar
import Data.Char (isSpace)
import System.IO
-- Put your favorite file name here
fname = "fxt.ledger"
main = do res <... | mgax/beancount | lib/haskell/LedgerParser.hs | gpl-2.0 | 5,110 | 0 | 14 | 1,912 | 1,279 | 607 | 672 | 144 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Main
Parses command-line options and starts torrent client
-}
module Main where
import Prelude hiding (log, length, readFile, writeFile)
import Data.ByteString.Char8 (readFile, writeFile, unpack)
import System.Environment (getArgs)
import System.Directory ... | dfordivam/functorrent | src/Main.hs | gpl-3.0 | 3,340 | 0 | 20 | 707 | 1,076 | 543 | 533 | 81 | 4 |
module Handler.Library where
import Import
import Util.Widgets (getSortValue, sortListByOption, sortWidget)
-- | A 'LibraryItem' 'Entity' & 'Book' packed into a Tuple.
type LibraryItemAndBook = (Entity LibraryItem, Book)
-- | Display all LibraryItems.
getLibraryR :: Handler Html
getLibraryR = d... | prikhi/MyBookList | Handler/Library.hs | gpl-3.0 | 1,953 | 0 | 12 | 474 | 459 | 250 | 209 | 33 | 2 |
module Nirum.Package.ModuleSet ( ImportError ( CircularImportError
, MissingImportError
, MissingModulePathError
)
, ModuleSet
... | dahlia/nirum | src/Nirum/Package/ModuleSet.hs | gpl-3.0 | 4,745 | 0 | 20 | 1,836 | 1,150 | 618 | 532 | 96 | 5 |
{-
CC_Clones - Classic games reimplemented
Β© Callum Lowcay 2006-2013
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) any later version.
This prog... | CLowcay/CC_Clones | src/spaceships.hs | gpl-3.0 | 3,113 | 22 | 14 | 511 | 854 | 441 | 413 | 76 | 3 |
{-# LANGUAGE DeriveGeneric #-}
module Phascal.Arm where
import Control.Monad (liftM, liftM2, join)
import Data.Bits
import Data.Word
import Prelude hiding (lookup)
import Data.List (intersperse)
import Data.Maybe (fromJust)
import GHC.Generics
import Control.DeepSeq
import Phascal.Ast
import Phascal.SymbolTable
dat... | zenhack/phascal | src/Phascal/Arm.hs | gpl-3.0 | 6,204 | 0 | 12 | 1,793 | 1,941 | 1,023 | 918 | 126 | 2 |
{-# LANGUAGE NoImplicitPrelude, GeneralizedNewtypeDeriving #-}
module Data.Store.Guid
(Guid, make, bs, length, new, combine, augment, fromString, asHex) where
import Prelude.Compat hiding (length)
import Control.DeepSeq (NFData(..))
import Control.Lens ((%~), _1)
import Con... | rvion/lamdu | bottlelib/Data/Store/Guid.hs | gpl-3.0 | 2,708 | 0 | 13 | 702 | 885 | 488 | 397 | -1 | -1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
module VirMat.IO.Import.CommandLine
( getJob
) where
import Options.Applicative
import VirMat.IO.Import.Types
import VirMat.Core.Sampling
parseJob :: Parser JobRequest
parseJob = VoronoiJob
<$> parseDimension
<*> parseStructureSize
... | lostbean/VirMat | src/VirMat/IO/Import/CommandLine.hs | gpl-3.0 | 3,923 | 0 | 14 | 1,143 | 1,050 | 516 | 534 | 102 | 1 |
module OpenSandbox.Data.YggdrasilSpec (main,spec) where
import OpenSandbox.Data.Yggdrasil
import Test.Hspec
import Test.QuickCheck
spec :: Spec
spec = return ()
main :: IO ()
main = hspec spec
| oldmanmike/opensandbox | test/OpenSandbox/Data/YggdrasilSpec.hs | gpl-3.0 | 197 | 0 | 6 | 29 | 64 | 37 | 27 | 8 | 1 |
{-# LANGUAGE TypeSynonymInstances , OverlappingInstances #-}
module Database.Design.Ampersand.ADL1.Expression (
subst
,foldlMapExpression,foldrMapExpression
,primitives,isMp1, isEEps
,isPos,isNeg, deMorganERad, deMorganECps, deMorg... | DanielSchiavini/ampersand | src/Database/Design/Ampersand/ADL1/Expression.hs | gpl-3.0 | 9,240 | 0 | 13 | 2,455 | 3,717 | 1,918 | 1,799 | 156 | 21 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid 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 Lice... | karamellpelle/grid | source/Game/LevelPuzzle/Output/Plain/ShadeDot.hs | gpl-3.0 | 2,568 | 0 | 12 | 532 | 507 | 262 | 245 | 47 | 1 |
module ContextTest where
| juanbono/tapl-haskell | untyped/test/ContextTest.hs | gpl-3.0 | 25 | 0 | 2 | 3 | 4 | 3 | 1 | 1 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- Module : Network.AWS.Waiters
-- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- ... | romanb/amazonka | core/src/Network/AWS/Waiters.hs | mpl-2.0 | 2,803 | 0 | 12 | 884 | 747 | 395 | 352 | 72 | 3 |
{-# 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-storagegateway/gen/Network/AWS/StorageGateway/DescribeGatewayInformation.hs | mpl-2.0 | 8,353 | 0 | 19 | 1,705 | 1,170 | 693 | 477 | 134 | 1 |
{- ORMOLU_DISABLE -}
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Copyright 2014-2019, Julia Longtin (julial@turinglace.com)
-- Released under the GNU AGPLV3+, see LICENSE
-- Use existing instances for the wrapped types rather than manually manking them
{-# LANGUAGE GeneralizedNewtypeDeriv... | colah/ImplicitCAD | Graphics/Implicit/FastIntUtil.hs | agpl-3.0 | 1,002 | 10 | 10 | 170 | 212 | 124 | 88 | 17 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Network.TelegramBot.Types where
import Control.Applicative
import Control.Lens
import Control.Monad
impor... | bb010g/telegram-bot | src/Network/TelegramBot/Types.hs | agpl-3.0 | 8,370 | 0 | 10 | 1,710 | 2,346 | 1,261 | 1,085 | 231 | 1 |
module Network.Haskoin.Script.Units (tests) where
import Test.HUnit (Assertion, assertBool)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Data.Maybe (fromJust)
import Network.Haskoin.Script
import Network.Haskoin.Crypto
import Network.Haskoin.Util
tests :: [Test]
te... | nuttycom/haskoin | tests/Network/Haskoin/Script/Units.hs | unlicense | 6,250 | 0 | 12 | 734 | 831 | 465 | 366 | 84 | 1 |
{-
ΠΠΎΠ΄ΡΠ»Ρ ΠΊΠΎΠΏΠΈΡΠΎΠ²ΡΠΈΠΊΠΎΠ².
https://github.com/denisshevchenko/ruhaskell
ΠΡΠ΅ ΠΏΡΠ°Π²Π° ΠΏΡΠΈΠ½Π°Π΄Π»Π΅ΠΆΠ°Ρ ΡΡΡΡΠΊΠΎΡΠ·ΡΡΠ½ΠΎΠΌΡ ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²Ρ Haskell-ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ², 2015 Π³.
-}
{-# LANGUAGE OverloadedStrings #-}
module Copiers (
justCopy,
justCreateAndCopy,
justCompressAndCopy
) where
import Hakyll
-- ΠΠ΅ΡΡΠΌ Π½Π΅ΡΡΠΎ Π³ΠΎΡ... | akamch/ruhaskell-old | src/Copiers.hs | unlicense | 1,113 | 0 | 8 | 169 | 149 | 73 | 76 | 18 | 1 |
-----------------------------------------------------------------------------
-- Copyright 2012 Microsoft Corporation.
--
-- This is free software; you can redistribute it and/or modify it under the
-- terms of the Apache License, Version 2.0. A copy of the License can be
-- found in the file "license.txt" at the root ... | lpeterse/koka | src/Type/InferMonad.hs | apache-2.0 | 58,903 | 0 | 29 | 20,915 | 16,436 | 8,301 | 8,135 | 1,023 | 16 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.com>
- 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... | shockkolate/lambdircd | src/IRCD/Env.hs | apache-2.0 | 1,027 | 0 | 9 | 174 | 165 | 91 | 74 | 8 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-|
Contains primitive traits for grouplike algebraic structures. The existence of
is generally True/False, but more than two values are also possible, and
some values may carry values or functions as "payload": a "unit element" trait
might, for example, contain the value of th... | jtapolczai/algebra | Grouplike/Traits.hs | apache-2.0 | 5,371 | 0 | 9 | 987 | 735 | 389 | 346 | -1 | -1 |
module LengthLexicographic where
newtype LengthList a = LengthList [a]
deriving(Show,Eq)
lst (LengthList a) = a
instance Ord a => Ord (LengthList a) where
compare (LengthList x) (LengthList y) = let lenCmp = compare (length x) (length y)
in
... | lisphacker/codewars | LengthLexicographic.hs | bsd-2-clause | 565 | 0 | 12 | 261 | 199 | 108 | 91 | 12 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStyleOption.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:21
Warning : this file is machine generated - do ... | keera-studios/hsQt | Qtc/Gui/QStyleOption.hs | bsd-2-clause | 8,297 | 0 | 13 | 1,320 | 2,556 | 1,310 | 1,246 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
-- | DSL for testing the modular solver
module UnitTests.Distribution.Client.Dependency.Modular.DSL (
ExampleDependency(..)
, Dependencies(..)
, ExTest(..)
, ExPreference(..)
, ExampleDb
, ExampleVersionRange
, ExamplePkgVersion
, ExamplePkgName
, ExampleAvailable(..... | gbaz/cabal | cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/DSL.hs | bsd-3-clause | 19,053 | 0 | 20 | 5,107 | 3,939 | 2,196 | 1,743 | 290 | 19 |
{-# LANGUAGE FlexibleInstances, StandaloneDeriving, DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module NFDataInstances where
import Control.DeepSeq
import Control.DeepSeq.Generics
import GHC.Generics hiding (Fixity,Associativity)
import Control.Monad.Trans.State
import Data.Functor.Identity
import Text.Par... | kwibus/myLang | tests/bench/NFDataInstances.hs | bsd-3-clause | 2,434 | 0 | 8 | 424 | 657 | 355 | 302 | 72 | 0 |
{-# LANGUAGE UndecidableInstances, FlexibleInstances, MultiParamTypeClasses #-}
module Generic.Control.MonadPlus where
import Prelude ()
import Generic.Control.Alternative
import Generic.Control.Monad
class (Alternative j m, Monad j m) => MonadPlus j m
instance (Alternative j m, Monad j m) => MonadPlus j m
| sebastiaanvisser/AwesomePrelude | src/Generic/Control/MonadPlus.hs | bsd-3-clause | 312 | 0 | 6 | 42 | 82 | 46 | 36 | -1 | -1 |
module MyEither where
import Control.Applicative
data MyEither l r = MyLeft l | MyRight r
deriving (Eq, Show)
instance Functor (MyEither l) where
fmap _ (MyLeft l) = MyLeft l
fmap f (MyRight r) = MyRight $ f r
instance Applicative (MyEither l) where
pure = MyRight
(MyRight f) <*> fB = fmap ... | hjwylde/haskell-type-classes-workshop | src/MyEither.hs | bsd-3-clause | 600 | 0 | 8 | 179 | 264 | 130 | 134 | 18 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Control.Applicative ((<*>), pure)
import Control.Arrow ((... | yuga/jsonschema-gen | tests/Main.hs | bsd-3-clause | 11,951 | 17 | 20 | 2,745 | 3,186 | 1,638 | 1,548 | 226 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Simple.Plugin(plugin) where
import UniqFM
import GhcPlugins
import qualified ErrUtils
-- For annotation tests
import Simple.DataStructures
import Control.Monad
import Data.Monoid
import Data.Dynamic
import qualified Language.Haskell.TH as TH
plugin :: Plugin
plugin = default... | sdiehl/ghc | testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs | bsd-3-clause | 3,278 | 0 | 22 | 786 | 1,123 | 555 | 568 | 65 | 9 |
-------------------------------------------------------------
-- Parser for WHILE from Nielson, Nielson and Hankin
-- and various other sources.
-------------------------------------------------------------
module While( prettyWhileFromFile ) where
import WhileAS
import Text.ParserCombinators.Parsec
import Text.Parse... | FranklinChen/hugs98-plus-Sep2006 | packages/parsec/examples/while/While.hs | bsd-3-clause | 5,966 | 0 | 14 | 2,317 | 1,291 | 689 | 602 | 103 | 2 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
{-
This module provides a system which can watch one or more symbols
which are loaded from local modules. If the files containing those
modules are changed, then the code is automatically recompiled and
loaded into the running process.
-}
module Plugins where
imp... | Happstack/plugins-ng | Plugins.hs | bsd-3-clause | 7,491 | 0 | 18 | 1,944 | 1,638 | 867 | 771 | 123 | 3 |
{-# LANGUAGE RankNTypes #-}
module Main where
import Blinkomatic
import Color (RGB(..), blackRGB, rgb_w2d)
import Control.Exception (bracket)
import Control.Monad (forM_)
import Control.Monad.Identity (Identity(..))
import Control.Monad.State (StateT, evalStateT)
import Control.Monad.Trans (MonadIO(liftIO), l... | n-heptane-lab/blinkomatic | Simulatomatic.hs | bsd-3-clause | 5,363 | 3 | 30 | 1,441 | 1,996 | 1,047 | 949 | 121 | 4 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Setup
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
--... | ian-ross/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | 91,352 | 0 | 40 | 25,531 | 18,568 | 10,450 | 8,118 | 1,772 | 5 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstan... | GaloisInc/halvm-ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | 76,668 | 0 | 17 | 22,454 | 12,482 | 6,841 | 5,641 | 916 | 7 |
{-# LANGUAGE StandaloneDeriving,FlexibleContexts,MultiParamTypeClasses,TypeOperators,FlexibleInstances,DeriveFunctor,DeriveFoldable,DeriveTraversable,GeneralizedNewtypeDeriving,DeriveDataTypeable,TypeFamilies #-}
module Space.SO3 where
import Control.Applicative
import Space.Class
import Linear.V3
--import Linear.Vec... | massudaw/mtk | Space/SO3.hs | bsd-3-clause | 693 | 0 | 9 | 81 | 146 | 82 | 64 | 19 | 0 |
{-# language CPP #-}
-- | = Name
--
-- XR_KHR_composition_layer_color_scale_bias - instance extension
--
-- = Specification
--
-- See
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_composition_layer_color_scale_bias XR_KHR_composition_layer_color_scale_bias>
-- in the main specification ... | expipiplus1/vulkan | openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_color_scale_bias.hs | bsd-3-clause | 6,321 | 0 | 14 | 1,111 | 951 | 566 | 385 | -1 | -1 |
-- Common wrapper for HTML pages
module Distribution.Server.Pages.Template
( hackagePage
, hackagePageWith
, hackagePageWithHead
) where
import Text.XHtml.Strict
--TODO: replace all this with external templates
-- | Create top-level HTML document by wrapping the Html with boilerplate.
hackagePage :: ... | edsko/hackage-server | Distribution/Server/Pages/Template.hs | bsd-3-clause | 3,400 | 0 | 13 | 1,002 | 712 | 395 | 317 | 64 | 1 |
module Infinity.Core (
-- * Types
Bot(..), Server(..),
-- * Functions on 'Bot'
newbot, -- :: Bot
joinchan, partchan, -- :: Channel -> Server -> Server
joinserv, partserv, -- :: Server -> Bot -> Bot
joinservs, -- :: [(Server,Handle)] -> Bot -> Bot
updateserv, -- :: Server -> Bot... | thoughtpolice/infinity | src/Infinity/Core.hs | bsd-3-clause | 3,638 | 0 | 13 | 946 | 994 | 569 | 425 | 70 | 2 |
{-# language QuasiQuotes #-}
module Render.VkException
( vkExceptionRenderElement
) where
import Data.Text as T
import Prettyprinter
import Data.Vector as V
import Polysemy.Input
import Relude hiding ( ask )
i... | expipiplus1/vulkan | generate-new/src/Render/VkException.hs | bsd-3-clause | 3,581 | 0 | 14 | 899 | 735 | 382 | 353 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : FRP.Yampa.Integration
-- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : ivan.perez@keera.co.uk... | ivanperez-keera/Yampa | yampa/src/FRP/Yampa/Integration.hs | bsd-3-clause | 4,094 | 0 | 13 | 916 | 615 | 358 | 257 | 34 | 1 |
module Bluetooth.Internal.HasInterface where
import Control.Concurrent (readMVar, swapMVar, modifyMVar_)
import Control.Monad.Except (liftIO, mapExceptT)
import Control.Monad
import Control.Monad.Writer.Strict (WriterT)
import Data.Proxy
import Data.Word (Word16)
import DBus
import D... | plow-technologies/ble | src/Bluetooth/Internal/HasInterface.hs | bsd-3-clause | 13,846 | 0 | 22 | 4,083 | 3,359 | 1,812 | 1,547 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls #-}
module Generic.Data.Bool where
import Prelude ()
infixr 3 &&
infixr 2 ||
data Bool
class BoolC j where
false :: j Bool
true :: j Bool
bool :: j a -> j a -> j Bool -> j a
if' :: BoolC j => j Bool -> j a -> j a -> j a
if' b x y = bool y x b
(&&) :: BoolC j => j Bool -> j Bo... | tomlokhorst/AwesomePrelude | src/Generic/Data/Bool.hs | bsd-3-clause | 486 | 0 | 10 | 144 | 266 | 129 | 137 | -1 | -1 |
-- {-# OPTIONS_GHC -cpp -DDEBUG #-}
{-# OPTIONS_GHC -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Berp.Base.ControlStack
-- Copyright : (c) 2010 Bernie Pope
-- License : BSD-style
-- Maintainer : florbitous@gmail.com
-- Stability : experimental
--... | bjpop/berp | libs/src/Berp/Base/ControlStack.hs | bsd-3-clause | 6,063 | 0 | 12 | 1,117 | 1,474 | 762 | 712 | 112 | 5 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Data.Accounting.Account(
Accounts(..),
accounts,
balance,
empty,
account,
-- * Combinators
merge
) where
import Control.Applicative hiding (empty)
import Control.Lens hiding (c... | j-mueller/hldb | src/Data/Accounting/Account.hs | bsd-3-clause | 1,781 | 0 | 9 | 399 | 401 | 236 | 165 | 44 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Turtle.Line
( Line
, lineToText
, textToLines
, linesToText
, textToLine
, unsafeTextToLine
, NewlineForbidden(..)
) whe... | PierreR/Haskell-Turtle-Library | src/Turtle/Line.hs | bsd-3-clause | 2,902 | 0 | 10 | 535 | 349 | 214 | 135 | 41 | 3 |
module Main where
import Test.Hspec
import Day6
import Data.ByteString
spec :: Spec
spec = do
describe "Day6" $ do
context "decode" $ do
it "should return correct val for test input" $ do
decode mostCommon day6TestInput `shouldBe` "easter"
it "should return correct val for day 6 input" $ do... | reidwilbur/aoc2016 | test/Day6Spec.hs | bsd-3-clause | 8,909 | 0 | 17 | 1,937 | 1,935 | 1,260 | 675 | 608 | 1 |
module Jhc.Type.Basic(module Jhc.Type.Basic, module Jhc.Type.Word) where
import Jhc.Prim.Prim
import Jhc.Type.Word
type String = [Char]
data Maybe a = Nothing | Just a
data Either a b = Left a | Right b
data Char = Char Char_
data Integer = Integer BitsMax_
type Bool__ = Bool_
type Int__ = Bits32_
type Char__... | dec9ue/jhc_copygc | lib/jhc/Jhc/Type/Basic.hs | gpl-2.0 | 376 | 0 | 6 | 72 | 121 | 78 | 43 | 13 | 0 |
import Data.Char
import Data.List
main = do
line <- fmap (intersperse '-' . reverse . map toUpper) getLine
putStrLn line
| alexliew/learn_you_a_haskell | code/fmapping_io.hs | unlicense | 126 | 0 | 12 | 25 | 51 | 24 | 27 | 5 | 1 |
import Test.DocTest (doctest)
main :: IO ()
main = doctest ["-fobject-code", "System/Random/MWC.hs"]
| bos/mwc-random | tests/doctests.hs | bsd-2-clause | 102 | 0 | 6 | 13 | 35 | 19 | 16 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE CPP #-}
module Web.Twitter.Conduit.Api
(
-- * Search
SearchTweets
, searchTweets
, search
-- * Direct Messages
, Direct... | johan--/twitter-conduit | Web/Twitter/Conduit/Api.hs | bsd-2-clause | 32,497 | 0 | 12 | 5,008 | 3,122 | 1,912 | 1,210 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Test.CommandLine (tests) where
import Fay.Compiler.Prelude
import Test.Util
import System.Directory
import System.Environment
import System.FilePath
import Test.Tasty
import Test.Tasty.HUnit
import ... | fpco/fay | src/tests/Test/CommandLine.hs | bsd-3-clause | 1,441 | 0 | 16 | 371 | 389 | 200 | 189 | 35 | 3 |
module Database.DSH.VSL.Dot
( renderVSLDot
) where
import qualified Data.Foldable as F
import qualified Data.IntMap as Map
import Data.List
import qualified Data.List.NonEmpty as N
import Prelude hiding ((<$>))
import ... | ulricha/dsh | src/Database/DSH/VSL/Dot.hs | bsd-3-clause | 13,689 | 0 | 18 | 3,522 | 4,902 | 2,483 | 2,419 | 251 | 2 |
module HW11.AParser (Parser, runParser, satisfy, char, posInt) where
import Control.Applicative
import Data.Char
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) }
satisfy :: (Char -> Bool) -> Parser Char
satisfy p = Parser f
where
f [] = Nothing
f (x:xs)
| p... | cgag/cis-194-solutions | src/HW11/AParser.hs | bsd-3-clause | 1,094 | 0 | 13 | 312 | 498 | 260 | 238 | 32 | 2 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module ExceptionSpec (main, spec) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Control.Monad
import Network.HTTP
import Network.Stream
import Network.HTTP.Types hiding (Header)
import Network.Wai hiding (Response)
import Network.Wai.Internal (Req... | AndrewRademacher/wai | warp/test/ExceptionSpec.hs | mit | 2,716 | 0 | 18 | 659 | 685 | 359 | 326 | 54 | 2 |
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.IntMap.Lazy
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy Palamarchuk 2008
-- Licen... | jwiegley/ghc-release | libraries/containers/Data/IntMap/Lazy.hs | gpl-3.0 | 5,007 | 0 | 5 | 1,290 | 431 | 317 | 114 | 102 | 0 |
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following dis... | dimara/ganeti | src/Ganeti/Metad/Config.hs | bsd-2-clause | 5,732 | 0 | 17 | 1,110 | 914 | 462 | 452 | 74 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.