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 Glucose.Lexer.Location where import Data.Char import Glucose.Lexer.Char data Location = Location { codePoint, line, column :: Int } deriving (Eq, Ord) instance Show Location where show (Location cp line col) = show line ++ ":" ++ show col ++ "@" ++ show cp instance Read Location where readsPre...
sardonicpresence/glucose
src/Glucose/Lexer/Location.hs
Haskell
mit
1,364
module PayPal.Identity ( createIdentity , getIdentity ) where createIdentity = undefined getIdentity = undefined
AndrewRademacher/hs-paypal-rest
src/PayPal/Identity.hs
Haskell
mit
127
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE RecordWildCards #-} module W...
achirkin/qua-view
src/Widgets/Tabs/Reviews.hs
Haskell
mit
12,801
{-# LANGUAGE OverloadedStrings #-} module IRTS.CodegenGo (codegenGo) where import Control.Monad.Trans.State.Strict (State, evalState, gets) import Data.Char (isAlphaNum, ord) import Data.Int (Int64) import qualified Data.Map.Strict ...
Trundle/idris-go
src/IRTS/CodegenGo.hs
Haskell
mit
32,179
-- The solution of exercise 1.23 -- The `smallest-divisor` procedure shown at the start of this section does -- lots of needless testing: After it checks to see if the number is -- divisible by 2 there is no point in checking to see if it is divisible -- by any larger even numbers. This suggests that the values used fo...
perryleo/sicp
ch1/sicpc1e23.hs
Haskell
mit
4,498
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ImageStreamImage where import GHC.Generics import Data.Text import Kubernetes.V1.ObjectMeta import Openshift.V1.Image import quali...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ImageStreamImage.hs
Haskell
apache-2.0
1,233
{- Copyright 2020 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://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
google/codeworld
codeworld-prediction/src/CodeWorld/Prediction.hs
Haskell
apache-2.0
8,940
import Data.Char import Data.List import qualified Data.Vector.Unboxed as U insert_word :: [[Char]] -> [Char] -> [[Char]] insert_word (a:tail) word | a==word = [(a)] ++ tail | otherwise = [(a)] ++ insert_word tail word insert_word _ w = [(w)] find_word :: [[Char]] -> [Char] -> Bool find_word (a:tail) word | a==...
rybycy/HaskellStringSimilarity
projekt_extended.hs
Haskell
apache-2.0
5,465
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# ...
Javran/twitter-conduit
Web/Twitter/Conduit/Request/Internal.hs
Haskell
bsd-2-clause
3,530
{-# LANGUAGE DeriveGeneric, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} -- | Handling project configuration, types. -- module Distribution.Client.ProjectConfig.Types ( -- * Types for project config ProjectConfig(..), ProjectConfigBuildOnly(..), ProjectConfigShared(..), PackageConfig(..), ...
sopvop/cabal
cabal-install/Distribution/Client/ProjectConfig/Types.hs
Haskell
bsd-3-clause
16,126
-- 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 LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.AmountOfMon...
facebookincubator/duckling
Duckling/AmountOfMoney/EN/IE/Rules.hs
Haskell
bsd-3-clause
1,829
module Renkon.Command.List ( run ) where import ClassyPrelude import Control.Lens.Operators import Formatting import Renkon.Config import Renkon.Util import System.Directory (doesDirectoryExist) import System.FilePath (getSearchPath) import System.FilePath.Find as FilePath run :: Config -> Bool -> IO () run con...
kayhide/renkon
src/Renkon/Command/List.hs
Haskell
bsd-3-clause
2,202
{-# LANGUAGE CPP, DefaultSignatures, EmptyDataDecls, FlexibleInstances, FunctionalDependencies, KindSignatures, ScopedTypeVariables, TypeOperators, UndecidableInstances, ViewPatterns, NamedFieldPuns, FlexibleContexts, PatternGuards, RecordWildCards, DataKinds, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans ...
aelve/json-x
lib/Json/Internal/Generic.hs
Haskell
bsd-3-clause
27,487
{-# LANGUAGE TemplateHaskell #-} module Quid2Pkg (Quid2Pkg(..)) where -- import Types import Test.Data import qualified Types as T import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L ( ByteString ,unpack,pack) import Quid2.HRT.Class.Serialize as Class.Serialize -- import Class.Seria...
tittoassini/flat
benchmarks/PkgHRT.hs
Haskell
bsd-3-clause
871
module Problem61 where -- -- Problem 61: Cyclical figurate numbers -- -- Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers -- are all figurate (polygonal) numbers and are generated by the following formulae: -- -- Triangle P3,n=n(n+1)/2 1, 3, 6, 10, 15, ... -- Square P4,n=n^2 ...
c0deaddict/project-euler
src/Part2/Problem61.hs
Haskell
bsd-3-clause
2,434
module CardDeck ( Deck, createOrderedDeck, getCard, getCards ) where import Card import qualified Data.Vector as V type CardVector = V.Vector Card data Deck = Deck CardVector deriving Show getCard :: Deck -> Int -> Card getCard (Deck xs) n = xs V.! n getCards :: Deck -> [Card] getCards (Deck v) ...
fffej/HS-Poker
CardDeck.hs
Haskell
bsd-3-clause
525
module HudsonTest where import Text.ParserCombinators.Parsec import HudsonParser import Test.HUnit import HudsonPreproc (parseResult) param a b c = Just Param {ref = a, paramName = b, paramType = c} func a b c = Just FuncDecl {funcName = a, funcParams = b, funcCode = c} testParamSimple = "Simple param" ~: ...
jschaf/hudson-dev
src/Language/Hudson/HudsonTest.hs
Haskell
bsd-3-clause
1,314
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Numeral/ES/Rules.hs
Haskell
bsd-3-clause
8,586
{-# OPTIONS_GHC -fno-warn-orphans #-} module Ed25519 ( benchmarks -- :: IO [Benchmark] ) where import Criterion.Main import Crypto.Key import Crypto.Sign.Ed25519 import Control.DeepSeq import qualified Data.ByteString as B import Util ...
thoughtpolice/hs-nacl
benchmarks/Ed25519.hs
Haskell
bsd-3-clause
874
{-# LANGUAGE ScopedTypeVariables, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} module NestedPatMatch where import Data.Maybe import Language.XHaskell [xh| data Foo = Foo (Star Bar) deriving Show data Bar = Bar deriving Show f :: Foo -> Choice Foo () f (Foo (x :: Bar)) = Foo x f (Foo ...
luzhuomi/xhaskell
test/NestedPatMatch.hs
Haskell
bsd-3-clause
898
import Graphics.Efl.Simple import Control.Monad (when) import Paths_graphics_efl main :: IO () main = do initWindowingSystem engines <- getEngines putStrLn (show engines) let engine = if "opengl_x11" `elem` engines then Just "opengl_x11" else Nothing withDefaultWindow engine $ \ win ...
hsyl20/graphics-efl
examples/Simple.hs
Haskell
bsd-3-clause
6,156
------------------------------------------------------------------------ -- | -- Module : ALife.Creatur.Wain.AudioID.Experiment -- Copyright : (c) Amy de Buitléir 2012-2016 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- -- A data mi...
mhwombat/exp-audio-id-wains
src/ALife/Creatur/Wain/AudioID/Experiment.hs
Haskell
bsd-3-clause
20,431
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} module System.HFind.Expr.Eval ( Eval , EvalContext ,...
xcv-/pipes-find
src/System/HFind/Expr/Eval.hs
Haskell
mit
6,295
{-# LANGUAGE PatternGuards #-} module CPS.FromGHC where import CPS.Syntax hiding (Subst, renameIdBinder) import qualified GHC.Data as G import qualified GHC.Var as G import qualified GHC.Syntax as G import qualified GHC.Type as G import qualified GHC.Kind as G import GHC.Primitives import Name import Utilities -- F...
beni55/cps-core
CPS/FromGHC.hs
Haskell
bsd-3-clause
14,206
import Diagrams.Prelude hiding (doRender) import Diagrams.Backend.OpenGL import Diagrams.Backend.OpenGL.CmdLine main :: IO () main = do defaultMain d v1 :: R2 v1 = r2 (0,1) v2 :: R2 v2 = r2 (0.5,-0.5) p :: Path R2 p = pathFromTrail . closeTrail $ fromOffsets [v1,v2] p2_ :: Path R2 p2_ = pathFromTrail . closeTrai...
mbernat/diagrams-opengl
examples/polygons.hs
Haskell
bsd-3-clause
459
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE S...
simonmar/Haxl
tests/SleepDataSource.hs
Haskell
bsd-3-clause
1,179
{-# LANGUAGE CPP #-} module TcSimplify( simplifyInfer, pickQuantifiablePreds, growThetaTyVars, simplifyAmbiguityCheck, simplifyDefault, simplifyTop, simplifyInteractive, solveWantedsTcM, -- For Rules we need these twoo solveWanteds, runTcS ) where #include "H...
fmthoma/ghc
compiler/typecheck/TcSimplify.hs
Haskell
bsd-3-clause
77,037
{- This module handles generation of position independent code and dynamic-linking related issues for the native code generator. This depends both the architecture and OS, so we define it here instead of in one of the architecture specific modules. Things outside this module which are related to this: + ...
olsner/ghc
compiler/nativeGen/PIC.hs
Haskell
bsd-3-clause
34,518
<?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="sr-SP"> <title>GraalVM JavaScript</title> <maps> <homeID>graaljs</homeID> <mapref locat...
thc202/zap-extensions
addOns/graaljs/src/main/javahelp/help_sr_SP/helpset_sr_SP.hs
Haskell
apache-2.0
967
module OrphanInstancesClass (AClass(..)) where class AClass a where aClass :: a -> Int
niteria/haddock
html-test/src/OrphanInstancesClass.hs
Haskell
bsd-2-clause
90
{-# LANGUAGE OverloadedStrings #-} -- | BigTable benchmark implemented using Hamlet. -- {-# LANGUAGE QuasiQuotes #-} module Main where import Criterion.Main import Text.Hamlet import Numeric (showInt) import qualified Data.ByteString.Lazy as L import qualified Text.Blaze.Html.Renderer.Utf8 as Utf8 import Data.Monoid (...
ygale/yesod
yesod-core/bench/widget.hs
Haskell
mit
1,816
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Dzen -- Copyright : (c) glasser@mit.edu -- License : BSD -- -- Maintainer : glasser@mit.edu -- Stability : stable -- Portability : unportable -- -- Handy wrapper for dzen. Requires dzen >= 0.2....
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/Dzen.hs
Haskell
bsd-2-clause
6,457
import Test.Hspec import qualified YesodCoreTest main :: IO () main = hspec YesodCoreTest.specs
psibi/yesod
yesod-core/test/test.hs
Haskell
mit
97
{-# LANGUAGE GADTs #-} module Main where import Data.IORef data T a where Li:: Int -> T Int Lb:: Bool -> T Bool La:: a -> T a writeInt:: T a -> IORef a -> IO () writeInt v ref = case v of ~(Li x) -> writeIORef ref (1::Int) readBool:: T a -> IORef a -> IO () readBool v ref = case v of ...
ezyang/ghc
testsuite/tests/gadt/rw.hs
Haskell
bsd-3-clause
610
import Common main = print $ foldl (\acc x -> 10*acc + x) 0 $take 10 $ toDigits $ sum numbers numbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250,...
lekto/haskell
Project-Euler-Solutions/problem0013.hs
Haskell
mit
5,409
module U.Codebase.Sqlite.Patch.Format where import Data.Vector (Vector) import U.Codebase.Sqlite.DbId (HashId, ObjectId, PatchObjectId, TextId) import U.Codebase.Sqlite.Patch.Diff (LocalPatchDiff) import U.Codebase.Sqlite.Patch.Full (LocalPatch) import Data.ByteString (ByteString) data PatchFormat = Full PatchLocal...
unisonweb/platform
codebase2/codebase-sqlite/U/Codebase/Sqlite/Patch/Format.hs
Haskell
mit
648
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies #-} module Main where import Data.Bits import Data.Monoid import Control.Monad import Control.Exception import System.Socket import System.Socket.Family.Inet as Inet import System.Exit main :: IO () main = do t0001 t0002 t0003 t0001 :: IO () t0...
nh2/haskell-socket
tests/AddrInfo.hs
Haskell
mit
1,838
module Twelve where import Data.Char (toUpper) import Data.List (intersperse, unfoldr) notThe :: String -> Maybe String notThe w | w == "the" || w == "The" = Nothing | otherwise = Just w removeThe :: Maybe String -> String removeThe (Just x) = x removeThe Nothing = "a" replaceThe :: String -> String replaceThe s...
mudphone/HaskellBook
src/Twelve.hs
Haskell
mit
3,627
-- A tutorial on the universality and expressiveness of fold -- TODO: https://jeremykun.com/tag/foldr/ -- foldr -- f x acc fold :: (a -> b -> b) -> b -> [a] -> b fold f v [] = v fold f v (x:xs) = f x (fold f v xs) -- foldl f v (x:xs) = f (fold f v xs) x -- f acc n product = fold (*) 0 and = fold (&) True or = fold (...
Airtnp/Freshman_Simple_Haskell_Lib
Theoritical/Universal-fold.hs
Haskell
mit
2,945
module Countdown where data Op = Add | Sub | Mul | Div instance Show Op where show Add = "+" show Sub = "-" show Mul = "*" show Div = "/" valid :: Op -> Int -> Int -> Bool valid Add _ _ = True valid Sub x y = x > y valid Mul _ _ = True valid Div x y = x `mod` y == 0 apply :: Op -> Int -> Int -> Int appl...
brodyberg/LearnHaskell
CaesarCypher.hsproj/Countdown.hs
Haskell
mit
1,051
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables, StandaloneDeriving #-} module Eval where import Prelude hiding (id, exp) import qualified Prelude import Control.Lens hiding (reuses) import Data.Either (partitionEithers) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified D...
imccoy/utopia
src/Eval.hs
Haskell
mit
12,800
import Data.Tuple import Data.Maybe import Data.List.Extra import Data.Map (Map) import qualified Data.Map as M test1_map :: OrbitMap test1_map = mkMap [ "COM)B", "B)C", "C)D", "D)E", "E)F", "B)G", "G)H", "D)I", "E)J", "J)K", "K)L"] test2_map :: OrbitMap test2_map = mkMap [ "COM)B", "B)C", ...
wizzup/advent_of_code
2019/haskell/exe/Day06.hs
Haskell
mit
1,355
-- (220、284)、(1,184、1,210)、(2,620、2,924)、(5,020、5,564)、(6,232、6,368)、 -- import System.Environment amicable :: Int -> Int -> Bool amicable n m | sum(propDivis n) /= m = False | otherwise = sum(propDivis m) == n amicables :: Int -> [[Int]] amicables n = [[i,j]|i<-[4..n],j<-[i..min n (i*16`div`10)],amic...
yuto-matsum/contest-util-hs
src/Euler/021.hs
Haskell
mit
689
{- Copyright (c) 2008-2015 the Urho3D project. 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 use, copy, modify, merge, publis...
Teaspot-Studio/Urho3D-Haskell
app/sample06/Mover.hs
Haskell
mit
4,305
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Map import Control.Applicative import Control.Concurrent.Async import Control.Concurrent.MSem import Control.Concurrent.Timeout import Control.Monad.Catch import ...
gridaphobe/target
bench/MapCoverage.hs
Haskell
mit
14,904
-- Number-Star ladder -- https://www.codewars.com/kata/5631213916d70a0979000066 module Codewars.Kata.NumberStar where import Data.List(intercalate) pattern :: Int -> String pattern n = intercalate "\n" . ("1" :) . map (\i -> "1" ++ replicate (pred i) '*' ++ show i) $ [2..n]
gafiatulin/codewars
src/7 kyu/NumberStar.hs
Haskell
mit
278
module Language.Drasil.Format where -- | Possible formats for output data Format = TeX | Plain | HTML
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Format.hs
Haskell
bsd-2-clause
104
module Text.Tokenize.Util.String ( unHyphen ) where unHyphen :: String -> String unHyphen ('‑':'\n':xs) = unHyphen xs unHyphen (x:xs) = x : unHyphen xs unHyphen [] = []
kawu/tokenize
Text/Tokenize/Util/String.hs
Haskell
bsd-2-clause
172
-- Collztz sequences chain :: (Integral a) => a -> [a] chain 1 = [1] chain n | even n = n:chain (n `div` 2) | odd n = n:chain (n * 3 + 1) numLongChains :: Int numLongChains = length (filter (\xs -> length xs > 15) (map chain [1..100])) addThree :: (Num a) => a -> a -> a -> a addThree = \x -> \y -> \z -> x + y...
sharkspeed/dororis
languages/haskell/LYHGG/6-higher-order-functions/2-lambda.hs
Haskell
bsd-2-clause
388
{-# LANGUAGE PackageImports #-} -- {-# LANGUAGE PackageImports, FlexibleContexts, FlexibleInstances, UndecidableInstances, RankNTypes #-} -- , OverlappingInstances {- | Radix sort of lists, based on binary representation of * floats * Int<N> * Word<N> The lsd prefix is for Lea...
griba2001/haskell-binaryrep-radix-sort
Data/List/RadixSort/Base.hs
Haskell
bsd-2-clause
5,805
module Database.SqlServer.Create.PartitionFunction ( PartitionFunction ) where import Prelude hiding (Left, Right) import Database.SqlServer.Create.Identifier hiding (unwrap) import Database.SqlServer.Create.DataType import Database.SqlServer.Create.Value import Database.SqlServer.Create.Entity...
fffej/sql-server-gen
src/Database/SqlServer/Create/PartitionFunction.hs
Haskell
bsd-2-clause
2,086
module Main where import Prelude hiding (lookup) import Control.Concurrent import Control.DeepSeq import Control.Monad import Data.Binary.Put import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.IORef import System.Mem import Data.Disk.Swapper import Data.Disk.Swapper.Cac...
roman-smrz/swapper
test/test.hs
Haskell
bsd-2-clause
2,151
{-# LANGUAGE NoImplicitPrelude #-} module Bamboo.Plugin.Photo.View where import Bamboo.Plugin.Photo.Model import MPSUTF8 import Prelude hiding ((.), (>), (^), (/), id, div) import Text.XHtml.Strict hiding (select, sub, meta) id :: String -> HtmlAttr id = identifier div_id :: String -> Html -> Html div_id s = thedi...
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/View.hs
Haskell
bsd-3-clause
2,106
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- St...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs
Haskell
bsd-3-clause
12,502
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where #include "Foo.h" #ifdef FOO import Control.Applicative #endif import Control.BiFunctor import Control.Monad f :: Int -> Int -- ^ Some Haddock doc -- One line more f = (+ 3) g :: Int -> Int g = where
dan-t/hsimport
tests/goldenFiles/ModuleTest37.hs
Haskell
bsd-3-clause
289
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE...
jfischoff/hs-mitsuba
src/Mitsuba/Utils.hs
Haskell
bsd-3-clause
6,458
module Goblin.Workshop.Scheduler where import Control.Concurrent import Control.Concurrent.STM import Control.Monad import Goblin.Workshop.Types import Goblin.Workshop.Util import System.Log.Logger import Text.Printf newSchedulerBus :: STM (Schedul...
y-usuzumi/goblin-workshop
src/Goblin/Workshop/Scheduler.hs
Haskell
bsd-3-clause
1,894
module SecondFront.Config ( module SecondFront.Config.Defaults, module SecondFront.Config.Types )where import SecondFront.Config.Defaults import SecondFront.Config.Types
alcidesv/second-front
hs-src/SecondFront/Config.hs
Haskell
bsd-3-clause
190
{-# LANGUAGE PatternGuards, TypeSynonymInstances, CPP #-} module IRTS.Compiler(compile, generate) where import IRTS.Lang import IRTS.LangOpts import IRTS.Defunctionalise import IRTS.Simplified import IRTS.CodegenCommon import IRTS.CodegenC import IRTS.DumpBC import IRTS.CodegenJavaScript import IRTS.Inliner import IR...
rpglover64/Idris-dev
src/IRTS/Compiler.hs
Haskell
bsd-3-clause
26,376
module Main(main) where import PolyPaver.Invocation import Data.Ratio ((%)) main = defaultMain Problem { box = [(0,(409018325532672 % 579004697502343,9015995347763200 % 6369051672525773)),(1,(1 % 2,2 % 1))] ,theorem = thm } thm = Implies (Geq (Var 0) (Over (Over (Lit (1023 ...
michalkonecny/polypaver
examples/old/their_sqrt/their_sqrt_11.hs
Haskell
bsd-3-clause
1,018
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS -Wall #-} -- | -- Module ...
time-cube/time-cube
src/GHC/TypeLits/SigNat.hs
Haskell
bsd-3-clause
2,116
{- BlendEqn.hs (adapted from blendeqn.c which is (c) Silicon Graphics, Inc.) Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE Demonstrate the different blending functions available with th...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/BlendEqn.hs
Haskell
bsd-3-clause
3,007
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving #-} import System.IO import System.Linux.Input.Event import Control.Concurrent.STM import Control.Concurrent import Control.Lens import Control.Applicative import Data.Int import Data.Functor.Rep import Linear import Control.Monad (forever) import Control.Monad....
bgamari/navigate
Navigate.hs
Haskell
bsd-3-clause
6,750
-- 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. module Duckling.Time.IT.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Duck...
facebookincubator/duckling
tests/Duckling/Time/IT/Tests.hs
Haskell
bsd-3-clause
549
{-# LANGUAGE RecordWildCards #-} module Tronkell.Server.Server where import Tronkell.Server.Types as Server import Tronkell.Game.Types as Game import Tronkell.Types() import Tronkell.Game.Engine as Engine import qualified Tronkell.Utils as SUtils import qualified Tronkell.Network.Websockets as W import qualified Tron...
nilenso/tronkell
src/Tronkell/Server/Server.hs
Haskell
bsd-3-clause
9,308
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} -- | Resolving a build plan for a set of packages in a given Stack...
joozek78/stack
src/Stack/BuildPlan.hs
Haskell
bsd-3-clause
31,150
module Main where import System.Environment import System.Directory import Data.List import Lib main :: IO () main = getArgs >>= parseArgs parseArgs :: [String] -> IO () parseArgs [] = runDefault parseArgs [path] = processDirectory path parseArgs args = photoProcess args runDefault :: IO () runDefault = do putSt...
dominikmayer/photo-process
app/Main.hs
Haskell
bsd-3-clause
1,091
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Y.Buffer where import Control.Lens import Control.Lens.TH import Data.Default import Data.Group import Data.Monoid import qualified Data.Vector as V import qualified Y.String as S data Buffer = Buffer { _text :: S.YiString , _cursorP...
ethercrow/y
src/Y/Buffer.hs
Haskell
bsd-3-clause
2,078
module Parse.Helpers where import Prelude hiding (until) import Control.Applicative ((<$>),(<*>),(<*)) import Control.Monad (guard, join) import Control.Monad.State (State) import Data.Char (isUpper) import qualified Data.Map as Map import qualified Language.GLSL.Parser as GLP import qualified Language.GLSL.Syntax as ...
johnpmayer/elm-compiler
src/Parse/Helpers.hs
Haskell
bsd-3-clause
14,360
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -Wall #-} module Dhall.Import.Types where import Control.Exception (Exception) import Control.Monad.Trans.State.Strict (StateT) import Data.ByteString (ByteString) ...
Gabriel439/Haskell-Dhall-Library
dhall/src/Dhall/Import/Types.hs
Haskell
bsd-3-clause
8,562
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcInstDecls: Typechecking instance declarations -} {-# LANGUAGE CPP #-} module TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where #include "HsVersions.h" import HsSyn import TcBinds import TcTyClsDecls import TcClassDcl( ...
ghc-android/ghc
compiler/typecheck/TcInstDcls.hs
Haskell
bsd-3-clause
78,248
{-# LANGUAGE FunctionalDependencies #-} module Rachel.Types ( -- * Pretty printing Pretty (..) -- * Rachel values -- ** Primitive values , PrimitiveType (..) , RReal (..), RInteger (..) , RBool (..), RSound (..) -- ** All values , Value (..) -- * Expressions , Id , Exp (..) -- ...
Daniel-Diaz/rachel
Rachel/Types.hs
Haskell
bsd-3-clause
8,847
-- -- HTTP client for use with pipes -- -- Copyright © 2012-2013 Operational Dynamics Consulting, Pty Ltd -- -- 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 a BSD licence. -- {-# LANGUAGE Ov...
afcowie/pipes-http
tests/ActualSnippet.hs
Haskell
bsd-3-clause
1,203
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE ...
dmjio/miso
examples/haskell-miso.org/server/Main.hs
Haskell
bsd-3-clause
6,330
<?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>Replacer | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_zh_CN/helpset_zh_CN.hs
Haskell
apache-2.0
970
module Haskus.Tests.Common ( isBijective , isEquivalent , ArbitraryByteString (..) , ArbitraryByteStringNoNul (..) , ArbitraryBuffer (..) , ArbitraryBufferNoNul (..) ) where import Test.Tasty.QuickCheck as QC import qualified Data.ByteString as BS import Haskus.Format.Binary.Buffer -- | Ensure...
hsyl20/ViperVM
haskus-system/src/tests/Haskus/Tests/Common.hs
Haskell
bsd-3-clause
2,345
-- | -- Module : Crypto.PubKey.Ed25519 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Ed25519 support -- {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Crypto.PubKey.Ed25519...
tekul/cryptonite
Crypto/PubKey/Ed25519.hs
Haskell
bsd-3-clause
5,061
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} module Quoter (quote, quoteFile, quoteFileReload) where import Language.Haskell.TH.Syntax import Language.Haskell.TH.Quote (QuasiQuoter (..)) #ifdef TEST_COFFEE import Text.Coffee import Text.Coffee (coffeeSettings) import Text.Shakespeare (shakespeare...
fgaray/shakespeare
test/Quoter.hs
Haskell
mit
996
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- Determine which packages are already installed module Stack.Build.Installed ( InstalledMap , Installed (..) , GetI...
phadej/stack
src/Stack/Build/Installed.hs
Haskell
bsd-3-clause
11,896
----------------------------------------------------------------------------- -- -- GHCi's :ctags and :etags commands -- -- (c) The GHC Team 2005-2007 -- ----------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module GHCi.UI.Tags ( createCTagsWithLin...
sdiehl/ghc
ghc/GHCi/UI/Tags.hs
Haskell
bsd-3-clause
7,831
import Test.Cabal.Prelude main = setupTest $ do -- No cabal test because per-component is broken with it skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) withPackageDb $ do let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args) setup_install' ["mylib", "-...
mydaum/cabal
cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
Haskell
bsd-3-clause
899
----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- ------------------------------------------...
bergmark/purescript
psc-make/Main.hs
Haskell
mit
4,586
module Graphics.CG.Algorithms.PointInTriangle(pointInTriangle) where import Graphics.CG.Algorithms.Rotate import Graphics.CG.Primitives.Triangle import Graphics.Gloss.Data.Point pointInTriangle :: Point -> Triangle -> Bool pointInTriangle p (p1, p2, p3) = (c1 >= 0 && c2 >= 0 && c3 >= 0) ...
jagajaga/CG-Haskell
Graphics/CG/Algorithms/PointInTriangle.hs
Haskell
mit
497
{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds, PolyKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TemplateHaskell #-} module List where ...
vladfi1/hs-misc
List.hs
Haskell
mit
1,470
import Base.Scene import Base.Camera import Base.Image import SphereScene main = do save 500 500 5
burz/Rayzer
Rayzer.hs
Haskell
mit
106
module Main where import Parser import Environment import Eval import PrettyPrint import System.Environment import Text.PrettyPrint.ANSI.Leijen import System.Exit import System.Directory main :: IO () main = do args <- getArgs if null args then do putDoc $ red (text "Error") <> text ": yo...
kellino/TypeSystems
fullSimple/Main.hs
Haskell
mit
1,099
module Exploration.Logic.ManyValued where -- | A Many Valued logic is an algebraic -- | structure (m, (^), not, false), satisfying: -- (^) associative, commutative -- false neutral to (^) -- not (not x) = x -- x ^ (not false) = not false -- not (not x ^ y) ^ y = not (not y ^ x) ^ x c...
SamuelSchlesinger/Exploration
Exploration/Logic/ManyValued.hs
Haskell
mit
396
module Coins where import Data.Ord import Data.Set (Set) import qualified Data.Set as Set ---------------------------------------- type Coin = Integer data CoinSet = CoinSet { face :: Coin, count :: Integer } instance Show CoinSet where show (CoinSet face count) = show face ++ "x" ++ show count instance Eq C...
kirhgoff/haskell-sandbox
euler31/Coins.hs
Haskell
mit
629
{-# LANGUAGE TypeOperators , FlexibleContexts , TypeFamilies , UndecidableInstances #-} module Calculus.Connectives.Linear where import Calculus.Expr import Calculus.Connectives.Simple import Auxiliary.NameSource import Data.Functor import Control.Monad.State -- Simultaneous conjunction data SimConj f = SimConj ...
wowofbob/calculus
Calculus/Connectives/Linear.hs
Haskell
mit
3,367
module Jira.API.Authentication.KeyUtils where import Control.Applicative import Crypto.Types.PubKey.RSA (PrivateKey (..), PublicKey (..)) import Data.Maybe import OpenSSL.EVP.PKey (toKeyPair, toPublicKey) import OpenSSL.PEM (PemPasswordSupply (..), ...
dsmatter/jira-api
src/Jira/API/Authentication/KeyUtils.hs
Haskell
mit
1,275
module PutJson where import Data.List (intercalate) import SimpleJSON renderJValue :: JValue -> String renderJValue (JString s) = show s renderJValue (JNumber n) = show n renderJValue (JBool True) = "true" renderJValue (JBool False) = "false" renderJValue JNull = "null" renderJValue (JObject o) = "{" ...
EricYT/Haskell
src/real_haskell/chapter-5/PutJSON.hs
Haskell
apache-2.0
682
module Code30_Parity where import Code30_Loopless hiding (bop,wop) data Spider' = Node' (Bool,Bool) Int [Leg'] data Leg' = Dn' Spider' | Up' Spider' decorate :: Spider -> Spider' decorate (Node a legs) = node' a (map (mapLeg decorate) legs) mapLeg :: (Spider -> Spider') -...
sampou-org/pfad
Code/Code30_Parity.hs
Haskell
bsd-3-clause
1,164
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} -- | This module contains responses from Telegram Bot API module Web.Telegram.API.Bot.Responses ( -- * Types Response (..) , ResponseParameters (..) , GetMeResp...
cblp/haskell-telegram-api
src/Web/Telegram/API/Bot/Responses.hs
Haskell
bsd-3-clause
3,059
module Graphics.UI.WX.Turtle.Move( -- * types Field, Coordinates(..), -- * process Field openField, closeField, waitField, topleft, center, coordinates, fieldSize, -- * draws forkField, flushField, clearLayer, clearCharacter, moveTurtle, -- * event oninputtext, onclick, onrelease, ondrag, onmo...
YoshikuniJujo/wxturtle
src/Graphics/UI/WX/Turtle/Move.hs
Haskell
bsd-3-clause
4,135
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} module Data.FAlgebra.Hole ( module Data.FAlgebra.Base , HoleF(..) , HoleM(..) ) where import Data.FAlgebra.Base import Data.Functor -- |Transform a functor to allow ...
bhamrick/fixalgs
Data/FAlgebra/Hole.hs
Haskell
bsd-3-clause
1,496
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Travis.Meta -- Description : Travis preprocessor -- Copyright : (c) Oleg Grenrus, 2005 -- License : BSD3 -- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi> module Travis.Meta ( -- * High level preprocessIO , preproc...
phadej/travis-meta-yaml
src/Travis/Meta.hs
Haskell
bsd-3-clause
7,438
-- | Helper for writing tests for numeric code module Test.QuickCheck.Numeric ( -- * Approximate equality eq , eqC -- * Function monotonicity , Monotonicity(..) , monotonicFunction , monotonicFunctionIEEE -- * Inverse function , checkInverse , checkInverse2 ) where import Data.Complex imp...
Shimuuar/quickcheck-numeric
Test/QuickCheck/Numeric.hs
Haskell
bsd-3-clause
4,416
{-# LANGUAGE GADTs, RankNTypes, TupleSections #-} module QnA4 where data Q1i data Q1o data Q2i data Q2o data Q3i data Q3o data Q4i data Q4o data Graph s a s' where Graph :: (s -> a) -> (s -> a -> s') -> Graph s a s' runGraph :: Graph s a s' -> s -> (a, s') runGraph (Graph f q) s = (f s, q s (f s)) (~:>) :: Grap...
homam/fsm-conversational-ui
src/QnA4.hs
Haskell
bsd-3-clause
2,065
{-# LANGUAGE NoImplicitPrelude #-} ------------------------------------------------------------------- -- | -- Module : Irreverent.Bitucket.Core.Data.Pipelines.SSHKeyPair -- Copyright : (C) 2017 - 2018 Irreverent Pixel Feats -- License : BSD-style (see the file /LICENSE.md) -- Maintainer : Dom De Re -- ...
irreverent-pixel-feats/bitbucket
bitbucket-core/src/Irreverent/Bitbucket/Core/Data/Pipelines/SSHKeyPair.hs
Haskell
bsd-3-clause
700
module System.IO.Jail.ByteString ( packCString , packCStringLen , useAsCString , useAsCStringLen , getLine , getContents , putStr , putStrLn , interact , readFile , writeFile , appendFile , hGetLine , hGetContents , hGet , hGetNonBlocking , hPut , hPutStr , hPutStrLn ) where import Prelude hiding (IO, getLine, getCont...
sebastiaanvisser/jail
src/System/IO/Jail/ByteString.hs
Haskell
bsd-3-clause
2,293