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
module Reader (reader, toPandoc) where import qualified Data.Text as T import Text.Pandoc.Class (runIOorExplode) import Text.Pandoc.Definition (Pandoc) import Text.Pandoc.Options import Text.Pandoc.Readers.Markdown (readMarkdown) reader :: ReaderOptions reader = def { readerStandalone = True , readerExtensions = ...
Thhethssmuz/ppp
src/Reader.hs
Haskell
mit
617
-- Copyright 2020-2021 Google LLC -- -- 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...
google/hs-dependent-literals
dependent-literals-plugin/tests/DoubleNegation.hs
Haskell
apache-2.0
1,424
-- layout can still have explicit semicolons f x = let a = 1 ; b = 2 c = 3 in x
metaborg/jsglr
org.spoofax.jsglr/tests-offside/terms/doaitse/layout5.hs
Haskell
apache-2.0
106
{-| Implementation of the job queue. -} {- Copyright (C) 2010, 2012 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 notic...
mbakke/ganeti
src/Ganeti/JQueue.hs
Haskell
bsd-2-clause
30,285
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsEllipseItem_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:27 Warning : this file is machine gener...
uduki/hsQt
Qtc/Gui/QGraphicsEllipseItem_h.hs
Haskell
bsd-2-clause
100,132
-- | This module provides the type of an (abstract) object. module Jat.PState.Object ( Object (..) , className , fieldTable , isInstance , mapValuesO , referencesO , FieldTable , elemsFT , updateFT , emptyFT , lookupFT , assocsFT ) where import Jat.PState.AbstrValue import Jat.Utils.Pre...
ComputationWithBoundedResources/jat
src/Jat/PState/Object.hs
Haskell
bsd-3-clause
2,779
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module BitBasket where import Data.Maybe import Data.Word import Data.Bits import Control.Monad -- Right-to-Left bit basket data BitBasket a = BitBasket Int a deriving(Eq,Show) unsafeUnBasket :: (Bi...
ierton/yteratee
src/BitBasket.hs
Haskell
bsd-3-clause
2,497
{-# LANGUAGE DeriveDataTypeable, NoMonomorphismRestriction #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.Backend.Pdf.CmdLine -- Copyright : (c) 2013 alpheccar.org (see LICENSE) -- License : BSD-style (see LICENSE) -- -- Convenient creation of c...
alpheccar/diagrams-pdf
src/Diagrams/Backend/Pdf/CmdLine.hs
Haskell
bsd-3-clause
5,541
{-# LANGUAGE ForeignFunctionInterface, TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances, FlexibleContexts, ScopedTypeVariables, CPP #-} ----------------------------------------------------------------------------- -- | -- Licence : BSD-style (see LICENSE) -- -- Exports data types and functions required by th...
tim-m89/Salsa
Foreign/Salsa/Binding.hs
Haskell
bsd-3-clause
3,595
{-# LANGUAGE GADTs, DataKinds, KindSignatures, PolyKinds, ConstraintKinds, TypeOperators #-} module Tests.Util.TypeEquality where import GHC.Exts data (:==:) :: k -> k -> * where Refl :: a :==: a cong :: (a :==: b) -> (f a :==: f b) cong Refl = Refl data Exists :: (a -> *) -> * where ExI :: f a -> Exists f d...
liamoc/geordi
Tests/Util/TypeEquality.hs
Haskell
bsd-3-clause
443
-- | -- Copyright : (C) 2014 Seagate Technology Limited. -- License : BSD3 import Control.Applicative import Control.Alternative.Freer import qualified Options.Applicative as CL import qualified Options.Applicative.Help.Core as CL data Foo x = Foo { name :: String , reader :: String -> x } instance Functor ...
seagate-ssg/options-schema
test/Applicative.hs
Haskell
bsd-3-clause
736
module SSH.Supported where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.Serialize as S import Crypto.HMAC (MacKey(..), hmac) import Crypto.Hash.CryptoAPI (MD5, SHA1) import SSH.Crypto import SSH.Internal.Util version :: String version = "SSH-2.0-DarcsDen"...
cdepillabout/ssh
src/SSH/Supported.hs
Haskell
bsd-3-clause
2,090
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module RevealHs.TH where import Control.Monad import Data.HashMap.Strict as HM import Data.IORef import Data.Maybe import Data.String.Interpolate import Language.Haskell.TH import ...
KenetJervet/reveal-hs
src/RevealHs/TH.hs
Haskell
bsd-3-clause
1,923
{-# LANGUAGE FlexibleContexts #-} module EFA.Data.Axis.Mono where import EFA.Utility(Caller,merror, ModuleName(..),FunctionName, genCaller) import qualified EFA.Data.Vector as DV -- | TODO -- how many points are allowed to have the same time, only two or more ? m :: ModuleName m = ModuleName "Axis.Mono" nc :: Func...
energyflowanalysis/efa-2.1
src/EFA/Data/Axis/Mono.hs
Haskell
bsd-3-clause
2,684
module Expectation where import Test.Hspec import System.Directory import Control.Exception as E shouldContain :: Eq a => [a] -> a -> Expectation shouldContain containers element = do let res = element `elem` containers res `shouldBe` True withDirectory_ :: FilePath -> IO a -> IO a withDirectory_ dir action ...
eagletmt/ghc-mod
test/Expectation.hs
Haskell
bsd-3-clause
730
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.Tooty ( module Graphics.Tooty.Image, module Graphics.Tooty.Matrix, module Graphics.Tooty.Geometry, module Graphics.Tooty.Text, -- * OpenGL context preparation setup2D, positionViewport, ) where import Graphics.Rendering.OpenGL (...
cdxr/haskell-tooty
Graphics/Tooty.hs
Haskell
bsd-3-clause
1,217
-- | -- Module : Text.PrettyPrint.Mainland -- Copyright : (c) Harvard University 2006-2011 -- (c) Geoffrey Mainland 2011-2012 -- License : BSD-style -- Maintainer : mainland@eecs.harvard.edu -- -- Stability : provisional -- Portability : portable -- -- This module is based on /A Prett...
flowbox-public/mainland-pretty
Text/PrettyPrint/Mainland.hs
Haskell
bsd-3-clause
27,921
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Optimization.Quantified -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Test suite for optimization iwth quantifiers ----------...
josefs/sbv
SBVTestSuite/TestSuite/Optimization/Quantified.hs
Haskell
bsd-3-clause
2,532
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Tray icon with configurable popup menu that uses wxWidgets as -- a backend. -- Copyright: (c) 2015 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability:...
trskop/toolbox-tray-icon
src/WxMain.hs
Haskell
bsd-3-clause
4,019
{-# OPTIONS -fglasgow-exts #-} -- -- Copyright (C) 2004-5 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of th...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/src/System/Plugins/Load.hs
Haskell
bsd-3-clause
25,431
-- | Definitions of kinds of factions present in a game, both human -- and computer-controlled. module Content.FactionKind ( -- * Group name patterns pattern EXPLORER_REPRESENTATIVE, pattern EXPLORER_SHORT, pattern EXPLORER_NO_ESCAPE, pattern EXPLORER_MEDIUM, pattern EXPLORER_TRAPPED, pattern EXPLORER_AUTOMATED, ...
LambdaHack/LambdaHack
GameDefinition/Content/FactionKind.hs
Haskell
bsd-3-clause
15,238
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Test cases for Data.DHT.Type.Result module. -- Copyright: (c) 2015 Jan Šipr, Matej Kollár; 2015-2016 Peter Trško -- License: BSD3 -- -- Stability: stable -- Porta...
FPBrno/dht-api
test/TestCase/Data/DHT/Type/Result.hs
Haskell
bsd-3-clause
2,153
{-# LANGUAGE CPP #-} module Main where import System.Posix.Internals (c_read, c_open, c_close, c_write, o_RDWR, o_CREAT, o_NONBLOCK) import Foreign.C.String import Foreign.Marshal.Alloc import Control.Monad import Control.Concurrent.Async (forConcurrently_) import System.Environment import Data.Bits #if defined(mingw3...
winterland1989/stdio
bench/diskIO/UnSafeFFI.hs
Haskell
bsd-3-clause
1,537
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} -- NonZero4aryRandomAccessList module PFDS.Sec9.Ex18 where import Data.Vector (Vector, (!?), (//)) import qualified Data.Vector as V import PFDS.Commons.RandomAccessList import Prelude ...
matonix/pfds
src/PFDS/Sec9/Ex18.hs
Haskell
bsd-3-clause
2,474
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : -- Copyright : (c) 2012 Boyun Tang -- License : BSD-style -- Maintainer : tangboyun@hotmail.com -- Stability : experimental -- Portability : ghc -- -- -- ----------------------------------...
tangboyun/bio-seq-gb
Bio/Sequence/GB/Types.hs
Haskell
bsd-3-clause
8,871
{-# LANGUAGE PatternGuards, TypeSynonymInstances, CPP #-} module IRTS.Compiler where import IRTS.Lang import IRTS.Defunctionalise import IRTS.Simplified import IRTS.CodegenCommon import IRTS.CodegenC import IRTS.CodegenJava import IRTS.DumpBC import IRTS.CodegenJavaScript #ifdef IDRIS_LLVM import IRTS.CodegenLLVM #el...
ctford/Idris-Elba-dev
src/IRTS/Compiler.hs
Haskell
bsd-3-clause
16,544
{-# LANGUAGE OverloadedStrings #-} import EditRope import Criterion.Main import TestHelper main :: IO () main = do let toTest = renderTokensForLine attrMap defaultMain [ bgroup "renderTokensForLine" [ bench "original line" $ whnf (toTest []) lineABC , bench "l...
clojj/hsedit
test/Criterion.hs
Haskell
bsd-3-clause
568
{-# OPTIONS_GHC -fno-warn-orphans #-} module Numeric.Natural.QuickCheck where import Numeric.Natural import Test.QuickCheck (Arbitrary, arbitrary, CoArbitrary, coarbitrary, suchThat, variant) import Control.Applicative ((<$>)) instance Arbitrary Natural where arbitrary = fromInteger <$> (arbitrary `suchThat` (0 <...
kmyk/proof-haskell
Numeric/Natural/QuickCheck.hs
Haskell
mit
386
module API.RequestSpec (spec) where import Universum import Data.Either (isLeft) import Formatting (build, sformat) import Test.Hspec import Cardano.Wallet.API.Request.Filter import Cardano.Wallet.API.Request.Sort import Cardano.Wallet.API.V1.Type...
input-output-hk/pos-haskell-prototype
wallet/test/unit/API/RequestSpec.hs
Haskell
mit
4,025
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {- | Module : Neovim.RPC.SocketReader Description : The component which reads RPC messages from the neovim instance Copyright : (c) Se...
lslah/nvim-hs
library/Neovim/RPC/SocketReader.hs
Haskell
apache-2.0
9,448
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TupleSections #-} -- | Ge...
juhp/stack
src/Stack/Coverage.hs
Haskell
bsd-3-clause
24,184
-- -- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- -- | client interface for sendi...
anchor/marquise
lib/Marquise/Client/Core.hs
Haskell
bsd-3-clause
10,352
{-# OPTIONS_GHC -Wall #-} module Optimize.Inline (inline) where import Control.Arrow (second, (***)) import Control.Monad (foldM) import qualified Data.List as List import qualified Data.Map as Map import AST.Expression.Optimized (Expr(..), Decider(..), Choice(..)) import qualified AST.Expression.Optimized as Opt imp...
mgold/Elm
src/Optimize/Inline.hs
Haskell
bsd-3-clause
7,028
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} module Text.Parsec.Indentation.Char where import Text.Parsec.Prim (ParsecT, mkPT, runParsecT, Stream(..), Consumed(..), Reply(..), State(..)) import Text.Parsec.Pos (so...
lambdageek/indentation
indentation-parsec/src/Text/Parsec/Indentation/Char.hs
Haskell
bsd-3-clause
1,980
y = f(x1) + g(Foo.x2)
mpickering/hlint-refactor
tests/examples/Bracket38.hs
Haskell
bsd-3-clause
22
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Vimus.Render ( Render , runRender , getWindowSize , addstr , addLine , chgat , withColor -- * exported to silence warnings , Environment (..) -- * exported for testing , fitToColumn ) where import Control.Applicative import Control.Monad.Reader...
haasn/vimus
src/Vimus/Render.hs
Haskell
mit
2,872
{-# LANGUAGE CPP, RecordWildCards, GADTs #-} module CmmLayoutStack ( cmmLayoutStack, setInfoTableStackMap ) where import StgCmmUtils ( callerSaveVolatileRegs ) -- XXX layering violation import StgCmmForeign ( saveThreadState, loadThreadState ) -- XXX layering violation import BasicTypes import Cmm im...
tjakway/ghcjvm
compiler/cmm/CmmLayoutStack.hs
Haskell
bsd-3-clause
42,312
module Main (main) where main :: IO () main = return ()
sonyandy/wart
tools/wartc.hs
Haskell
bsd-3-clause
57
{- (c) The University of Glasgow, 2004-2006 Module ~~~~~~~~~~ Simply the name of a module, represented as a FastString. These are Uniquable, hence we can build Maps with Modules as the keys. -} {-# LANGUAGE DeriveDataTypeable #-} module Module ( -- * The ModuleName type ModuleName, pprMo...
green-haskell/ghc
compiler/basicTypes/Module.hs
Haskell
bsd-3-clause
18,016
{-# LANGUAGE TemplateHaskell, TypeFamilies, DeriveDataTypeable, NamedFieldPuns #-} module Distribution.Server.Features.TarIndexCache.State ( TarIndexCache(..) , initialTarIndexCache , GetTarIndexCache(GetTarIndexCache) , ReplaceTarIndexCache(ReplaceTarIndexCache) , FindTarIndex(FindTarIndex) , SetTarIndex...
ocharles/hackage-server
Distribution/Server/Features/TarIndexCache/State.hs
Haskell
bsd-3-clause
2,048
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} module Yesod.Auth.Route...
pikajude/yesod
yesod-auth/Yesod/Auth/Routes.hs
Haskell
mit
582
{-# LANGUAGE OverloadedStrings #-} module System.Logging.Facade.Journald.Internal where import Data.HashMap.Strict import Data.Monoid import Data.String import qualified Data.Text.Encoding as Text import System.Logging.Facade.Types import Systemd.Journal l...
zalora/logging-facade-journald
src/System/Logging/Facade/Journald/Internal.hs
Haskell
mit
977
{-# htermination (^^) :: (Ratio Int) -> Int -> (Ratio Int) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_CARETCARET_3.hs
Haskell
mit
63
module RAE where import Blaze import Tree import Text.Printf import Data.Number.LogFloat (logFloat,fromLogFloat) import Data.List -- Pretty-print expressions showE :: State -> String showE (Node (SNode _ (DoubleDatum d)) [] _) = printf "%0.3f" d showE (Node (SNode _ (StringDatum s)) [] _) =...
othercriteria/blaze
RAE.hs
Haskell
mit
12,894
module HTML where import Text.Blaze.Html5 hiding (map) import qualified Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes import Data.List import DataTypes import Data.Monoid proof2html :: BinTree DecoratedSequent -> Html proof2html (Leaf lab s) = table $ do tr $ toHtml "" tr $ do td $ hr td ...
gianlucagiorgolo/glue-tp
HTML.hs
Haskell
mit
2,746
{-| Module : BreadU.Pages.Markup.Common.Utils Description : HTML markup utils. Stability : experimental Portability : POSIX HTML markup utils. -} module BreadU.Pages.Markup.Common.Utils where import Prelude hiding ( span, div ) import Data.Monoid (...
denisshevchenko/breadu.info
src/lib/BreadU/Pages/Markup/Common/Utils.hs
Haskell
mit
1,433
module LMH_Interpreter where import LMH_Lex import LMH_Parse import LMH_ExpType import LMH_TypeInference import LMH_Evaluator toString :: Type -> String toString (TypeVar str) = str toString (TypeConst str) = str toString (Arrow (TypeVar str, t)) = str ++ " -> " ++ (toString t) toString (Arrow (TypeConst str,...
jaanos/TPJ-2015-16
lmh/LMH_Interpreter.hs
Haskell
mit
2,531
{-# LANGUAGE DeriveGeneric #-} module Bce.RestTypes where import Bce.BlockChain import Bce.Hash import Bce.BlockChainSerialization import Bce.BlockChainHash import GHC.Generics import qualified Data.Set as Set import Data.Aeson hiding (json) data WalletBalance = WalletBalance { outputs :: Set.Set TxOut...
dehun/bce
src/Bce/RestTypes.hs
Haskell
mit
1,320
module PythagorianTriple54 where pythagoreanTriple :: Int -> [(Int, Int, Int)] pythagoreanTriple x = if x <= 0 then [] else do a <- [1..x] b <- [1..x] c <- [1..x] let a' = a^3 let b' = b^2 let c' = c^2 if a < b && (a' + b' == c') then "_" else [] return (a,b,c) main' :: IO () main' = do putStrLn "W...
raventid/coursera_learning
haskell/stepik/5.4pythagorian_triple.hs
Haskell
mit
441
{-# LANGUAGE TemplateHaskell #-} module Oczor.Parser.ParserState where import Oczor.Syntax.Operators import Control.Lens import Text.Megaparsec.Expr import Control.Monad.State import ClassyPrelude as C hiding (try) import Oczor.Syntax.Syntax import qualified Text.Megaparsec.String as Megaparsec type Parser = StateT Pa...
ptol/oczor
src/Oczor/Parser/ParserState.hs
Haskell
mit
946
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MessageChannel (js_newMessageChannel, newMessageChannel, js_getPort1, getPort1, js_getPort2, getPort2, MessageChannel, castToMessageChannel, gTypeMessageChannel) where import Prelude ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/MessageChannel.hs
Haskell
mit
2,189
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Language.PureScript.Binding.TH where import Co...
philopon/haskell-purescript-binding
Language/PureScript/Binding/TH.hs
Haskell
mit
10,545
data Type = T | S | O Type Type deriving Show splits :: [a] -> [([a],[a])] splits ts = zip (inits ts) (tails ts) inits :: [a] -> [[a]] inits [x] = [] inits (x:xs) = map (x:) ([]:inits xs) tails :: [a] -> [[a]] tails [x] = [] tails (x:xs) = xs : tails xs alltypes :: [Type] -> [Type] alltypes [t] = [t] alltypes ts =...
craynafinal/cs557_functional_languages
practice/week4/practice.hs
Haskell
mit
388
module Ch22.PodTypes where import Data.Text (Text) data Podcast = Podcast { castId :: Integer , castURL :: Text } deriving (Eq, Show, Read) data Episode = Episode { epId :: Integer , epCast :: Podcast , epURL :: Text , epDone :: Bool } deriving (...
futtetennista/IntroductionToFunctionalProgramming
RWH/src/Ch22/PodTypes.hs
Haskell
mit
336
{-# LANGUAGE NoMonomorphismRestriction #-} module Web.HBrowser.Scripting where import qualified Graphics.UI.Gtk.WebKit.WebView as Web import Web.HBrowser.WebMonad import Web.HBrowser.ViewContainer import Control.Monad.Reader import Control.Monad.Trans import Control.Exception import System.IO import System.IO.Error ...
Philonous/hbrowser
src/Web/HBrowser/Scripting.hs
Haskell
mit
975
module Model ( module Model.DB , module Model.Open , module Database.Persist ) where import Database.Persist import Model.DB import Model.Open
flipstone/glados
src/Model.hs
Haskell
mit
153
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -Wno-orphans #-} module Instances.Static where import GHC.Generics import Test.QuickCheck.Arbitrary.Generic import Test.QuickCheck.Instances() import Web.Facebook.Messenger ------------ -- STATIC -- ------------ deriving instance ...
Vlix/facebookmessenger
test/Instances/Static.hs
Haskell
mit
3,015
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Test.Quorums (quorums_tests) where import Hetcons.Hetcons_Exception ( Hetcons_Exception ) import Hetcons.Instances_Proof_of_Consensus () import Hetcons.Signed_Message ( Encodable ,encode ,Recursive_1a(recursive_1a_filled_in)...
isheff/hetcons
test/Test/Quorums.hs
Haskell
mit
11,892
-- | Framebuffers. You can render on them. -- -- If you come from the OpenGL world, for simplicity, we have combined the -- concept of draw buffers and color attachments. Nth color attachment is bound -- exactly to Nth draw buffer. Caramia only talks about draw buffers. -- -- <https://www.opengl.org/wiki/Framebuffer_Ob...
Noeda/caramia
src/Graphics/Caramia/Framebuffer.hs
Haskell
mit
11,943
module GiveYouAHead.Help ( helpInfo ) where import System.Environment(getProgName) import GiveYouAHead.Version(gyahver) helpInfo :: IO() helpInfo = getProgName >>= (putStrLn.unlines.helpAll) where helpAll pN = [ "\n", "GiveYouAHead\t\t...
Qinka/GiveYouAHead
lib/GiveYouAHead/Help.hs
Haskell
mit
1,978
{-# LANGUAGE OverloadedStrings #-} module CoinApi.Types.Period where import CoinApi.Types.Internal data Period = Period { period_id :: !Text , length_seconds :: !Int , length_months :: !Int , unit_count :: !Int , unit_name ...
coinapi/coinapi-sdk
data-api/haskell-rest/CoinApi/Types/Period.hs
Haskell
mit
877
module App where import Network.Wai import Network.Wai.Handler.Warp import Servant.Server -- import qualified Data.ByteString as B import Network.Wai.Middleware.RequestLogger import Greet import Handlers haskapi :: Application haskapi = serve haskApi handlers -- Run the server. -- -- 'run' comes from Network.Wai....
mooreniemi/haskapi
app.hs
Haskell
mit
413
{-# LANGUAGE TemplateHaskell, TypeOperators #-} module Object.Templates( makeName, makeObject ) where import Object.Letters import Object.Types import Prelude hiding ((.)) import Language.Haskell.TH import Language.Haskell.TH.Syntax import Data.Char import Data.Maybe -- | -- takes lower case 'foo' and makes -- ...
yokto/Object
Object/Templates.hs
Haskell
apache-2.0
3,482
import System.Random -- import Debug.Trace -- uncomment for tracing removeAt :: Int -> [a] -> (a, [a]) removeAt 1 (x:xs) = (x,xs) removeAt n (x:xs) = (a,x:b) where (a,b) = removeAt (n-1) xs rnd_select :: [a] -> Int -> IO [a] rnd_select _ 0 = return [] rnd_select [] _ = return [] rnd_select xs n = randomRIO(1, le...
alephnil/h99
23.hs
Haskell
apache-2.0
502
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ClusterNetworkList where import GHC.Generics import Data.Text import Openshift.Unversioned.ListMeta import Openshift.V1.ClusterNet...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ClusterNetworkList.hs
Haskell
apache-2.0
1,235
module Language.Livescript.Lexer ( lexeme , identifier , reserved , operator , reservedOp , charLiteral , stringLiteral , natural , integer , float , naturalOrFloat , decimal , hexadecimal , octal , symbol , whiteSpace , parens , braces , bra...
jystic/language-livescript
src/Language/Livescript/Lexer.hs
Haskell
apache-2.0
2,778
{- | Module : Codec.Goat.Util Description : Various utility functions Copyright : (c) Daniel Lovasko, 2016-2017 License : BSD3 Maintainer : Daniel Lovasko <daniel.lovasko@gmail.com> Stability : stable Portability : portable Various utility functions used throughout the codebase. -} module Codec.Goat.Ut...
lovasko/goat
src/Codec/Goat/Util.hs
Haskell
bsd-2-clause
2,857
{-# LANGUAGE CPP, MultiParamTypeClasses, OverloadedStrings #-} module HTIG.Session ( HSession(HSession) ) where import Control.Applicative ((<$>)) import Control.Monad (forM_, when) import Data.Binary (decodeFile, encodeFile) import Data.List (delete) import Data.Maybe (isJust) import System.Directory (doesFil...
nakamuray/htig
HTIG/Session.hs
Haskell
bsd-3-clause
6,853
module Str( Str, linesCR, S.stripPrefix, readFileUTF8, S.null, S.isPrefixOf, S.drop, S.span, S.length, S.toList, S.all, S.uncons, ugly, showLength ) where import qualified Foundation as S import qualified Foundation.String as S import qualified Foundation.IO as S import Data.Tuple.Extra type...
ndmitchell/weeder
str/Str-Foundation.hs
Haskell
bsd-3-clause
573
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} module Game where import Prelude hiding (lookup) import qualified Data.Map.Strict as M import Data.IORef import Data.Maybe import Control.Monad import Linear.V2 import Types lookup :: Ord k => M.Map k v -> k -> Maybe v lookup = flip M.lookup i...
korrix/Warcaby
Game.hs
Haskell
bsd-3-clause
4,198
-- | Main module to manipulate a git repository. module Data.Git( -- * Repository Git , gitRepoPath , openRepo , closeRepo , withRepo , findRepository -- * Most important question ...
Twinside/hit-simple
Data/Git.hs
Haskell
bsd-3-clause
1,730
module Program( toCProgram, ILProgram, ilProgram, ILFunction, ilFunc) where import Data.Map as M import CCodeGen import RPN import Syntax data ILProgram = Prog [ILFunction] [RecordDef] deriving (Show) ilProgram = Prog toCProgram :: ILProgram -> CProgram toCProgram (Prog funcs recDefs) = cPro...
dillonhuff/IntLang
src/Program.hs
Haskell
bsd-3-clause
1,730
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ViewPatterns, PatternSynonyms, RankNTypes #-} module Homework01 ( toDigits, toDigitsRev, myReverse, doubleEveryOther, sumDigits, sumList, sumDigitsFoldWorker, validate, checkSum, hanoi, ) where -- | Convert a number [like 1234] into a ...
jeyoor/haskell-learning-challenge
learn_haskell_github_courses/Cis194/src/Homework01.hs
Haskell
bsd-3-clause
3,336
module Candide.Server ( runCandideDaemon ) where import Control.Applicative import Control.Concurrent (threadDelay) import Control.Concurrent.Async import qualified Control.Concurrent.Async.Lifted as AL import Control.Concurrent.MVar import Control.Exc...
anchor/candide
lib/Candide/Server.hs
Haskell
bsd-3-clause
12,628
module Test4 ( DAbs , DAll(..) , DRecAll(..) , DRec(DRec) -- no fields , DSome(One, Two) , foo , bar ) where foo x = 1 :: Int bar y = 2 :: Int lam :: Int -> Int lam x = 2 * x data DAbs = NotExported data DAll = Me | AndMe data DRec = DRec { drNotExported :: Int } data DRecAll = DRecAll { drA :: Int,...
robinp/nemnem
tsrc/Test4.hs
Haskell
bsd-3-clause
383
{-# LANGUAGE ScopedTypeVariables #-} module Sort3Spec where import qualified Sort3 import Test.Hspec (Spec, hspec, describe, shouldSatisfy) import Test.Hspec.QuickCheck (prop) -- | Required for auto-discovery. spec :: Spec spec = describe "Sort3" $ do prop "sort3 sorts correctly" $ do \(triple :: (Int, ...
FranklinChen/twenty-four-days2015-of-hackage
test/Sort3Spec.hs
Haskell
bsd-3-clause
452
module Eval(eval) where import Syntax eval :: Expr -> Env -> Value eval (ELit (LInt n)) _ = VInt n eval (ELit (LBool b)) _ = VBool b eval (EOp op e1 e2) env = binop op e1 e2 env eval (EVar x) env = case lookupEnv x env of VThunk (EFix f e) env' -> eval (EFix f e) env' v -> v eval...
succzero/fino
src/Eval.hs
Haskell
bsd-3-clause
1,511
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, CPP #-} {- Note: [The need for Ar.hs] Building `-staticlib` required the presence of libtool, and was a such restricted to mach-o only. As libtool on macOS and gnu libtool are very different, there was no simple portable way to support this. libtool for stati...
sdiehl/ghc
compiler/main/Ar.hs
Haskell
bsd-3-clause
10,051
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module DataStore.QueueStore ( enqueue , dequeue , dequeueAll ) where import qualified Da...
bgwines/hueue
src/DataStore/QueueStore.hs
Haskell
bsd-3-clause
1,597
------------------------------------------------------------------------------- -- -- | Dynamic flags -- -- Most flags are dynamic flags, which means they can change from compilation -- to compilation using @OPTIONS_GHC@ pragmas, and in a multi-session GHC each -- session can be using different dynamic flags. Dynamic f...
ilyasergey/GHC-XAppFix
compiler/main/DynFlags.hs
Haskell
bsd-3-clause
111,305
module Test.Utils ( testProvider , (@=~?) , (?=~@) , (=~) ) where import qualified Data.Array.Repa as R import qualified Data.Vector.Generic as VG import qualified Data.Vector.Storable as VS import qualified Data.Vector.Unboxed as VU import qualified Test.Frame...
jstolarek/lattice-structure-hs
tests/Test/Utils.hs
Haskell
bsd-3-clause
2,737
module Main where import Data.Monoid input = ".^^.^^^..^.^..^.^^.^^^^.^^.^^...^..^...^^^..^^...^..^^^^^^..^.^^^..^.^^^^.^^^.^...^^^.^^.^^^.^.^^.^." isTrap "^^." = '^' -- Its left and center tiles are traps, but its right tile is not. isTrap ".^^" = '^' -- Its center and right tiles are traps, but its left ...
shapr/adventofcode2016
src/Eighteen/Main.hs
Haskell
bsd-3-clause
850
module PrefAttachment (runPrefAttachment) where import Graph import Data.List import System.Random import Test.QuickCheck import qualified Data.IntMap.Strict as Map runPrefAttachment :: Int -> IO ((Graph Int),Int) runPrefAttachment 1 = return ((createGraph 1),0) runPrefAttachment num = let graph = createGraph n...
jbddc/sdc-graph
src/PrefAttachment.hs
Haskell
bsd-3-clause
726
{- Euler discovered the remarkable quadratic formula: n^2 + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when n = 41, 41^2 + 41 + 41 is clearly divisible by 41. The incredib...
bgwines/project-euler
src/solved/problem27.hs
Haskell
bsd-3-clause
1,843
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE DeriveGeneric #-} module Main ( main ) where import GHC.Generics ( Generic ) import Criterion.Main import qualified Data.Binary as B import qualified Data.Serialize as S data SerializeMe a = SerializeMe [[(a,[a])]] [[(a,[a])]] [[(a,[a])]] [[(a,[a])]] [[(a,[a])]] [[(a,[a])]] ...
ghorn/binary-counterexample
src/Main.hs
Haskell
bsd-3-clause
855
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------ module Snap.Internal.Http.Server.Session ( httpSession ) where ----------------------------------------------------------------...
afcowie/new-snap-server
src/Snap/Internal/Http/Server/Session.hs
Haskell
bsd-3-clause
14,889
{-# LANGUAGE PackageImports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS -w #-} module Prelude (print, Base.Int) where import Fay.Types (Fay) import Fay.FFI import qualified "base" Prelude as Base import "base" Prelude ...
faylang/fay-prim
src/Prelude.hs
Haskell
bsd-3-clause
2,030
{-# LANGUAGE TemplateHaskell #-} module Main where import qualified Data.Map as M import Network import NetworkedGame.Packet import NetworkedGame.Server import Control.Concurrent import Control.Monad import Control.Lens import Data.Maybe import System.IO import System.Exit import AnimatedDangerzone.Types import Graphi...
glguy/animated-dangerzone
src/GlossClient.hs
Haskell
bsd-3-clause
4,792
-- Copyright (c) 2014 Eric McCorkle. 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...
emc2/compiler-misc
src/Control/Monad/SourceFiles/Class.hs
Haskell
bsd-3-clause
3,514
-- | Elliptic Curve Arithmetic. -- -- /WARNING:/ These functions are vulnerable to timing attacks. {-# LANGUAGE ScopedTypeVariables #-} module Crypto.ECC.Simple.Prim ( scalarGenerate , scalarFromInteger , pointAdd , pointDouble , pointBaseMul , pointMul , pointAddTwoMuls , pointFromInteg...
tekul/cryptonite
Crypto/ECC/Simple/Prim.hs
Haskell
bsd-3-clause
7,400
module Koan where allEnrolled :: Bool allEnrolled = False
Kheldar/hw-koans
koan/Koan.hs
Haskell
bsd-3-clause
59
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Mosaic -- Copyright : (c) 2009 Adam Vogt, 2007 James Webb -- License : BSD-style (see xmonad/LICENSE) --...
adinapoli/xmonad-contrib
XMonad/Layout/Mosaic.hs
Haskell
bsd-3-clause
7,814
module Options.OptimizationLevels where import Types optimizationLevelsOptions :: [Flag] optimizationLevelsOptions = [ flag { flagName = "-O0" , flagDescription = "Disable optimisations (default)" , flagType = DynamicFlag , flagReverse = "-O" } , flag { flagName = "-O, -O1" ...
siddhanathan/ghc
utils/mkUserGuidePart/Options/OptimizationLevels.hs
Haskell
bsd-3-clause
870
module T5385a where data T = Int ::: Int
urbanslug/ghc
testsuite/tests/rename/should_fail/T5385a.hs
Haskell
bsd-3-clause
42
import Data.List import Control.Applicative import Control.Arrow import Control.Monad import RankSelection type Matrix a = (Int->Int->a, Int, Int) -- The input is an matrix sorted in both row and column order -- This selects the kth smallest element. (0th is the smallest) selectMatrixRank :: Ord a => Int -> Matrix a ...
chaoxu/haskell-algorithm
MatrixRankSelection.hs
Haskell
mit
2,220
-- ------------------------------------------------------ -- -- Copyright © 2014 AlephCloud Systems, Inc. -- ------------------------------------------------------ -- {-# LANGUAGE CPP #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} ...
alephcloud/bayhac2014
src/BayHac2014/Cryptmail/Json/Instances.hs
Haskell
mit
6,101
{-# htermination min :: Int -> Int -> Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_min_5.hs
Haskell
mit
46
-- | Old compilers, will not compile with newer language changes. -- ======================================================================================= -- | First compiler turns everything into a dynamic type. Uses a lot of unnecessary -- | casting to work though. compileDyn :: DL.Exp -> StaticExp Dynamic compile...
plclub/cis670-16fa
projects/DynamicLang/src/OldCompilers.hs
Haskell
mit
4,098
module Main where import Game.Poker.Simple main :: IO () main = putStrLn "Hello World"
tobynet/java-poker
app/Main.hs
Haskell
mit
88
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE QuasiQuotes #-} {- | Module : Language.Egison.Math.Expr Licence : MIT This module defines the internal representation of mathematic objects such as polynominals, and som...
egison/egison
hs-src/Language/Egison/Math/Expr.hs
Haskell
mit
8,536