code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3
values | license stringclasses 5
values | size int64 2 1.05M |
|---|---|---|---|---|---|
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Test suite for "Stack.Solver"
module Stack.SolverSpec where
import Data.Text (unpack)
import Stack.Prelude
import Stack.Types.FlagName
import Stack.Types.PackageName
impor... | MichielDerhaeg/stack | src/test/Stack/SolverSpec.hs | Haskell | bsd-3-clause | 1,546 |
module Case3 where
data T = C2 Int
caseIt x
= case x of
42 -> 1 + (f ((error
"C1 no longer defined for T at line: 3")
1
2))
where f x = 9
| kmate/HaRe | old/testing/removeCon/Case3AST.hs | Haskell | bsd-3-clause | 280 |
module AddOneParameter.C2 where
import AddOneParameter.D2
sumSquares1 (x:xs) = (sq sq_f) x + sumSquares1 xs
sumSquares1 [] = 0
sq_f_1 = 0
| RefactoringTools/HaRe | test/testdata/AddOneParameter/C2.expected.hs | Haskell | bsd-3-clause | 145 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, MagicHash, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Event.IntMap
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy Palamarchuk 2008
-- License : BSD-style
-- Maint... | mightymoose/liquidhaskell | benchmarks/ghc-7.4.1/Event/IntMap.hs | Haskell | bsd-3-clause | 12,045 |
f :: Int -> Int -> Int
f x y = x + y
g :: (Int, Int) -> Int
g (x,y) = x + y
main = do
print $ curry g 3 4
print $ uncurry f (3,4)
| manyoo/ghcjs | test/fay/curry.hs | Haskell | mit | 137 |
{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-}
module T13526 where
class C a where
op :: a -> a
instance {-# OVERLAPPING #-} C [Char] where
op x = x
instance C a => C [a] where
op (x:xs) = [op x]
instance C a => C (Maybe a) where
op x = error "urk"
-- We should get no complain... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T13526.hs | Haskell | bsd-3-clause | 418 |
----------------------------------------------------------------------------
-- demo_cqm_recipient.hs demonstrator code how to use CMQ.
-- Copyright : (c) 2012 Joerg Fritsch
--
-- License : BSD-style
-- Maintainer : J.Fritsch@cs.cardiff.ac.uk
-- Stability : experimental
-- Portability : GHC
--
-- Receives and ... | viloocity/CMQ | examples/0.0.1/demo_cmq_recipient.hs | Haskell | mit | 893 |
{-# LANGUAGE DeriveGeneric, ViewPatterns, RecordWildCards, OverloadedStrings, CPP #-}
module ReportTypes where
import qualified Data.Map as M
import Data.Aeson
import Data.Aeson.Types
import GHC.Generics
import Text.Printf
import Data.List
import Data.Char
import Paths
import ReadResult
import qualified BenchmarkSet... | nomeata/gipeda | src/ReportTypes.hs | Haskell | mit | 9,495 |
-- if we want to map an IO function
-- through a list we might make:
-- map print [1, 2, 3] will make [print 1, print 2, print 3]
-- we need to make instead:
-- sequence (map print [1, 2, 3, 4, 5])
-- or better yet:
main = mapM print [1, 2, 3] | fabriceleal/learn-you-a-haskell | 09/mapMs.hs | Haskell | mit | 255 |
{-# htermination addListToFM_C :: Ord a => (b -> b -> b) -> FiniteMap a b -> [(a,b)] -> FiniteMap a b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_1.hs | Haskell | mit | 123 |
{-# LANGUAGE ViewPatterns #-}
module Core.LambdaLift.Abstract.Naive
( abstract
) where
import Common
import Core.AST
import Core.AnnotAST
import qualified Data.Set as S
abstract :: AnnotProgram (S.Set Name) Name -> Program Name
abstract = Program . map abstractSC . getProgramF
where abstractSC (SupercombF name ar... | meimisaki/Rin | src/Core/LambdaLift/Abstract/Naive.hs | Haskell | mit | 1,117 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.DOMNamedFlowCollection
(js_item, item, js_namedItem, namedItem, js_getLength, getLength,
DOMNamedFlowCollection, castToDOMNamedFlowCollection,
gTypeDOMNamedFlowCollection)
where
impor... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/DOMNamedFlowCollection.hs | Haskell | mit | 2,503 |
module Compiler.Rum.StackMachine.Translator where
import Control.Monad.Extra (concatMapM)
import qualified Data.HashMap.Strict as HM
import Compiler.Rum.Internal.AST
import Compiler.Rum.Internal.Rumlude
import Compiler.Rum.Internal.Util
import Compiler.Rum.StackMachine.Structure
import Compiler.Rum.St... | vrom911/Compiler | src/Compiler/Rum/StackMachine/Translator.hs | Haskell | mit | 4,171 |
module Main where
-------------
-- Imports --
import Distribution.Simple
----------
-- Code --
main :: IO ()
main = defaultMain
| crockeo/ballgame | src/Setup.hs | Haskell | mit | 130 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Pretty.JS
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- Pretty printer fo... | michaelficarra/purescript | src/Language/PureScript/Pretty/JS.hs | Haskell | mit | 10,688 |
{-# LANGUAGE DeriveDataTypeable #-}
module ReprTree (reprTree, reprTreeString) where
import Data.Tree
import Data.Generics
import Data.List
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set... | nikita-volkov/repr-tree-syb | src/ReprTree.hs | Haskell | mit | 2,597 |
module Development.Duplo where
import Control.Exception (throw)
import Control.Lens hiding (Action)
import Control.Monad (unless, void, when)
import Control.Monad.Trans.Maybe (runMaybeT)
import qualified Development.Duplo.... | pixbi/duplo | src/Development/Duplo.hs | Haskell | mit | 6,815 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.Urho3D.Graphics.Renderer(
Renderer
, rendererContext
, rendererSetNumViewports
, rendererSetViewport
, rendererGetTextureQuality
, rendererSetTextureQuality
, rendererGetMaterialQuality
, rendererSetMaterialQuality
, rendererGetSpecularLighting
... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Graphics/Renderer.hs | Haskell | mit | 8,188 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.Node
(js_insertBefore, insertBefore, js_replaceChild, replaceChild,
js_removeChild, removeChild, js_appendChild, appendChild,
js_hasChildNodes, hasChildNodes, js_cloneNode, cloneNode,
... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Node.hs | Haskell | mit | 18,951 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ACME.Yes.PreCure5.GoGo.ProfilesSpec where
import ACME.Yes.PreCure5.GoGo.Profiles
import qualified ACME.Yes.PreCure5.Profiles as Yes
import Test.Hspec
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck
import qualified Data.Set as S
import Debug.Trace
import Contro... | igrep/yes-precure5-command | test/ACME/Yes/PreCure5/GoGo/ProfilesSpec.hs | Haskell | mit | 1,017 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QFontDatabase.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated - do... | uduki/hsQt | Qtc/Gui/QFontDatabase.hs | Haskell | bsd-2-clause | 14,131 |
import System.Environment
import Test.DocTest
main = doctest ["word2vec"]
| RayRacine/hs-word2vec | word2vec-test.hs | Haskell | bsd-3-clause | 75 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Math.Budget.Lens.ArbitraryMethodL where
class ArbitraryMethodL cat target | target -> cat where
arbitraryMethodL :: cat target String
| tonymorris/hbudget | src/Math/Budget/Lens/ArbitraryMethodL.hs | Haskell | bsd-3-clause | 208 |
{-# LANGUAGE PackageImports #-}
module System.Posix.Internals (module M) where
import "base" System.Posix.Internals as M
| silkapp/base-noprelude | src/System/Posix/Internals.hs | Haskell | bsd-3-clause | 126 |
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving #-}
module Lib.HGit.Data
( runGit
, GitConfig(..)
, GitCommand(..)
, GitReader
, createGitProcess
, spawnGitProcess
, ID
, CommitID
, BlobID
, TagID
, TreeID
, Tag
, GitObject(..)
, Person(..)
, Commitent(..)
, TreeNode(..)
, ... | MarcusWalz/hgit | Lib/HGit/Data.hs | Haskell | bsd-3-clause | 3,658 |
{-# LANGUAGE QuasiQuotes #-}
module Output.Totals where
import Control.Lens
import Data.List (sortBy)
import Data.Map (Map)
import Data.Maybe (fromJust)
import Data.Ord (comparing)
import Data.Ratio
import Data.Time.Calendar (Day)
import NewTTRS.Law
import Text.Hamlet (Html, shamlet)
import qualified Data.Map as Map
... | glguy/tt-ratings | Output/Totals.hs | Haskell | bsd-3-clause | 3,726 |
import System.Environment
import System.Directory
-- | A fake version of gcc that simply echos its last argument.
-- This is to replicate the --print-file-name flag of gcc
-- which is the only functionality of gcc that GHC needs.
main :: IO ()
main = do
args <- getArgs
if null args then return () else do
... | lukexi/rumpus | util/fakeGCC.hs | Haskell | bsd-3-clause | 936 |
#define IncludedmakeIndicesNull
makeIndicesNull :: RString -> RString -> Integer -> Integer -> Proof
{-@ makeIndicesNull
:: s:RString
-> t:RString
-> lo:INat
-> hi:{Integer | (stringLen t < 2 + stringLen s && 1 + stringLen s - stringLen t <= lo && lo <= hi)
|| (1 + stringLen s <= stringLen t)
... | nikivazou/verified_string_matching | src/Proofs/makeIndicesNull.hs | Haskell | bsd-3-clause | 819 |
{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
module InterfacesRules where
{-# LINE 2 "./src-ag/Interfaces.ag" #-}
import CommonTypes
import SequentialTypes
{-# LINE 11 "dist/build/InterfacesRules.hs" #-}
{-# LINE 10 "./src-ag/InterfacesRules.lag" #-}
import I... | norm2782/uuagc | src-generated/InterfacesRules.hs | Haskell | bsd-3-clause | 64,297 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- ^
-- Original location https://github.com/nh2/aesonbson/blob/master/Data/AesonBson/Instances.hs
-- ^ Provides @ToJSON@ instances for BSON @Value@s and @Document@s.
module Data.AesonBson.Instances where
import Data.Aeson... | gabesoft/kapi | src/Data/AesonBson/Instances.hs | Haskell | bsd-3-clause | 443 |
-- vim:sw=2:ts=2:expandtab:autoindent
{- |
Module : Math.SMT.Yices.Pipe
Copyright : (c) 2009 by Ki Yung Ahn
License : BSD3
Maintainer : Ahn, Ki Yung <kya@pdx.edu>
Stability : provisional
Portability : portable
Inter-process communication to Yices through pipe.
-}
module Math... | pepeiborra/yices-0.0.0.12 | Math/SMT/Yices/Pipe.hs | Haskell | bsd-3-clause | 4,875 |
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
import Java
import Control.Applicative
import Options
import Data.Aeson
import Data.Aeson.TH
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
data User = User
{ userId ... | JulianZhang/eta-example | src/Main.hs | Haskell | bsd-3-clause | 1,399 |
module D1Lib where
import Text.Megaparsec
import Text.Megaparsec.String
import Text.Megaparsec.Char
import Text.Megaparsec.Lexer as L
type ParseResult = Either (ParseError Char Dec) [Integer]
wrapl :: a -> [a]
wrapl = replicate 1
digit :: Parser Integer
digit = read <$> (wrapl <$> digitChar)
parser :: Parser [Inte... | wfleming/advent-of-code-2016 | 2017/D1/src/D1Lib.hs | Haskell | bsd-3-clause | 845 |
module Main where --Main
import CAProtoMain (caEntity_CA)
import ProtoMonad
import ProtoTypes
import ProtoActions
import VChanUtil
import TPMUtil
import Keys
import ProtoTypes(Channel)
import Prelude
import Data.ByteString.Lazy hiding (putStrLn, head, tail, map)
import qualified Data.Map as M
import System.IO
import... | armoredsoftware/protocol | tpm/mainline/protoMonad/CAMain.hs | Haskell | bsd-3-clause | 3,184 |
module Test.Tup(main) where
import Development.Shake
import Development.Shake.Config
import Development.Shake.FilePath
import Development.Shake.Util
import Test.Type
import Data.Maybe
import Control.Monad
import System.Info.Extra
-- Running ar on Mac seems to break in CI - not sure why
main = testBuild (unless isMa... | ndmitchell/shake | src/Test/Tup.hs | Haskell | bsd-3-clause | 1,537 |
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Language.K3.Runtime.Dataspace.Test (tests) where
import Control.Monad
import Control.Monad.Trans.Either
import Data.List
import Data.Maybe
import Test.HUnit hiding (Test)
import Test.Framework.Providers.API... | DaMSL/K3 | test/Language/K3/Runtime/Dataspace/Test.hs | Haskell | apache-2.0 | 10,707 |
{-# LANGUAGE FlexibleInstances, ExistentialQuantification, MultiParamTypeClasses #-}
-- |
-- Module : Scion.Server.ConnectionIO
-- License : BSD-style
--
-- Maintainer : marco-oweber@gmx.de
-- Stability : experimental
-- Portability : portable
--
-- Abstraction over Socket and Handle IO.
module Scion.Serve... | CristhianMotoche/scion | server/Scion/Server/ConnectionIO.hs | Haskell | bsd-3-clause | 3,491 |
{-# Language GADTs, NoMonomorphismRestriction #-}
module Midi.TimeSet ( normalize ) where
import Data.Set (fromAscList, toAscList, unions)
import Control.Arrow ((>>>))
normalize :: (Ord b, Ord a, Num a) => [[(a, b)]] -> [(a, b)]
normalize = map absolute >>> norm >>> relative
norm :: (Eq x, Ord x, Eq y, Ord y) => [[... | beni55/Midi | src/Midi/TimeSet.hs | Haskell | bsd-3-clause | 569 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Lazyfoo.Lesson18 (main) where
import Prelude hiding (any, mapM_)
import Control.Applicative
import Control.Monad hiding (mapM_)
import Data.Foldable
import Data.Maybe
import Foreign.C.Type... | bj4rtmar/sdl2 | examples/lazyfoo/Lesson18.hs | Haskell | bsd-3-clause | 3,449 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
--
-- Assumes that the `NoPat` pass has been run.
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternG... | beni55/cryptol | src/Cryptol/TypeCheck/Infer.hs | Haskell | bsd-3-clause | 28,607 |
-- | Spectral functions
module Csound.Air.Spec(
toSpec, fromSpec, mapSpec, scaleSpec, addSpec, scalePitch,
CrossSpec(..),
crossSpecFilter, crossSpecVocoder, crossSpecFilter1, crossSpecVocoder1
) where
import Data.Default
import Csound.Typed
import Csound.Typed.Opcode
import Csound.Tab(sine)
---------... | isomorphism/csound-expression | src/Csound/Air/Spec.hs | Haskell | bsd-3-clause | 4,168 |
tick y = y:tock y
tock y = y:tick y
| themattchan/tandoori | input/mutual.hs | Haskell | bsd-3-clause | 36 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Standa... | AlexanderPankiv/ghc | libraries/base/Data/Typeable/Internal.hs | Haskell | bsd-3-clause | 16,598 |
import Test.Cabal.Prelude hiding (cabal)
import qualified Test.Cabal.Prelude as P
-- See #4332, dep solving output is not deterministic
main = cabalTest . recordMode DoNotRecord $ do
fails $ cabal "new-build" []
cabal "new-build" ["--allow-older"]
fails $ cabal "new-build" ["--allow-older=baz,quux"]
cab... | mydaum/cabal | cabal-testsuite/PackageTests/AllowOlder/cabal.test.hs | Haskell | bsd-3-clause | 1,476 |
main :: IO ()
main = asdf
| MichielDerhaeg/stack | test/integration/tests/1659-skip-component/files/test/Spec.hs | Haskell | bsd-3-clause | 26 |
-- (c) 2007 Andy Gill
module HpcFlags where
import System.Console.GetOpt
import qualified Data.Set as Set
import Data.Char
import Trace.Hpc.Tix
import Trace.Hpc.Mix
import System.Exit
import System.FilePath
data Flags = Flags
{ outputFile :: String
, includeMods :: Set.Set String
, excludeMods... | wxwxwwxxx/ghc | utils/hpc/HpcFlags.hs | Haskell | bsd-3-clause | 9,605 |
module ShouldFail where
-- !!! Testing duplicate type variables
type T a a = Either a a
| urbanslug/ghc | testsuite/tests/module/mod23.hs | Haskell | bsd-3-clause | 88 |
module Hesh ( sh, cmd, (|>), (/>), (!>), (&>), (</), (/>>), (!>>), (&>>), (<//), (.=)
, passThrough
) where
import Hesh.Process
import Hesh.Shell
| jekor/hesh | lib/Hesh.hs | Haskell | mit | 171 |
module Development.Duplo.Utilities where
import Control.Applicative ((<$>))
import Control.Lens.Operators
import Control.Monad (filterM, zipWithM)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Class (lift)
i... | pixbi/duplo | src/Development/Duplo/Utilities.hs | Haskell | mit | 9,270 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.Urho3D.Math.Vector4(
Vector4(..)
, HasX(..)
, HasY(..)
, HasZ(..)
, HasW(..)
, vector4Context
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Cpp as C
import Control.Lens
import Data.Monoid
import Foreign
impor... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Math/Vector4.hs | Haskell | mit | 2,945 |
{-# LANGUAGE BangPatterns #-}
module Language.HAsm.Types (
module Data.Word,
module Data.Int,
module Language.HAsm.X86.CPU,
-- routines:
safeHead, int, toInt32,
immToW, immToB, isWord8,
HasmStatement(..), Directive(..),
ParseResult, HasmStmtWithPos, SrcPos(..)
) where
import Data.Word
import Data.Int
... | EarlGray/hasm | src/Language/HAsm/Types.hs | Haskell | mit | 4,072 |
-- Find the odd int
-- http://www.codewars.com/kata/54da5a58ea159efa38000836/
module Codewars.Kata.FindOdd where
import Data.List (sort, group)
findOdd :: [Int] -> Int
findOdd = head . head . filter (odd . length) . group . sort
| gafiatulin/codewars | src/6 kyu/FindOdd.hs | Haskell | mit | 232 |
{-# LANGUAGE
OverloadedStrings
#-}
{-|
Module : HSat.Problem.Instances.CNF.Parser.Internal
Description : Helper functions for parsing CNF files
Copyright : (c) Andrew Burnett 2014-2015
Maintainer : andyburnett88@gmail.com
Stability : experimental
Portability : Unknown
Exports a set of internally use... | aburnett88/HSat | src/HSat/Problem/Instances/CNF/Parser/Internal.hs | Haskell | mit | 3,495 |
{-# LANGUAGE LambdaCase #-}
module Main(main) where
import Parse
import Write
main :: IO ()
main =
do specHtml <- getContents
parseSpec specHtml >>= \case
Nothing -> error "Unable to extract spec from html"
Just spec -> writeSpecToFiles "SpirV" spec
| expipiplus1/spir-v | generate/src/Main.hs | Haskell | mit | 274 |
module ProjectEuler.Problem106
( problem
) where
import Control.Monad
import Data.Monoid
import Petbox
import qualified Data.List.Ordered as LOrdered
import ProjectEuler.Types
problem :: Problem
problem = pureProblem 106 Solved result
{-
Looks like we should expect this to be a difficult one.
But I blame t... | Javran/Project-Euler | src/ProjectEuler/Problem106.hs | Haskell | mit | 4,629 |
{-# LANGUAGE StandaloneDeriving #-}
module GestionEvents
( space
, parseEvents
, keyDown
, firing
, rebooting
) where
import Prelude hiding ((.), id, null, filter, until)
import Control.Wire hiding (empty)
import Control.Wire.Unsafe.Event as Event
import FRP.Netwire hiding (empty)
import Data.Monoid (Monoid)
import Da... | hardkey/Netwire5-shmup-prototype | src/GestionEvents.hs | Haskell | mit | 1,532 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
module PostgREST.DbStructure (
getDbStructure
, accessibleTables
, doesProcExist
, doesProcReturnJWT
) where
import qualif... | league/postgrest | src/PostgREST/DbStructure.hs | Haskell | mit | 30,824 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.MediaSource
(js_newMediaSource, newMediaSource, js_addSourceBuffer,
addSourceBuffer, js_removeSourceBuffer, removeSourceBuffer,
js_endOfStream, endOfStream, js_isTypeSupported, isTypeSupport... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaSource.hs | Haskell | mit | 5,611 |
{-# LANGUAGE OverloadedStrings, LambdaCase, FlexibleInstances,
OverloadedLists, TypeSynonymInstances,
FlexibleContexts #-}
module Language.Rowling.Definitions.Types where
import qualified Prelude as P
import Data.Char (isLower)
import qualified Data.HashMap.Strict as H
import Data.Text (Text... | thinkpad20/rowling | src/Language/Rowling/Definitions/Types.hs | Haskell | mit | 8,002 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html
module Stratosphere.ResourceProperties.ApiGatewayV2StageAccessLogSe... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/ApiGatewayV2StageAccessLogSettings.hs | Haskell | mit | 2,241 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE Trustworthy #-}
-- | A container for keeping values of various types together.
module System.Hurtle.TypedStore
( Id(), Mode(..), TypedStore()
, typedStore, insert, lookup,... | bens/hurtle | src/System/Hurtle/TypedStore.hs | Haskell | apache-2.0 | 1,816 |
{-# Hey #-}
{-# LANGUAGE OhMyGod #-}
{-# OPTIONS_GHC --omG #-}
| rikvdkleij/intellij-haskell | src/test/testData/parsing-hs/Pragma.hs | Haskell | apache-2.0 | 63 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Kubernetes.V1.PodSecurityContext where
import GHC.Generics
import Kubernetes.V1.SELinuxOptions
import qualified Data.Aeson
-- | PodSecurityCon... | minhdoboi/deprecated-openshift-haskell-api | kubernetes/lib/Kubernetes/V1/PodSecurityContext.hs | Haskell | apache-2.0 | 2,467 |
module TransCFSpec (transSpec, testConcreteSyn) where
import BackEnd
import FrontEnd (source2core)
import JavaUtils (getClassPath)
import MonadLib
import OptiUtils (Exp(Hide))
import PartialEvaluator (rewriteAndEval)
import SpecHelper
import StringPrefixes (namespace)
import StringUtils (capitalize)
import TestTerms
... | bixuanzju/fcore | testsuite/TransCFSpec.hs | Haskell | bsd-2-clause | 3,136 |
{--
Copyright (c) 2014-2020, Clockwork Dev Studio
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 a... | clockworkdevstudio/Idlewild-Lang | Assembler.hs | Haskell | bsd-2-clause | 4,077 |
-- base
import Control.Concurrent (threadDelay)
import Control.Monad (forM, forM_, when)
import Data.Char (isAscii)
import Data.List (intercalate, isPrefixOf)
import Foreign.C.String (peekCString, withCString)
import Foreign.C.Types (CDouble(..))
import Foreign.Marshal.Allo... | bsl/bindings-GLFW | Test.hs | Haskell | bsd-2-clause | 31,062 |
{-# LANGUAGE DataKinds, EmptyDataDecls, TypeOperators, UndecidableInstances #-}
module HaskHOL.Lib.Pair.Context
( PairType
, PairThry
, PairCtxt
, ctxtPair
) where
import HaskHOL.Core
import HaskHOL.Deductive hiding (newDefinition)
import qualified HaskHOL.Deductive as D (newDefinition)
import Has... | ecaustin/haskhol-math | src/HaskHOL/Lib/Pair/Context.hs | Haskell | bsd-2-clause | 3,729 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTableWidget.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:26
Warning : this file is machine generated - do ... | keera-studios/hsQt | Qtc/Gui/QTableWidget.hs | Haskell | bsd-2-clause | 108,770 |
module Common
( BaseGene(..)
, CoupleGene(..)
, replaceAtIndex
, boxMuller
, InBounds
, FitnessFunction(..)
, GeneFormat(..)
, StartPopulation(..)
, calcFitness
, mutateStandard
, mutateGauss
, evolve
, generate
) where
-- the (..) also exports the constructor
im... | mezzomondo/dejong | src/Common.hs | Haskell | bsd-3-clause | 8,238 |
-- | An index function represents a mapping from an array index space
-- to a flat byte offset.
module Futhark.Representation.ExplicitMemory.IndexFunction
(
IxFun(..)
, index
, iota
, offsetIndex
, strideIndex
, permute
, reshape
, applyInd
, base
... | CulpaBS/wbBach | src/Futhark/Representation/ExplicitMemory/IndexFunction.hs | Haskell | bsd-3-clause | 9,785 |
{-# LANGUAGE TypeOperators, DataKinds, TypeFamilies, NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Tests.OffSystemCSU where
import Data.Metrology.Poly
import Data.Metrology.SI
import qualified Data.Dimensions.SI as D
import Test.Tasty.HUnit
import Test.HUnit.Approx
type YardP... | goldfirere/units | units-test/Tests/OffSystemCSU.hs | Haskell | bsd-3-clause | 783 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Control.Monad (zipWithM)
import Diagrams.Prelude
import Diagrams.TwoD.Text
import Diagrams.Backend.SVG
data LabelProps = LabelProps
{ lFontSize :: Double
, lFontSlant :: FontSlant
, lStrutWidth :: Double
, lStrutHeight :: Double
}
data CurveProps ... | kowey/conceptdiagram-examples | conceptdiagram-examples.hs | Haskell | bsd-3-clause | 4,007 |
[(Call, Env aam, Store d aam, Time aam)]
| davdar/quals | writeup-old/sections/04MonadicAAM/04Optimizations/00Widen/00BeforeSS.hs | Haskell | bsd-3-clause | 41 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
-- |
-- Module : ... | mainland/nikola | src/Data/Array/Nikola/Language/Monad.hs | Haskell | bsd-3-clause | 6,454 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoRebindableSyntax #-}
module Duckli... | facebookincubator/duckling | Duckling/Region.hs | Haskell | bsd-3-clause | 932 |
{-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Sta... | OS2World/DEV-UTIL-HUGS | libraries/Data/Either.hs | Haskell | bsd-3-clause | 609 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.TextureSwizzle
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/EXT/TextureSwizzle.hs | Haskell | bsd-3-clause | 806 |
{-# LANGUAGE TypeApplications #-}
module Database.PostgreSQL.PQTypes.JSON
( JSON(..)
, JSONB(..)
, aesonFromSQL
, aesonToSQL
) where
import Data.Aeson
import Foreign.Ptr
import qualified Control.Exception as E
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
im... | scrive/hpqtypes | src/Database/PostgreSQL/PQTypes/JSON.hs | Haskell | bsd-3-clause | 2,970 |
{-# OPTIONS_GHC -fno-warn-tabs #-}
import Common
main = putStrLn "=== Challange15 ==="
-- Challange done in library code
| andrewcchen/matasano-cryptopals-solutions | set2/Challange15.hs | Haskell | bsd-3-clause | 124 |
module Koriel.Core.LambdaLift
( lambdalift,
)
where
import Control.Lens (At (at), Lens', lens, traverseOf, traversed, use, (<>=), (?=))
import qualified Data.HashMap.Strict as HashMap
import qualified Data.HashSet as HashSet
import Koriel.Core.Flat
import Koriel.Core.Syntax
import Koriel.Core.Type
import Koriel.Id... | takoeight0821/malgo | src/Koriel/Core/LambdaLift.hs | Haskell | bsd-3-clause | 3,195 |
module Day7 where
import Data.List
import qualified Data.List.Split as LS
data IP = IP { normal :: [String], hyper :: [String] }
deriving Show
parseIP :: String -> IP
parseIP s = let (normal,hyper) = foldr (\y ~(xs,ys) -> (y:ys,xs)) ([],[]) ss
ss = LS.splitOneOf "[]" s
in IP normal hyp... | MarcelineVQ/advent2016 | src/Day7.hs | Haskell | bsd-3-clause | 1,280 |
module Cache
( File
, CacheSize
, CacheStatistic
, getCacheStatistic
, calculateHits
, Cache (..)
, fits
, WriteStrategy (..)
, biggerAsMax
)
where
import Prelude hiding (fail)
import Request
type File = (FileID, FileSize)
type CacheSize = Int
type Ca... | wochinge/CacheSimulator | src/Cache.hs | Haskell | bsd-3-clause | 3,106 |
module Main where
import qualified Bot
main :: IO ()
main = Bot.run
| wimdu/alonzo | src/Main.hs | Haskell | mit | 70 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="zh-CN">
<title>Ruby Scripting</title>
<maps>
<homeID>top</homeID>
<mapref location="ma... | veggiespam/zap-extensions | addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_zh_CN/helpset_zh_CN.hs | Haskell | apache-2.0 | 960 |
module BCode
( BCode(..)
, BCodePath(..)
, encode
, decode
, search
, searchInt
, searchStr
) where
import Control.Applicative ((<$>), (<*>), (<|>), (*>), (<*))
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import... | artems/htorr | src/BCode.hs | Haskell | bsd-3-clause | 3,114 |
{-
- Copyright (c) 2010 Mats Rauhala <mats.rauhala@gmail.com>
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to us... | sjakobi/zsh-battery | Files.hs | Haskell | bsd-3-clause | 1,995 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.OrgMode.Parse.Attoparsec.Section
-- Copyright : © 2015 Parnell Springmeyer
-- License : All Rights Reserved
-- Maintainer : Parnell Springmeyer <parnell@digitalmentat.com>
-- Stability : stable
--
-- P... | imalsogreg/orgmode-parse | src/Data/OrgMode/Parse/Attoparsec/Section.hs | Haskell | bsd-3-clause | 1,970 |
module Reflex.DynamicWriter
{-# DEPRECATED "Use 'Reflex.DynamicWriter.Class' and 'Reflex.DynamicWrite.Base' instead, or just import 'Reflex'" #-}
( module X
) where
import Reflex.DynamicWriter.Base as X
import Reflex.DynamicWriter.Class as X
| ryantrinkle/reflex | src/Reflex/DynamicWriter.hs | Haskell | bsd-3-clause | 249 |
{-# LANGUAGE TupleSections, GeneralizedNewtypeDeriving #-}
-- |A simple graph implementation backed by 'Data.HashMap'.
module Data.RDF.MGraph(MGraph, empty, mkRdf, triplesOf, uniqTriplesOf, select, query)
where
import Prelude hiding (pred)
import Control.DeepSeq (NFData)
import Data.RDF.Types
import Data.RDF.Query
i... | ddssff/rdf4h | src/Data/RDF/MGraph.hs | Haskell | bsd-3-clause | 6,482 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-- | Construct a @Plan@ for how to build
module Stack.Build.ConstructPlan
( constr... | kairuku/stack | src/Stack/Build/ConstructPlan.hs | Haskell | bsd-3-clause | 22,289 |
module PfeSocket(listenOnPFE,connectToPFE,acceptPFE,removePFE,
pfeClient,clientOps,serverOps,sResult,errorString) where
import Prelude hiding (putStr,readIO)
import Network(listenOn,accept,connectTo,PortID(..))
import IO(hPutStrLn,hPrint,hGetLine,hGetContents,hClose,hSetBuffering,BufferMode(..))
import... | forste/haReFork | tools/pfe/PfeSocket.hs | Haskell | bsd-3-clause | 2,141 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveFoldable, DeriveTraversable #-}
module Distribution.Client.Dependency.Modular.PSQ where
-- Priority search queues.
--
-- I am not yet sure what exactly is needed. But we need a data structure with
-- key-based lookup that can be sorted. We're using a sequence right now... | DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/PSQ.hs | Haskell | bsd-3-clause | 2,802 |
{-# OPTIONS -fno-warn-redundant-constraints #-}
-- !!! This is the example given in TcDeriv
--
module ShouldSucceed where
data T a b
= C1 (Foo a) (Bar b)
| C2 Int (T b a)
| C3 (T a a)
deriving Eq
data Foo a = MkFoo Double a deriving ()
instance (Eq a) => Eq (Foo a)
data Bar a = MkBar Int Int deriving ()
i... | urbanslug/ghc | testsuite/tests/deriving/should_compile/drv003.hs | Haskell | bsd-3-clause | 365 |
-- !! check if tc type substitutions really do
-- !! clone (or if not, work around it by cloning
-- !! all binders in first pass of the simplifier).
module ShouldCompile where
f,g :: Eq a => (a,b)
f = g
g = f
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/tc099.hs | Haskell | bsd-3-clause | 210 |
{-# LANGUAGE PatternSynonyms #-}
module Main where
pattern First x <- x:_ where
First x = foo [x, x, x]
foo :: [a] -> [a]
foo xs@(First x) = replicate (length xs + 1) x
main = mapM_ print $ First ()
| ghc-android/ghc | testsuite/tests/patsyn/should_run/bidir-explicit-scope.hs | Haskell | bsd-3-clause | 204 |
to_tens :: Integer -> [Integer]
to_tens 0 = []
to_tens n = to_tens (n `div` 10) ++ [n `mod` 10]
isPrime :: Integer -> Bool
isPrime 1 = False
isPrime k
| k <= 0 = False
|otherwise = null [ x | x <- [2..(truncate $ sqrt $ fromIntegral k)], k `mod` x == 0]
from_tens xs = sum $ map (\(a,b) -> 10^a * b)... | stefan-j/ProjectEuler | q37.hs | Haskell | mit | 1,093 |
-- Isomorphism
-- https://www.codewars.com/kata/5922543bf9c15705d0000020
module ISO where
import Data.Void
import Data.Tuple(swap)
import Control.Arrow ((***), (+++))
type ISO a b = (a -> b, b -> a)
substL :: ISO a b -> (a -> b)
substL = fst
substR :: ISO a b -> (b -> a)
substR = snd
isoBool :: ISO Bool Bool
isoB... | gafiatulin/codewars | src/3 kyu/Isomorphism.hs | Haskell | mit | 1,582 |
module S8_1 where
-- Tipo das funções utilizadas em divideAndConquer
--ind :: p -> Bool
--solve :: p -> s
--divide :: p -: [s]
--combine :: p -> [s] -> s
divideAndConquer :: ( p -> Bool) -> (p -> s) -> (p -> [p]) -> (p -> [s] -> s)
-> p -> s
divideAndConquer ind solve divide combine initPb
= dc' initPb
... | gustavoramos00/tecnicas-topdown | S8_1.hs | Haskell | mit | 1,261 |
module PosNegIf where
posOrNeg x =
if x >= 0
then "Pos "
else "Neg "
-- note no returns or paren
| HaskellForCats/HaskellForCats | simpcondi1.hs | Haskell | mit | 106 |
module Nodes.Statement where
import Nodes
import Nodes.Expression (Expr)
data Stmt
= Line { expr :: Expr }
instance AstNode Stmt where
ast (Line expr) = ast expr
| milankinen/cbhs | src/nodes/Statement.hs | Haskell | mit | 169 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.