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 : Language.Core.Interpreter.Libraries.GHC.Real -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lopez@kmels.net -- Stability : stable -- -- -- Defines funct...
kmels/dart-haskell
src/Language/Core/Interpreter/Libraries/GHC/Real.hs
Haskell
bsd-3-clause
1,436
{-# LANGUAGE GADTs, NoMonoLocalBinds #-} -- Norman likes local bindings -- If this module lives on I'd like to get rid of the NoMonoLocalBinds -- extension in due course -- Todo: remove -fno-warn-warnings-deprecations {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} module CmmBuildInfoTables ( CAFSet, CAFEnv, ...
ekmett/ghc
compiler/cmm/CmmBuildInfoTables.hs
Haskell
bsd-3-clause
14,226
module PersistentPaint where import Rumpus import qualified Data.Sequence as Seq maxBlots = 1000 -- This paintbrush is persistent, via -- spawnPersistentEntity and sceneWatcherSaveEntity start :: Start start = do initialPosition <- getPosition setState (initialPosition, Seq.empty :: Seq EntityI...
lukexi/rumpus
pristine/Painting/PersistentPaint.hs
Haskell
bsd-3-clause
1,065
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureCubeMapArray -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Port...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureCubeMapArray.hs
Haskell
bsd-3-clause
970
{-| Module : Grammar.CFG.Random Description : Functions to randomly expand symbols and words according to a grammar. Copyright : (c) Davide Mancusi, 2017 License : BSD3 Maintainer : arekfu@gmail.com Stability : experimental Portability : POSIX This module contains the relevant tools to sample random word...
arekfu/grammar-haskell
src/Grammar/CFG/Random.hs
Haskell
bsd-3-clause
8,040
{-# LANGUAGE OverloadedStrings #-} module Config where import Control.Lens ((&), (.~), (^.)) import Data.Yaml (ParseException, decodeFileEither) import Filesystem.Path.CurrentOS (encodeString, fromText, parent, toText, ...
tpoulsen/generate-component
src/Config.hs
Haskell
bsd-3-clause
2,056
module Main where import qualified Data.Map.Strict as M import Data.Monoid import Data.List (delete) import Options.Applicative import qualified Sound.MIDI.File.Load as L import qualified Sound.MIDI.File.Save as S import qualified Sound.MIDI.Message.Channel as CM import qualified Sound.MIDI.Message.Channel.Voice as ...
jarmar/change-instrument
src/Main.hs
Haskell
bsd-3-clause
1,155
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveDataTypeable, OverlappingInstances, FlexibleContexts #-} -- The Timber compiler <timber-lang.org> -- -- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or with...
mattias-lundell/timber-llvm
src/Common.hs
Haskell
bsd-3-clause
26,557
import qualified Data.ByteString.Lazy as BL import Lib main :: IO () main = do putStrLn "read - this would fail with the output of relink1, but should work with the transformed pointers" serialized <- BL.readFile "serialized_transformed" print serialized unserialized <- unwrapFromBinary serialized putStrLn ...
michaxm/packman-exploration
app/NoTopLevelFunctions2.hs
Haskell
bsd-3-clause
341
{-# LANGUAGE JavaScriptFFI #-} module Famous.Components.Origin where import GHCJS.Types import GHCJS.Foreign import Famous.Core.Node import Famous.Components.Position data Origin_ a type Origin a = Position (Origin_ a) -- | Add a new Origin component to a node foreign import javascript unsafe "new window.famous.co...
manyoo/ghcjs-famous
src/Famous/Components/Origin.hs
Haskell
bsd-3-clause
412
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Parts ( Version(..), Parsable(..), Random(..), CipherSuite(..), HashAlgorithm(..), SignatureAlgorithm(..), parseSignatureAlgorithm, -- list1, whole, ByteStringM, runByteStringM, evalByteStringM, headBS, lenBodyToByteString, emptyBS,...
YoshikuniJujo/forest
subprojects/tls-analysis/client/Parts.hs
Haskell
bsd-3-clause
5,566
module Sim where import qualified Dummy as D import Message import Node import RoutingData import Utils import qualified Data.HashMap.Strict as HM import qualified Data.Text as T import Data.Time.Clock import System.Random idBits :: Int idBits = 10 idRange ...
semaj/hademlia
src/Sim.hs
Haskell
bsd-3-clause
2,990
module Language.C.Syntax.BinaryInstances where import Data.Binary import Language.C.Syntax.AST import Language.C.Syntax.Constants import Language.C.Syntax.Ops import Language.C.Syntax.ManualBinaryInstances instance (Binary a) => Binary (Language.C.Syntax.AST.CTranslationUnit a) where put (CTranslUnit a b) = put a >...
atomb/language-c-binary
Language/C/Syntax/BinaryInstances.hs
Haskell
bsd-3-clause
17,644
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.ViewportSwizzle -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabili...
haskell-opengl/OpenGLRaw
src/Graphics/GL/NV/ViewportSwizzle.hs
Haskell
bsd-3-clause
1,196
module Main where import Run main :: IO () main = runMain
nejla/auth-service
service/app/Main.hs
Haskell
bsd-3-clause
60
{-# LANGUAGE RankNTypes #-} module Abstract.Interfaces.Stack.Push ( StackPush (..), push, pushBatch, stackToPush ) where import qualified Abstract.Interfaces.Stack as S data StackPush m t = StackPush { _sPush :: S.Stack m t } stackToPush :: S.Stack m t -> StackPush m t stackToPush s = StackPush { _sPush = s ...
adarqui/Abstract-Interfaces
src/Abstract/Interfaces/Stack/Push.hs
Haskell
bsd-3-clause
533
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple -- Copyright : Isaac Jones 2003-2005 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This is the command line front end to the Simple build system. When given -- the ...
IreneKnapp/Faction
libfaction/Distribution/Simple.hs
Haskell
bsd-3-clause
28,933
-- 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 GADTs #-} {-# LANGUAGE NoRebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Ti...
facebookincubator/duckling
Duckling/Time/GA/Rules.hs
Haskell
bsd-3-clause
16,978
{-# LANGUAGE ImplicitParams #-} {-# LANGUAGE DoAndIfThenElse #-} ---------------------------------------------------------------------------- -- | -- Module : Language.Core.Interpreter.Acknowledge -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lope...
kmels/dart-haskell
src/Language/Core/Interpreter/Acknowledge.hs
Haskell
bsd-3-clause
4,932
{-# LANGUAGE PackageImports #-} import "ouch-web" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDela...
mkrauskopf/ouch-web
devel.hs
Haskell
bsd-3-clause
709
module Doukaku.DiceTest (tests) where import Distribution.TestSuite import Doukaku.TestHelper import qualified Doukaku.Dice as Dice tests :: IO [Test] tests = createTests $ newDoukakuTest { tsvPath = "test/Doukaku/dice.tsv" , solve = Dice.solve }
hiratara/doukaku-past-questions-advent-2013
test/Doukaku/DiceTest.hs
Haskell
bsd-3-clause
255
{-# LANGUAGE OverloadedStrings #-} module Network.Monitoring.Riemann ( module Network.Monitoring.Riemann.Types, module Data.Int, Client, makeClient, sendEvent, sendEvent' {-, sendEvent'-} ) where import Network.Monitoring.Riemann.Types import Data.Default import Data.Int imp...
telser/riemann-hs
src/Network/Monitoring/Riemann.hs
Haskell
mit
5,379
module Codec.Encryption.Historical.XOR.Analysis ( crack , crack_key_length ) where -- Module to Analyse import Codec.Encryption.Historical.XOR.Implementation import Codec.Encryption.Historical.Utilities.Histogram import Data.Ord import Data.List import Data.List.Split import Control.Arrow import qualified Data...
beni55/Historical-Cryptography
Codec/Encryption/Historical/XOR/Analysis.hs
Haskell
mit
1,672
module Command.TyProjection ( tyValue , tyEither , tyAddress , tyPublicKey , tyTxOut , tyAddrStakeDistr , tyFilePath , tyInt , tyWord , tyWord32 , tyByte , tySecond , tyBool , tyScriptVersion , tyCoin , tyCoi...
input-output-hk/pos-haskell-prototype
auxx/src/Command/TyProjection.hs
Haskell
mit
6,086
-- Unpack a tarball containing a Cabal package {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Distribution.Server.Packages.Unpack ( unpackPackage, unpackPackageRaw, ) where import qualified Codec.Archive.Tar as Tar import qualified Codec.Archive.Tar.Entry as Tar import qualified Codec.Archive.Tar.C...
haskell-infra/hackage-server
Distribution/Server/Packages/Unpack.hs
Haskell
bsd-3-clause
14,144
{-# OPTIONS_GHC -fglasgow-exts #-} {-# OPTIONS_GHC -fno-spec-constr-count #-} -- -- TODO: -- permute operations, which are fairly important for this algorithm, are currently -- all sequential module QSortPar (qsortPar) where import Data.Array.Parallel.Unlifted.Distributed import Data.Array.Parallel.Unlifted.Paral...
mainland/dph
icebox/examples/qsort/QSortPar.hs
Haskell
bsd-3-clause
1,777
module Language.Haskell.GhcMod.Debug (debugInfo, rootInfo) where import Control.Applicative ((<$>)) import Data.List (intercalate) import Data.Maybe (isJust, fromJust) import Language.Haskell.GhcMod.Convert import Language.Haskell.GhcMod.Monad import Language.Haskell.GhcMod.Types import Language.Haskell.GhcMod.Interna...
cabrera/ghc-mod
Language/Haskell/GhcMod/Debug.hs
Haskell
bsd-3-clause
1,569
import ChineseCheckers import Table import Test.QuickCheck import Haste.Graphics.Canvas newtype TableCoords = TableCoords (Table, Content, (Int,Int)) deriving (Show) newtype OnlyPiece = OnlyPiece Content deriving (Show) newtype TableCoords2 = TableCoords2 (Table, Content, (Int,Int)) deriving ...
DATx02-16-14/Hastings
test/Tests.hs
Haskell
bsd-3-clause
2,636
----------------------------------------------------------------------------- -- | -- Module : CppIfdef -- Copyright : 1999-2004 Malcolm Wallace -- Licence : LGPL -- -- Maintainer : Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk> -- Stability : experimental -- Portability : All -- -- Perform a cpp....
FranklinChen/hugs98-plus-Sep2006
cpphs/Language/Preprocessor/Cpphs/CppIfdef.hs
Haskell
bsd-3-clause
8,470
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAG...
music-suite/music-score
src/Music/Score/Meta/Title.hs
Haskell
bsd-3-clause
4,776
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Language.Nix.Identifier ( Identifier(..), ident, quote, needsQuoting ) where import Control.Lens import Data.Char import Data.Function ( on ) import Data.String import Distribution.Nixpkgs.Util.PrettyPrinting ( Pretty(..), text ) import Text.Regex.Posix -- | Identif...
spencerjanssen/cabal2nix
src/Language/Nix/Identifier.hs
Haskell
bsd-3-clause
2,554
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses #-} -- TypeOperators, TypeSynonymInstances, TypeFamilies module Distribution.Server.Util.NameIndex where import Data.Map (Map) import Data.Typeable (Typeable) import qualified Data.Map as Map impo...
mpickering/hackage-server
Distribution/Server/Util/NameIndex.hs
Haskell
bsd-3-clause
4,508
<?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="hr-HR"> <title>Port Scan | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
veggiespam/zap-extensions
addOns/zest/src/main/javahelp/org/zaproxy/zap/extension/zest/resources/help_hr_HR/helpset_hr_HR.hs
Haskell
apache-2.0
971
module FunIn2 where --The application of a function is replaced by the right-hand side of the definition, --with actual parameters replacing formals. --In this example, unfold 'addthree'. --This example aims to test unfolding a function defintion. main :: Int -> Int main = \x -> case x of 1 -> 1 + ma...
mpickering/HaRe
old/testing/unfoldDef/FunIn2_TokOut.hs
Haskell
bsd-3-clause
424
import Test.Cabal.Prelude import Data.Maybe main = cabalTest $ do withPackageDb $ do withSandbox $ do fails $ cabal "exec" ["my-executable"] cabal "install" [] -- The library should not be available outside the sandbox ghcPkg' "list" [] >>= assertOutputDoesNot...
mydaum/cabal
cabal-testsuite/PackageTests/Exec/sandbox-ghc-pkg.test.hs
Haskell
bsd-3-clause
506
module Foo where -- TODO: return a civilized error message about the line number with the -- problematic predicate application, instead of just a groan about safeZip -- failing. {-@ predicate Rng Lo V Hi = (Lo <= V && V < Hi) @-} {-@ type NNN a b = {v:[(a, b)] | 0 <= 0} @-} {-@ bog :: {v:Int | (Rng 0 10 11)} @-} bo...
mightymoose/liquidhaskell
tests/todo/aliasError.hs
Haskell
bsd-3-clause
399
module IdIn2 where {-To rename an identifier name, stop the cursor at any occurrence of the name, then input the new name in the mini-buffer, after that, select the 'rename' command from the 'Refactor' menu.-} --Any value variable name declared in this module can be renamed. --Rename local 'x' to 'x1' x=5 fo...
kmate/HaRe
test/testdata/Renaming/IdIn2.hs
Haskell
bsd-3-clause
390
{-# LANGUAGE CPP #-} import Control.Concurrent import Control.Exception import Foreign import System.IO (hFlush,stdout) #if __GLASGOW_HASKELL__ < 705 import Prelude hiding (catch) #endif -- !!! Try to get two threads into a knot depending on each other. -- This should result in the main thread being sent a NonTermi...
lukexi/ghc
testsuite/tests/concurrent/should_run/conc034.hs
Haskell
bsd-3-clause
1,140
-- A second test for trac #3001, which segfaults when compiled by -- GHC 6.10.1 and run with +RTS -hb. Most of the code is from the -- binary 0.4.4 package. {-# LANGUAGE CPP, FlexibleInstances, FlexibleContexts, MagicHash #-} module Main (main) where import Data.Monoid import Data.ByteString.Internal (inlinePerfor...
urbanslug/ghc
testsuite/tests/profiling/should_run/T3001-2.hs
Haskell
bsd-3-clause
8,019
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module Data.CBar where import Control.Lens hiding (to, each) impor...
tonyday567/trade
src/Data/CBar.hs
Haskell
mit
6,865
module Proteome.Test.DiagTest where import Hedgehog ((===)) import Path (Abs, Dir, Path, absdir, toFilePath) import Ribosome.Api.Buffer (currentBufferContent) import Ribosome.Test.Run (UnitTest) import Proteome.Data.Env (Env) import qualified Proteome.Data.Env as Env (configLog, mainProject) import Proteome.Data.Proj...
tek/proteome
packages/test/test/Proteome/Test/DiagTest.hs
Haskell
mit
1,559
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-} import Foreign import Foreign.C.Types import System.IO.Unsafe data CFoo foreign import ccall unsafe "foo_c.h foo_ctor" c_foo_ctor :: CInt -> IO (Ptr CFoo) data Foo = Foo !(Ptr CFoo) deriving (Eq, Ord, Show) newFoo :: Int -> Either String Foo newFoo x = u...
hnfmr/cpp-class-ffi
ffi.hs
Haskell
mit
1,026
-- https://www.fpcomplete.com/blog/2017/09/all-about-strictness {-# LANGUAGE BangPatterns #-} {- Run with: stack --resolver lts-8.6 ghc --package conduit-combinators --package deepseq -- StrictnessPlayground.hs -O2 ./StrictnessPlayground +RTS -s -} import Debug.Trace import Control.DeepSeq (NFData, rnf, deepseq, for...
futtetennista/IntroductionToFunctionalProgramming
src/StrictnessPlayground.hs
Haskell
mit
4,098
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DuplicateRecordFields #-} module Language.LSP.Types.DocumentSymbol where import Data.Aeson import Data.Aeson.TH import Data.Scientific import Data.Text (Text) import Lan...
wz1000/haskell-lsp
lsp-types/src/Language/LSP/Types/DocumentSymbol.hs
Haskell
mit
9,390
-- | Main module module Main where import Network.HTTP.Conduit import System.Environment (getArgs) import qualified Data.Text as T import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as L import Control.Monad.IO.Class (liftIO) import Text.Playlist import Control.Concurrent import Control.Monad...
DavidKlassen/haschup
src/Haschup.hs
Haskell
mit
1,135
----------------------------------------------------------------------------- -- -- Module : TypeNum.Test.Int -- Copyright : -- License : MIT -- -- Maintainer : - -- Stability : -- Portability : -- -- | -- ----------------------------------------------------------------------------- module TypeNum.Tes...
fehu/TypeNumerics
test/TypeNum/Test/Int.hs
Haskell
mit
5,791
{-# htermination (until :: (a -> MyBool) -> (a -> a) -> a -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil until0 x p f MyTrue = x; until0 x p f MyFalse = until p f (f x); until :: (a -> MyBool) -> (a -> a) -> a -> a; until p f x = until0 x p...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/until_1.hs
Haskell
mit
331
import System.Environment (getArgs) interactWith function inputFile outputFile = do input <- readFile inputFile writeFile outputFile (function input) main = mainWith myFunction where mainWith function = do args <- getArgs case args of [input, output] -> interactWith function inpu...
zhangjiji/real-world-haskell
ch4-interactWith.hs
Haskell
mit
418
module Main where import Test.HUnit (runTestTT, Test(TestList)) import Tests.IRC.Commands (respondTest) main :: IO () main = do _ <- runTestTT $ TestList [respondTest] return ()
jdiez17/HaskellHawk
test/Main.hs
Haskell
mit
191
module Lexer where import Text.Parsec.String (Parser) import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as Tok lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["+","*","-","/",";",",","<"] names = ["def","extern"] style = emptyDef { Tok.c...
TorosFanny/kaleidoscope
src/chapter3/Lexer.hs
Haskell
mit
722
{-# htermination max :: () -> () -> () #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_max_1.hs
Haskell
mit
43
module System.Random.PCG ( mkPCGGen , getPCGGen , newPCGGen , getPCGRandom ) where import System.CPUTime (getCPUTime) import Data.Time.Clock.POSIX (getPOSIXTime) import System.Random import System.Random.PCG.Internal import Data.IORef import System.IO.Unsafe ( unsafePerformIO ) {-# NOINLINE globalGen...
wmarvel/haskellrogue
src/System/Random/PCG.hs
Haskell
mit
849
module Vacchi.Fractals.Types where ------------------------------------------ -- config types (used in config.hs) ------------------------------------------ data Fractal = Fractal { fractal :: [IFS], -- IFS list scaleFactor :: Float, -- scaling factor iterations :: Int, -- number of iterations offsetX :: ...
evacchi/chaosgame
src/Vacchi/Fractals/Types.hs
Haskell
mit
2,207
-- | Author : John Allard -- | Date : Feb 5th 2016 -- | Class : CMPS 112 UCSC -- | I worked alone, no partners to list. -- | Homework #3 |-- import Data.Char import Data.List -- | 1. Suppose we have the following type of binary search trees with -- keys of type k and values of type v: data BST k v = Empty | ...
jhallard/WinterClasses16
CS112/hw/hw3/hw3.hs
Haskell
mit
2,208
module HandBrake.Encode ( AudioTracks(..), Chapters(..), EncodeDetails, EncodeRequest, Numbering(..) , Profile(..), SubtitleTracks( SubtitleTracks ), TwoPass(..) , audioEncoder, audios, chapters, details, encodeArgs, encodeRequest , encodeRequest1, input, name, numbering, options, outputDir, outputName , pro...
sixears/handbrake
src/HandBrake/Encode.hs
Haskell
mit
24,206
module Audit.Options ( Opts(..), fullOpts, module Options.Applicative.Extra ) where import Options.Applicative import Options.Applicative.Extra data Opts = Opts { cabalFile :: Maybe FilePath } deriving Show opts :: Parser Opts opts = Opts <$> optional (argument str ( metavar "FILE" ...
pikajude/cabal-audit
src/Audit/Options.hs
Haskell
mit
508
module Triangle (TriangleType(..), triangleType) where data TriangleType = Equilateral | Isosceles | Scalene | Illegal | Degenerate deriving (Eq, Show) triangleType :: Float -> Float -> Float -> TriangleType triangleType a b c ...
vaibhav276/exercism_haskell
triangle/src/Triangle.hs
Haskell
mit
713
main :: IO () main = do contents <- getContents putStrLn contents let myLines = lines contents mapM putStrLn myLines mainloop myLines return () mainloop :: [String] -> IO () mainloop contents@(x:xs) = do words x mapM putStrLn words if xs == [] then return () else mainloop xs
doylew/practice
haskell/readthenwrite.hs
Haskell
mit
315
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodeProto (RpcErrorCodeProto(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelu...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/RpcHeaderProtos/RpcResponseHeaderProto/RpcErrorCodeProto.hs
Haskell
mit
6,436
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-ondemandoptionsrequest.html module Stratosphere.ResourceProperties.EC2EC2FleetOnDemandOptionsReq...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2EC2FleetOnDemandOptionsRequest.hs
Haskell
mit
1,687
{-# LANGUAGE TemplateHaskell #-} module IFind.Config ( IFindConfig(..), FindFilters(..), UIColors(..), readConfFile ) where import Data.Aeson import Data.Aeson.Encode.Pretty import Data.Aeson.TH import Graphics.Vty.Attributes import System.Directory import System.Exit (exitFailure) import qualified Data.Byte...
andreyk0/ifind
IFind/Config.hs
Haskell
apache-2.0
3,744
-- Copyright (c) 2010 - Seweryn Dynerowicz -- 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 agree...
sdynerow/Semirings-Library
haskell/Algebra/Constructs/Lexicographic.hs
Haskell
apache-2.0
1,925
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {- Copyright 2018 The CodeWorld Authors. All rights reserved. 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://ww...
tgdavies/codeworld
codeworld-compiler/src/Compile.hs
Haskell
apache-2.0
8,890
{-# LANGUAGE TupleSections #-} {-# LANGUAGE BangPatterns #-} module Data.CRF.Chain1.Constrained.Intersect ( intersect ) where import qualified Data.Vector.Unboxed as U import Data.CRF.Chain1.Constrained.Dataset.Internal (Lb, AVec, unAVec) import Data.CRF.Chain1.Constrained.Model (FeatIx) -- | Assumption: both in...
kawu/crf-chain1-constrained
src/Data/CRF/Chain1/Constrained/Intersect.hs
Haskell
bsd-2-clause
2,352
{-# LANGUAGE OverloadedStrings #-} module RefTrack.OAI.Arxiv ( getRecord ) where import Control.Applicative import Control.Error import Data.Char (isSpace) import Data.Maybe import Data.Monoid import qualified Data.Text as T import ...
bgamari/reftrack
RefTrack/OAI/Arxiv.hs
Haskell
bsd-3-clause
2,516
{-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE...
pbrisbin/yesod-comments
Yesod/Comments/Storage.hs
Haskell
bsd-3-clause
3,542
module Anatomy.Debug where import Debug.Trace import Text.Show.Pretty debugging :: Bool debugging = False debug :: (Show a, Show b) => b -> a -> a debug s v | debugging = trace (prettyShow s ++ ": " ++ prettyShow v) v | otherwise = v dump :: (Monad m, Show a) => a -> m () dump x | debugging = trace (pr...
vito/atomo-anatomy
src/Anatomy/Debug.hs
Haskell
bsd-3-clause
429
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SGIS.TextureBorderClamp -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Port...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SGIS/TextureBorderClamp.hs
Haskell
bsd-3-clause
679
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Uninterpreted.Function -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Testsuite for Data.SBV.Examples.Uninterpreted.Function -...
josefs/sbv
SBVTestSuite/TestSuite/Uninterpreted/Function.hs
Haskell
bsd-3-clause
645
-- | -- Module: Graphics.LWGL.Vertex_P -- Copyright: (c) 2017 Patrik Sandahl -- Licence: BSD3 -- Maintainer: Patrik Sandahl <patrik.sandahl@gmail.com> -- Stability: experimental -- Portability: portable -- Language: Haskell2010 module Graphics.LWGL.Vertex_P ( Vertex (..) , makeVertexArrayObject ) where imp...
psandahl/light-weight-opengl
src/Graphics/LWGL/Vertex_P.hs
Haskell
bsd-3-clause
1,759
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module HaskellCI.Config.CopyFields where import HaskellCI.Prelude import qualified Distribution.Compat.CharParsing as C import qualified Distribution.Parsec as C import qualified Distribution.Pretty as C import quali...
hvr/multi-ghc-travis
src/HaskellCI/Config/CopyFields.hs
Haskell
bsd-3-clause
1,039
module Distribution.ArchLinux.Libalpm.Wrapper.Options where import Control.Monad.Reader import Distribution.ArchLinux.Libalpm.Wrapper.Types import Distribution.ArchLinux.Libalpm.Wrapper.Callbacks import Distribution.ArchLinux.Libalpm.Wrapper.Alpm type AlpmOptions = [AlpmOption] data AlpmOption = AlpmOption withAlp...
netvl/alpmhs
lib/Distribution/ArchLinux/Libalpm/Wrapper/Options.hs
Haskell
bsd-3-clause
841
import Data.List import Data.List.Split import Data.Ord flipLog (b:e) = (head e) * (log b) largestExponential xs = snd . maximum $ zip (map flipLog xs) [1..] main = readFile "099.txt" >>= print . largestExponential . map (map (read::String->Float) . (splitOn ",")) . lines
JacksonGariety/euler.hs
099.hs
Haskell
bsd-3-clause
274
module Main where import GraphDraw.TestFgl import Data.Graph.Inductive.Graph import Data.Graph.Inductive import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine import Data.List myGraph :: Gr [Char] () myGraph = mkGraph [(1, "A"), (2, "B"), (3, "C"), (4, "D"), (5, "E"), (6, "E"), (7, "E")] [(1...
prash471/GraphDraw
Main.hs
Haskell
bsd-3-clause
1,661
module Text.XML.YJSVG ( SVG(..), Position(..), Color(..), Transform(..), Font(..), FontWeight(..), showSVG, topleft, center, ) where import Text.XML.HaXml( AttValue(..), QName(..), Prolog(..), EncodingDecl(..), XMLDecl(..), SystemLiteral(..), PubidLiteral(..), ExternalID(..), DocTypeDecl(..), Misc(..), Element(....
YoshikuniJujo/yjsvg_haskell
src/Text/XML/YJSVG.hs
Haskell
bsd-3-clause
7,487
{-# LANGUAGE OverloadedStrings #-} module Redeux.DOM (module Redeux.DOM, DOM) where import Redeux.Core import Redeux.DOM.Core import Data.Text (Text) import qualified Data.Text as Text div_, span_, p_, a_, h1_, h2_, h3_ , section_, footer_, header_, strong_ , label_, ul_, li_ , button_ :: [AttrOrHandler g] -> ...
eborden/redeux
src/Redeux/DOM.hs
Haskell
bsd-3-clause
1,992
{-# LANGUAGE DeriveDataTypeable #-} module Missile where import Data.Data import Data.Typeable import Coordinate type Missile = String type Missiles = [String] data Speed = Speed { x :: Float, y :: Float } deriving (Data, Typeable, Show) data MissileLaunched = MissileLaunched { code :: String, speed :: Speed, pos ::...
timorantalaiho/pong11
src/Missile.hs
Haskell
bsd-3-clause
1,142
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} {-# LANGUAGE FlexibleInstances,Rank2Types, ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS -Wall #-} module PushdownAutomaton.State ( PDAState(PDAState), PDAStaten, initialStackn, initialPDAStaten, PDATransn, gcompile, t...
davidzhulijun/TAM
PushdownAutomaton/State.hs
Haskell
bsd-3-clause
2,717
----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2006 -- -- The purpose of this module is to transform an HsExpr into a CoreExpr which -- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the -- input HsExpr. We do this in the DsM monad...
nomeata/ghc
compiler/deSugar/DsMeta.hs
Haskell
bsd-3-clause
103,047
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} import Control.Monad import Control.Monad.Identity import Control.Monad.Trans import Reflex.Dom...
mightybyte/reflex-dom
test/prebuild.hs
Haskell
bsd-3-clause
5,028
{-| Module : Diplomacy.Occupation Description : Definition of Zone/ProvinceTarget occupation. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} module Diplomacy.Occupat...
avieth/diplomacy
Diplomacy/Occupation.hs
Haskell
bsd-3-clause
2,765
{-- snippet modifyMVar --} import Control.Concurrent (MVar, putMVar, takeMVar) import Control.Exception (block, catch, throw, unblock) import Prelude hiding (catch) -- use Control.Exception's version modifyMVar :: MVar a -> (a -> IO (a,b)) -> IO b modifyMVar m io = block $ do a <- takeMVar m (b,r) <- unbloc...
binesiyu/ifl
examples/ch24/ModifyMVar.hs
Haskell
mit
436
<?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="ja-JP"> <title>TLS デバッグ | ZAP拡張</title> <maps> <homeID>top</homeID> <mapref location="...
veggiespam/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_ja_JP/helpset_ja_JP.hs
Haskell
apache-2.0
1,000
module VarPtr where import Data.Var data Record = Record Int main = do v <- newVar $ Record 5 subscribeAndRead v $ \y -> case y of Record a -> putStrLn . show $ a set v $ Record 10
beni55/fay
tests/VarPtr.hs
Haskell
bsd-3-clause
195
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP, DeriveFunctor #-} module Unify ( -- Matching of types: -- the "tc" prefix indicates that matching always -- respects newtypes (rather than looking through them) tcMatchTy, tcUnifyTyWithTFs, tcMatchTys, tcMatchTyX, tcMatc...
AlexanderPankiv/ghc
compiler/types/Unify.hs
Haskell
bsd-3-clause
29,646
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Texturing.Specification -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : ...
IreneKnapp/direct-opengl
Graphics/Rendering/OpenGL/GL/Texturing/Specification.hs
Haskell
bsd-3-clause
15,581
{- data size display and parsing - - Copyright 2011 Joey Hess <id@joeyh.name> - - License: BSD-2-clause - - - And now a rant: - - In the beginning, we had powers of two, and they were good. - - Disk drive manufacturers noticed that some powers of two were - sorta close to some powers of ten, and that round...
avengerpenguin/propellor
src/Utility/DataUnits.hs
Haskell
bsd-2-clause
4,700
{-# LANGUAGE LambdaCase, RankNTypes, ScopedTypeVariables #-} module Stream.Folding.Prelude ( break , concats , cons , drop , lenumFrom , lenumFromStepN , lenumFromTo , lenumFromToStep , filter , filterM , foldl , iterate , iterateM , joinFold , map , map...
haskell-streaming/streaming
benchmarks/old/Stream/Folding/Prelude.hs
Haskell
bsd-3-clause
13,598
{-# LANGUAGE PackageImports #-} import "devel-example" DevelExample (develMain) main :: IO () main = develMain
s9gf4ult/yesod
yesod-bin/devel-example/app/devel.hs
Haskell
mit
112
<?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="sq-AL"> <title>Script Console</title> <maps> <homeID>top</homeID> <mapref location="map...
kingthorin/zap-extensions
addOns/scripts/src/main/javahelp/org/zaproxy/zap/extension/scripts/resources/help_sq_AL/helpset_sq_AL.hs
Haskell
apache-2.0
959
module X (x, D1(..), D2(..)) where data D1 = D { f :: D2 } -- deriving Show data D2 = A | B -- deriving Show x :: D1 x = D { f = A }
olsner/ghc
testsuite/tests/driver/recomp010/X1.hs
Haskell
bsd-3-clause
137
-- Test for trac #2956 module TH_sections where two :: Int two = $( [| (1 +) 1 |] ) three :: Int three = $( [| (+ 2) 1 |] )
urbanslug/ghc
testsuite/tests/th/TH_sections.hs
Haskell
bsd-3-clause
129
module Oczor.CodeGen.CodeGenJs where import Oczor.CodeGen.Utl codeGen :: Ast -> Doc codeGen = x where x = cata $ \case NoneF -> empty UniqObjectF {} -> text "{}" CodeF x -> text x NotEqualF x y -> sep [x, text "!=", y] EqualF x y -> sep [x, text "==", y] LitF value -> lit value IdentF n...
ptol/oczor
src/Oczor/CodeGen/CodeGenJs.hs
Haskell
mit
2,395
import Test.HUnit import Q11 import Q12 assertEqualIntList :: String -> [Int] -> [Int] -> Assertion assertEqualIntList = assertEqual test1 = TestCase (assertEqualIntList "decodeModified [] should be [] ." ([] ) (decodeModified [] )) test2 = TestCa...
cshung/MiscLab
Haskell99/q12.test.hs
Haskell
mit
1,227
------------------------------------------------------------------------------ -- | This module is where all the routes and handlers are defined for your -- site. The 'app' function is the initializer that combines everything -- together and is exported by this module. module Site (app) where -------------------------...
thorinii/oldtoby-server
main/src/Site.hs
Haskell
mit
1,005
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, PatternGuards #-} -- Copyright (c) 2004-6 Donald Bruce Stewart - http://www.cse.unsw.edu.au/~dons -- GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) -- | A Haskell evaluator for the pure part, using plugs module Plugin.Eval where import File (fin...
zeekay/lambdabot
Plugin/Eval.hs
Haskell
mit
8,059
module Assembler.Types where import Data.Word -- Constant is either an int or a label which resolves to an int type Label = String type Constant = Either Int Label type RegId = Word8 data Instr = Halt | Nop | Rrmovl RegId RegId | Irmovl RegId Constant | Rmmovl RegId ...
aufheben/Y86
Assembler/src/Assembler/Types.hs
Haskell
mit
1,097
module Vector2D where type Vector2D = (Double, Double) zero :: Vector2D zero = (0, 0) unit :: Vector2D unit = (1, 1) fromScalar :: Double -> Vector2D fromScalar scalar = (scalar, scalar) fromAngle :: Double -> Vector2D fromAngle angle = (cos angle, sin angle) magnitude :: Vector2D -> Double magnitude vector = sqrt...
jlturner/vector2d-haskell
Vector2D.hs
Haskell
mit
4,542
{-# LANGUAGE CPP, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Crypto.Nettle.Ciphers -- Copyright : (c) 2013 Stefan Bühler -- License : MIT-style (see the file COPYING) -- -- Maintainer : s...
stbuehler/haskell-nettle
src/Crypto/Nettle/Ciphers.hs
Haskell
mit
23,016
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Lib ( someFunc ) where import Reflex.Dom import Data.JSString () import GHCJS.Types import GUI.ChannelDrawer import GUI.Player import Data.Monoid someFunc :: IO () someFunc = mainWidget m...
simonvandel/tvheadend-frontend
src/Lib.hs
Haskell
mit
1,429