code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
{-# LANGUAGE CPP #-} module API.Question.GetQuestion.Url (url) where url :: String url = "/api/getQuestion"
DataStewardshipPortal/ds-wizard
DSServer/app/API/Question/GetQuestion/Url.hs
Haskell
apache-2.0
111
module Common where import Test.QuickCheck import SIL.TypeChecker import SIL class TestableIExpr a where getIExpr :: a -> IExpr data TestIExpr = TestIExpr IExpr data ValidTestIExpr = ValidTestIExpr TestIExpr data ZeroTypedTestIExpr = ZeroTypedTestIExpr TestIExpr data ArrowTypedTestIExpr = ArrowTypedTestIExpr T...
sfultong/stand-in-language
test/Common.hs
Haskell
apache-2.0
3,591
{-# LANGUAGE PackageImports #-} import "fun-w-yesod" 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 (threadD...
tomasherman/fun-w-yesod
devel.hs
Haskell
bsd-2-clause
705
{- path manipulation - - Copyright 2010-2014 Joey Hess <id@joeyh.name> - - License: BSD-2-clause -} {-# LANGUAGE PackageImports, CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} module Utility.Path where import Data.String.Utils import System.FilePath import Data.List import Data.Maybe import Data.Char import Control...
ArchiveTeam/glowing-computing-machine
src/Utility/Path.hs
Haskell
bsd-2-clause
10,692
module Args ( theLast , ljust , nonNegative , parseArgs , positive , printUsage ) where import Data.Monoid (Monoid(..), Last(..)) import System.Console.GetOpt (OptDescr, ArgOrder(Permute), getOpt, usageInfo) import System.Environment (getProgName) import System.Exit (ExitCode(..), exi...
tibbe/event
benchmarks/Args.hs
Haskell
bsd-2-clause
2,332
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@h...
mydaum/cabal
Cabal/Distribution/Simple/Haddock.hs
Haskell
bsd-3-clause
32,090
{-# LANGUAGE QuasiQuotes #-} module Huff ( huff, Spec, Domain(), Problem(), Literal(), Term(), module Huff ) where import Huff.Compile.AST (Problem,Term(..),Literal(..)) import Huff.Input (Spec,Domain,Operator(..)) import Huff.QQ (huff) import qualified Huff...
elliottt/huff
src/Huff.hs
Haskell
bsd-3-clause
913
{-# LANGUAGE NoImplicitPrelude , CPP , GADTs , FlexibleContexts , ScopedTypeVariables , KindSignatures , TypeFamilies , DeriveDataTypeable , TypeOperators #-} ----------------------------------------------------------------------...
timsears/species
Math/Combinatorics/Species/Enumerate.hs
Haskell
bsd-3-clause
18,320
module Language.Granule.Syntax.Preprocessor.Latex ( processGranuleLatex , unLatex ) where import Data.Char (isSpace) import Control.Arrow ((>>>)) data DocType = Latex | GranuleBlock -- | Extract @\begin{env}@ code blocks @\end{env}@ from tex files on a -- line-by-line basis, where @env@ is the name of th...
dorchard/gram_lang
frontend/src/Language/Granule/Syntax/Preprocessor/Latex.hs
Haskell
bsd-3-clause
1,907
{-# LANGUAGE OverloadedStrings #-} import Network.NetSpec import Network.NetSpec.Text -- Notice the restrictions NetSpec places on how you can communicate. -- Working within NetSpec isn't well-suited for all situations; -- it is specialized for situations where there is -- a deterministic sequence of communication....
DanBurton/netspec
examples/Chat.hs
Haskell
bsd-3-clause
826
------------------------------------------------------------------------------ -- | -- Maintainer : Ralf Laemmel, Joost Visser -- Stability : experimental -- Portability : portable -- -- This module is part of 'Sdf2Haskell', a tool for generating a set of -- Haskell data types from an SDF grammar. This module provide...
jkoppel/Strafunski-Sdf2Haskell
generator/SGLR.hs
Haskell
bsd-3-clause
4,290
{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} module Database.SQLFragment.Operators where -- standard import Data.Monoid import Data.List (intercalate) import Data.String import GHC.TypeLits -- third-party import Data.HList -- local import Database.SQLFragment.SQLFragment im...
maxigit/sql-fragment
src/Database/SQLFragment/Operators.hs
Haskell
bsd-3-clause
9,043
-- | TODO: Put some kind of a tutorial here module Sound.Fluidsynth ( module Sound.Fluidsynth.Audio , module Sound.Fluidsynth.Event , module Sound.Fluidsynth.Gen , module Sound.Fluidsynth.Log , module Sound.Fluidsynth.Midi , module Sound.Fluidsynth.Misc , module Sound.Fluidsynth.Settings , modul...
projedi/fluidsynth-hs-complete
src/Sound/Fluidsynth.hs
Haskell
bsd-3-clause
659
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, PatternGuards #-} {- A high level language of tactic composition, for building elaborators from a high level language into the core theory. This is our interface to proof construction, rather than ProofState, because this gives us a language to build der...
bkoropoff/Idris-dev
src/Idris/Core/Elaborate.hs
Haskell
bsd-3-clause
34,029
{-# LANGUAGE RecordWildCards, PolymorphicComponents, GADTs, TemplateHaskell #-} module Synthesis.Interface where import Control.Monad.ST import qualified Data.Map as Map import Data.Map (Map) import qualified Data.Set as Set import Data.Set (Set) import Control.Monad.State import Control.Arrow import Data.List as Lis...
termite2/synthesis
Synthesis/Interface.hs
Haskell
bsd-3-clause
18,474
module BoardSpec (spec) where import Control.Exception (evaluate) import Data.Function (on) import Data.List (nubBy, (\\)) import Test.Hspec import Test.QuickCheck import Board import Clues (clueAt) import Position (axis, positionsByColumn) import Tile (clueFor, isVoltorb, isOptional, isRequired) import ArrayGenerat...
jameshales/voltorb-flip
test/BoardSpec.hs
Haskell
bsd-3-clause
4,488
module Control.Monad.Extensions (satisfiesM,if') where import Control.Applicative (Applicative,liftA3) satisfiesM :: Monad m => (a -> Bool) -> m a -> m a satisfiesM p x = x >>= if' p return (const (satisfiesM p x)) if' :: Applicative f => f Bool -> f a -> f a -> f a if' = liftA3 (\ c t e -> if c then t else e)
bitemyapp/checkers
src/Control/Monad/Extensions.hs
Haskell
bsd-3-clause
315
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Plugins.MBox -- Copyright : (c) Jose A Ortega Ruiz -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability : unp...
apoikos/pkg-xmobar
src/Plugins/MBox.hs
Haskell
bsd-3-clause
3,906
module QuoteUtils ( compileQuote , compileSimpleQuoteBTCBuy , compileSimpleQuoteBTCSell , QuoteCompilation(..) , QCError(..) ) where import Control.Error import Control.Monad.IO.Class import Network.MtGoxAPI import Network.MtGoxAPI.DepthStore import qualified Data.Text as T import CommonTypes...
javgh/bridgewalker
src/QuoteUtils.hs
Haskell
bsd-3-clause
7,325
module Bamboo.Plugin.Photo.Util where import Bamboo.Plugin.Photo.Config import MPSUTF8 import Prelude hiding ((.), (>), (^), (/), id) import System.Directory mkdir :: String -> IO () mkdir = u2b > createDirectory show_data :: (Show a) => a -> String show_data = show > snake_case parse_boolean :: String -> Bool pars...
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/Util.hs
Haskell
bsd-3-clause
638
{-# LANGUAGE TemplateHaskell #-} module Game.GameLocalsT where import Control.Lens (makeLenses) import qualified Data.Vector as V import qualified Constants import Game.GClientT import Types makeLenses ''GameLocalsT newGameLocalsT :: GameLocalsT newGameLocalsT = GameLocalsT { _glH...
ksaveljev/hake-2
src/Game/GameLocalsT.hs
Haskell
bsd-3-clause
624
{-# LANGUAGE OverlappingInstances, FunctionalDependencies, ScopedTypeVariables, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances, FlexibleContexts, DeriveFunctor #-} {-# OPTIONS_HADDOCK hide #-} module Happstack.StaticRouting.Internal where import Happstack.Server(askRq, rqPaths, rqMethod, local...
carlssonia/happstack-static-routing
src/Happstack/StaticRouting/Internal.hs
Haskell
bsd-3-clause
8,603
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_KHR_format_feature_flags2" module Vulkan.Core13.Promoted_From_VK_KHR_format_feature_flags2 ( FormatProperties3(..) , StructureType(..) ...
expipiplus1/vulkan
src/Vulkan/Core13/Promoted_From_VK_KHR_format_feature_flags2.hs
Haskell
bsd-3-clause
4,812
{-# LANGUAGE OverloadedStrings #-} module Cataskell.Server.MessageTypesSpec (main, spec) where import Test.Hspec import Cataskell.Server.MessageTypes import Data.Aeson main :: IO () main = hspec spec spec :: Spec spec = parallel $ describe "Message types" $ do describe "AddUser" $ it "can be decoded from...
corajr/cataskell
test-server/Cataskell/Server/MessageTypesSpec.hs
Haskell
bsd-3-clause
1,128
module Utils where pkgToDir str = let xs = map (\c -> if c == '.' then '/' else c) str in "src/" ++ xs ++ "/"
robstewart57/ripl
src/Utils.hs
Haskell
bsd-3-clause
186
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE...
sdiehl/ghc
libraries/base/GHC/Generics.hs
Haskell
bsd-3-clause
54,675
{-# LANGUAGE Rank2Types, ScopedTypeVariables, FlexibleInstances, OverloadedStrings, TypeSynonymInstances, TypeOperators, GADTs #-} module Paskell.Syntax.Haskell where import Paskell.Expr import Paskell.EvalM import Control.Monad import Data.Maybe import System.IO.Unsafe import Control.Monad.Error import Control.Monad....
glutamate/paskell
Paskell/Syntax/Haskell.hs
Haskell
bsd-3-clause
6,071
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} -- #define DEBUG {-| Module : AERN2.Poly.Ball Description : Polynomial enclosures with large radii Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability :...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Poly/Ball.hs
Haskell
bsd-3-clause
10,071
module Paths ( vheDirStructure , cabalConfigLocation , getVirtualEnvironment ) where import System.FilePath ((</>)) import System.Directory (getCurrentDirectory) import System.Environment (getEnvironment) import Types import MyMonad -- returns record containing paths to all imp...
Paczesiowa/virthualenv
src/Paths.hs
Haskell
bsd-3-clause
1,935
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Zodiac.HttpClient.TSRP( authedHttpClientRequest , macHttpClientRequest , httpAuthHeader , httpClientKeyId , httpClientAuthHeader , verifyHttpClientRequest , verifyHttpClientRequest' ) where import Data.Time.Clock (...
ambiata/zodiac
zodiac-http-client/src/Zodiac/HttpClient/TSRP.hs
Haskell
bsd-3-clause
4,068
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE RankNTypes #-} module Test.Integration.Framework.DSL ( -- * Scenario scenario , xscenario , pendingWith , Scenarios , Context(..) -- * Steps , Setup(..) , setup , request...
input-output-hk/pos-haskell-prototype
wallet/test/integration/Test/Integration/Framework/DSL.hs
Haskell
mit
24,605
{-# LANGUAGE CPP, GADTs #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- This is a big module, but, i...
shlevy/ghc
compiler/nativeGen/PPC/CodeGen.hs
Haskell
bsd-3-clause
102,542
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Snap.Util.Proxy.Tests (tests) where ------------------------------------------------------------------------------ import Control.Monad.State.Strict (modify) import ...
snapframework/snap-core
test/Snap/Util/Proxy/Tests.hs
Haskell
bsd-3-clause
6,436
{-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2010 -- -- The Session type and related functionality -- -- ------------------------------------------------------------------------...
rahulmutt/ghcvm
compiler/Eta/Main/GhcMonad.hs
Haskell
bsd-3-clause
6,934
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RecordWildCards #-...
beni55/cryptol
src/Cryptol/ModuleSystem/Renamer.hs
Haskell
bsd-3-clause
21,636
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Stg to C-- code generation: the binding environment -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module StgCmmEnv ( CgIdInfo...
olsner/ghc
compiler/codeGen/StgCmmEnv.hs
Haskell
bsd-3-clause
6,443
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Data.List.NonEmpty -- Copyright : (C) 2011-2015 ...
da-x/ghc
libraries/base/Data/List/NonEmpty.hs
Haskell
bsd-3-clause
18,767
module Network.HTTP.UserAgent where import Control.Monad.Error import Data.ByteString.Lazy.Char8 ( ByteString ) import qualified Data.ByteString.Lazy.Char8 as BS import Network.HTTP import Network.URI import Data.Maybe ( maybe ) ----------------------------------------------------------------------------- defaultR...
beni55/HTTP
Network/HTTP/UserAgent.hs
Haskell
bsd-3-clause
2,287
module Options.Misc where import Types miscOptions :: [Flag] miscOptions = [ flag { flagName = "-jN" , flagDescription = "When compiling with :ghc-flag:`--make`, compile ⟨N⟩ modules in parallel." , flagType = DynamicFlag } , flag { flagName = "-fno-hi-version-check" ...
olsner/ghc
utils/mkUserGuidePart/Options/Misc.hs
Haskell
bsd-3-clause
1,602
-- parser produced by Happy Version 1.11 module PropParser (parse) where import PropSyntax import PropSyntaxUtil import ParseMonad import Lexer import LexUtil(readInteger, readRational) import ParseUtil --import Rewrite import IOExts import Char(showLitChar) data HappyAbsSyn = HappyTerminal Token | HappyErrorTo...
forste/haReFork
tools/property/parse/extras/PropParser.hs
Haskell
bsd-3-clause
240,488
module Main where import Test.Hspec import SpecHelper import Spec main :: IO () main = resetDb >> hspec spec
Drooids/postgrest
test/Main.hs
Haskell
mit
111
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Char -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : lib...
beni55/haste-compiler
libraries/ghc-7.10/base/Data/Char.hs
Haskell
bsd-3-clause
13,652
{-# LANGUAGE TemplateHaskell, GADTs #-} module T4188 where import Language.Haskell.TH import System.IO class C a where {} data T1 a where MkT1 :: a -> b -> T1 a data T2 a where MkT2 :: (C a, C b) => a -> b -> T2 a data T3 x where MkT3 :: (C x, C y) => x -> y -> T3 (x,y) $(do { dec1 <- reify ''T1 ; run...
oldmanmike/ghc
testsuite/tests/th/T4188.hs
Haskell
bsd-3-clause
525
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module DFS where import Prelude hiding (pred) import Data.List ((\\), sort) import GraphClass class (Node n, Ord n) => DFSNode n instance (Node n, Ord n) => DFSNode n dfs :: (Graph g n, DFSNode n) => (n -> Bool) -> g -> n -> [n] dfs pred gra...
shouya/thinking-dumps
graph/DFS.hs
Haskell
mit
929
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Selection.SelectMultiple ( -- * The SelectMultiple Widget SelectMultiple -- * Constructor , mkSelectM...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
Haskell
mit
2,254
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.YarnServerResourceManagerServiceProtos.RefreshUserToGroupsMappingsResponseProto (RefreshUserToGroupsMappingsResponseProto(..)) where import Prel...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/YarnServerResourceManagerServiceProtos/RefreshUserToGroupsMappingsResponseProto.hs
Haskell
mit
3,338
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.PopStateEvent (js_getState, getState, PopStateEvent, castToPopStateEvent, gTypePopStateEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, f...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/PopStateEvent.hs
Haskell
mit
1,315
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.String.TextArea ( -- * The TextArea Widget TextArea, -- * Constructor mkTextArea) where -- To keep `cabal repl` happy when running...
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
Haskell
mit
1,883
{-# htermination foldM :: (a -> b -> [] a) -> a -> [b] -> [] a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_foldM_1.hs
Haskell
mit
81
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -Wall #-} -- | Common web page input elements, often with bootstrap scaffolding. module Web.Rep.Html.Input ( Input (..), InputType (..), ) where import Data.Te...
tonyday567/lucid-page
src/Web/Rep/Html/Input.hs
Haskell
mit
7,932
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.DataCue (js_newDataCue, newDataCue, js_newDataCue', newDataCue', js_setData, setData, js_getData, getData, js_setValue, setValue, js_getValue, getValue, js_getType, getType, DataCue, castToD...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/DataCue.hs
Haskell
mit
3,658
{-# htermination (absRatio :: Ratio MyInt -> Ratio MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; data Ratio a = CnPc a a; primNegInt :: MyInt -> MyInt; pr...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/abs_1.hs
Haskell
mit
2,053
{-# LANGUAGE InstanceSigs #-} module RealWorld where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer import Data.Functor import Data.Monoid import Data.M...
alokpndy/haskell-learn
src/monads/monadThree.hs
Haskell
mit
6,949
module Physics.Scenes.FourBoxesTwoStatic where import Linear.Epsilon import Linear.V2 import Physics.Constraint import Physics.Contact import Physics.External import Physics.Geometry import Physics.Object import Physics.World import Physics.Scenes.Scene boxA :: (Fractional a, Eq a) => PhysicalObj a boxA = PhysicalObj...
ublubu/shapes-demo
src/Physics/Scenes/FourBoxesTwoStatic.hs
Haskell
mit
2,289
module Spear.Sys.Store.ID ( ID , IDStore , emptyIDStore , newID , freeID ) where import Data.Vector.Unboxed as U import Control.Monad.State -- test import Text.Printf -- test type ID = Int data IDStore = IDStore { assigned :: Vector Bool -- ^ A bit array indicating used IDs....
jeannekamikaze/Spear
Spear/Sys/Store/ID.hs
Haskell
mit
2,492
module SuperUserSpark.Check.TestUtils where import TestImport import SuperUserSpark.Bake.Gen () import SuperUserSpark.Bake.Types import SuperUserSpark.Check.Gen () import SuperUserSpark.Check.Internal import SuperUserSpark.Check.Types import SuperUserSpark.CoreTypes import SuperUserSpark.Diagnose.Types -- * Test uti...
NorfairKing/super-user-spark
test/SuperUserSpark/Check/TestUtils.hs
Haskell
mit
2,802
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.Math.Color( Color(..) , rgb , rgba , HasRComp(..) , HasGComp(..) , HasBComp(..) , HasAComp(..) , colorContext ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphics.Urho3D.Creatable ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Math/Color.hs
Haskell
mit
2,586
module Analys where import Tree import Data.List kLimited :: AttainTree -> Chip kLimited (AttainTree (Marking mark) _ subTr) = let curMax = maximum mark subTrMax = case subTr of Tree pairs -> if null pairs then Num 0 else ...
NickolayStorm/PetriNet
Analys.hs
Haskell
mit
5,468
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE TupleSections #-} -- |CSP example for "bring items to the other shore"-type of problems: -- Items i1,...,in are on one side of the shore and there's a boat -- with limited passenger size. The aim is to transport all items -- to the other side without leaving certain confl...
ombocomp/CSP
Algorithms/SimpleCSP/Examples/Wolf.hs
Haskell
mit
4,449
{-# LANGUAGE TemplateHaskell , LambdaCase , RankNTypes #-} module AppDefs where import Control.Lens import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.Either import Control.Concurrent.STM.TQueue import qualified Graphics.UI.GLFW as GLFW import qualified Grap...
blitzcode/rust-exp
hs-src/AppDefs.hs
Haskell
mit
2,210
-- import Control.Monad import Control.Exception import System.Directory (doesFileExist) import System.Environment import System.Exit import qualified Data.Text as T import qualified Data.List as List -- iff :: Bool -> a -> a -> a iff True x _ = x iff False _ y = y -- strings_join :: String -> [String] -> String str...
AoiKuiyuyou/AoikWinWhich-Haskell
src/aoikwinwhich/aoikwinwhich.hs
Haskell
mit
8,400
addStuff :: Int -> Int addStuff = do a <- (*2) b <- (+10) return (a+b) addStuff1 = (*2) >>= \a -> (+10) >>= \b -> return (a+b) {- (*2) >>= \a -> (+10) >>= \b -> return (a+b) == \w -> (\a -> (+10) >>= \b -> return (a+b)) (w*2) w == \w -> ((+10) >>= \b -> return (w*2+b)) w == \w -> (\w'...
egaburov/funstuff
Haskell/monads/monad1.hs
Haskell
apache-2.0
1,029
data List a = Nil | Cons a (List a) len xs = len' 0 xs len' acc xs = case xs of Nil -> acc Cons _ t -> len' (acc+1) t safe queen diag xs = case xs of Nil -> True Cons q t -> queen /= q && queen /= q + diag && queen /= q - diag && safe queen (diag + 1) t appendSafe k...
lpeterse/koka
test/medium/nqueens.hs
Haskell
apache-2.0
874
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE BangPatterns #-} module Haskell.Decode.Operations where import Data.Int (Int32,Int16) import qualified Prelude as P import Prelude hiding (Num(..),Ord(..)) import Data.Monoid (Monoid(..),(<>)) type famil...
ku-fpg/ldpc
src/LDPC/Decode/Operations.hs
Haskell
bsd-2-clause
4,590
module CLasH.Utils.Pretty (prettyShow, pprString, pprStringDebug, zEncodeString) where -- Standard imports import qualified Data.Map as Map import Text.PrettyPrint.HughesPJClass import Data.Char import Numeric -- GHC API import qualified CoreSyn import Outputable ( showSDoc, showSDocDebug, ppr, Outputable, Outputable...
christiaanb/clash
clash/CLasH/Utils/Pretty.hs
Haskell
bsd-3-clause
5,175
{-# LANGUAGE RankNTypes, ScopedTypeVariables, GADTs, EmptyDataDecls, PatternGuards, TypeFamilies, MultiParamTypeClasses #-} module Compiler.Hoopl.Dataflow ( DataflowLattice(..), JoinFun, OldFact(..), NewFact(..), Fact, mkFactBase , ChangeFlag(..), changeIf , FwdPass(..), FwdTransfer, mkFTransfer, mkFTransfer3, g...
ezyang/hoopl
src/Compiler/Hoopl/Dataflow.hs
Haskell
bsd-3-clause
36,430
-- 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 OverloadedStrings #-} module Duckling.Distance.FR.Corpus ( corpus ) where import Prelude import ...
facebookincubator/duckling
Duckling/Distance/FR/Corpus.hs
Haskell
bsd-3-clause
1,102
-- 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 Deri...
rfranek/duckling
Duckling/Volume/Types.hs
Haskell
bsd-3-clause
1,557
module Lib ( paletteThem ) where import Codec.Picture import System.Directory import Control.Monad import Data.List import qualified Data.ByteString.Lazy as B import System.Info dirSep :: String dirSep = if os == "linux" then "/" else "\\" isImage :: FilePath -> Bool isImage p = any (`isSuffixOf` p) formats ...
CharlesHD/Palettize
src/Lib.hs
Haskell
bsd-3-clause
3,099
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Distribution.Solver.Modular.Tree ( FailReason(..) , POption(..) , Tree(..) , TreeF(..) , Weight , ana , cata , dchoices , inn , innM , para , trav , zeroOrOneChoices ) where import Control.M...
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Tree.hs
Haskell
bsd-3-clause
7,333
{-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad import Pipes import Pipes.Serial import Data.Serialize import qualified Data.ByteString.Char8 as B import qualified HXStream.Native as HX import qualified Pipes.Prelude as P import LDrive.Types.Adc import LDrive.Types.Encoder import LDrive.Types...
sorki/odrive
client/app/Main.hs
Haskell
bsd-3-clause
5,189
triple x = tripleItYo x where tripleItYo :: Integer -> Integer tripleItYo y = y * 3
dhaneshkk/haskell-programming
localType.hs
Haskell
bsd-3-clause
94
{-# LANGUAGE OverloadedStrings #-} module Filesystem ( isXmlFile , isDotFile , isDirectory , isRegularFile , isSymbolicLink , isBlockDevice , isCharacterDevice , isNamedPipe ,...
dxtr/hagento
src/Filesystem.hs
Haskell
bsd-3-clause
2,695
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoMonoPatBinds #-} import Types import Data.Iso import Language.JsonGrammar import Prelude hiding (id, (.), head, either) import Control.Category import Data.Aeson (Object) import Test.Framework (Test, defaultMain) import Test.Framework.Pr...
MedeaMelana/JsonGrammar
tests/Tests.hs
Haskell
bsd-3-clause
1,130
{-# LANGUAGE BangPatterns , RankNTypes, GADTs, DataKinds #-} module Numerical.HBLAS.BLAS.Internal.Level1( AsumFun ,AxpyFun ,CopyFun ,NoScalarDotFun ,ScalarDotFun ,ComplexDotFun ,Nrm2Fun ,RotFun ,RotgFun ,RotmFun ,RotmgFun ,ScalFun ,SwapFun ,IamaxFun --,IaminFun ,asumAbstraction ,axpy...
yangjueji/hblas
src/Numerical/HBLAS/BLAS/Internal/Level1.hs
Haskell
bsd-3-clause
15,741
import Data.ByteString (ByteString) import Control.Monad (replicateM) import Data.List (unfoldr) -- From the 'entropy' package - for non-determinstic random bits. -- These values come from -- - RDRAND (when on an x86-64 system with said instruction and using new enough compilers) -- - /dev/urandom (when on a nix...
GaloisInc/hacrypto
src/Haskell/rand.hs
Haskell
bsd-3-clause
1,219
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureStorageMultisample -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ----...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureStorageMultisample.hs
Haskell
bsd-3-clause
700
module ErrMsg ( LogReader , setLogger , handleErrMsg ) where import Bag import Control.Applicative import Data.IORef import Data.Maybe import DynFlags import ErrUtils import GHC import qualified Gap import HscTypes import Outputable ---------------------------------------------------------------- type LogR...
johntyree/ghc-mod
ErrMsg.hs
Haskell
bsd-3-clause
1,919
{- EEL -- Extensible Experimental Language by Lukáš Kuklínek, 2013 -} module Main.REPL(repl) where import Parser.Parser import Parser.State import Parser.Dump import Parser.Core import Sema.Term import Sema.Infer import Backend.Emit import System.IO import Control.Applicative import Text.Parsec import Data....
iljakuklic/eel-proto
src/Main/REPL.hs
Haskell
bsd-3-clause
3,935
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} module RoundTripSpec (spec) where import Test.Hspec import Bound import Data.Aeson import Data.Default import Data.Map.Strict (fromList) import qualified Data.HashSet as HS import qualified Data.Vector as V import Pact.Types.RowData import Pact.Ty...
kadena-io/pact
tests/RoundTripSpec.hs
Haskell
bsd-3-clause
4,328
main = putStrLn "Dummy fixpoint.native"
gridaphobe/liquid-fixpoint
src/Ocaml.hs
Haskell
bsd-3-clause
40
module Main where import Trombone.Server main :: IO () main = runWithArgs
johanneshilden/principle
Main.hs
Haskell
bsd-3-clause
77
module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Auth import Yesod.Auth.BrowserId import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings....
Laquendi/memopad
Foundation.hs
Haskell
mit
6,292
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
sinjar666/fbthrift
thrift/compiler/test/fixtures/qualified/gen-hs/Module2_Types.hs
Haskell
apache-2.0
7,963
{-# LANGUAGE TemplateHaskell, RankNTypes, FlexibleContexts #-} {-| Pure functions for manipulating reservations of temporary objects NOTE: Reservations aren't released specifically, they're just all released at the end of a job. This could be improved in the future. -} {- Copyright (C) 2014 Google Inc. All rights ...
mbakke/ganeti
src/Ganeti/WConfd/TempRes.hs
Haskell
bsd-2-clause
19,053
{-# LANGUAGE BangPatterns #-} -------------------------------------------------------------------------------- -- | -- Module : Foreign.CUDA.Analysis.Occupancy -- Copyright : [2009..2014] Trevor L. McDonell -- License : BSD -- -- Occupancy calculations for CUDA kernels -- -- <http://developer.download.nvidia.com/c...
mwu-tow/cuda
Foreign/CUDA/Analysis/Occupancy.hs
Haskell
bsd-3-clause
8,068
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnBinds]{Renaming and dependency analysis of bindings} This module does renaming and dependency analysis on value bindings in the abstract syntax. It does {\em not} do cycle-checks on class or type-synonym declarations; those cannot be done at thi...
pparkkin/eta
compiler/ETA/Rename/RnBinds.hs
Haskell
bsd-3-clause
47,418
----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Disk -- Copyright : (c) 2010, 2011, 2012 Jose A Ortega Ruiz -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability :...
tsiliakis/xmobar
src/Plugins/Monitors/Disk.hs
Haskell
bsd-3-clause
6,056
module Core.Prelude where import Core.Data import Core.Syntax import Utilities lam :: Var -> Term -> Term lam = lambda int :: Integer -> Term int = literal . Int char :: Char -> Term char = literal . Char add :: Term -> Term -> Term add e1 e2 = primOp Add [e1, e2] nilDataCon, consDataCon :: DataCon nilDataCon...
batterseapower/chsc
Core/Prelude.hs
Haskell
bsd-3-clause
1,525
{-# language TypeInType, ScopedTypeVariables #-} module Silly where import Type.Reflection (Typeable, typeRep, TypeRep) import Type.Reflection.Unsafe (mkTrApp) import GHC.Exts (TYPE, RuntimeRep (..)) import Data.Kind (Type) mkTrFun :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep) (a :: TYPE r1) (b :: ...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T16627.hs
Haskell
bsd-3-clause
562
<?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="ko-KR"> <title>FuzzDB Files</title> <maps> <homeID>fuzzdb</homeID> <mapref location="ma...
thc202/zap-extensions
addOns/fuzzdb/src/main/javahelp/help_ko_KR/helpset_ko_KR.hs
Haskell
apache-2.0
960
-- Check that the record selector for maskMB unfolds in the body of f -- At one stage it didn't because the implicit unfolding looked too big -- #2581 module ShouldCompile where import Data.Array.Base data MBloom s a = MB { shiftMB :: {-# UNPACK #-} !Int , maskMB :: {-# UNPACK #-} !Int , bitArrayMB :: {...
sdiehl/ghc
testsuite/tests/eyeball/record1.hs
Haskell
bsd-3-clause
444
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving #-} module Distribution.Server.Features.Search.TermBag ( TermId, TermBag, size, fromList, elems, termCount, ) where import Distribution.Server.Framework.MemSize import qualified Data.Vector.Unboxed as Vec import qualified Data.Map as Map ...
mpickering/hackage-server
Distribution/Server/Features/Search/TermBag.hs
Haskell
bsd-3-clause
2,174
class Foo a where foo :: Int -> a data Emp = Emp String Int deriving (Eq, Show) data Tmp = Tmp String Int deriving (Eq, Show) instance Foo Emp where foo x = Emp "Permanent" x instance Foo Tmp where foo x = Tmp "Temporary" x test x y = if x == y then True e...
gitrookie/functionalcode
code/Haskell/retpoly.hs
Haskell
mit
472
{-# OPTIONS -Wall #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} import qualified Data.List as List import qualified Data.Map.Strict as Map import qualified Data.Maybe as Maybe import Data.Text (Text) import Helpers.Graph (Graph) import qualified Helpers.Graph as Graph import Helpers.Parse imp...
SamirTalwar/advent-of-code
2021/AOC_14_1.hs
Haskell
mit
1,226
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} module ProducerExample where import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) import Control.Exception (bracket) import Control.Monad (forM_) import Control.Monad.IO.Class (MonadIO(..)) import Data.ByteString (Byte...
haskell-works/kafka-client
example/ProducerExample.hs
Haskell
mit
3,229
module Main where import Test.QuickCheck import Test.QuickCheck.Gen (oneof) -- Trivial data Trivial = Trivial deriving (Eq, Show) trivialGen :: Gen Trivial trivialGen = return Trivial instance Arbitrary Trivial where arbitrary = trivialGen -- Identity data Identity a = Identity a deriving (Eq, Show) ins...
raventid/coursera_learning
haskell/chapter14/kicking-around-quickcheck/app/Main.hs
Haskell
mit
1,802
{- Inductive program synthesis : Agent training Author: Abdul Rahim Nizamani, ITIT, Gothenburg University, Sweden Started: 2013-09-29 Updated: 2013-09-29 -} {-# LANGUAGE DataKinds #-} module Main where import System.Environment (getArgs, getProgName) import Niz import Parsing import Data.Char import I...
arnizamani/occam
occam.hs
Haskell
mit
22,531
{-# LANGUAGE TypeFamilies, GADTs, CPP #-} module Database.Selda.Selectors ( Assignment ((:=)), Selector, Coalesce , (!), (?), with, ($=) , selectorIndex, unsafeSelector ) where import Database.Selda.SqlRow (SqlRow) import Database.Selda.SqlType import Database.Selda.Column import Data.List (foldl') import Unsaf...
valderman/selda
selda/src/Database/Selda/Selectors.hs
Haskell
mit
2,813
{-# LANGUAGE DeriveDataTypeable, CPP #-} import GetURL import TimeIt import Data.Either import Control.Monad import System.IO import Control.Concurrent hiding(forkFinally) import Control.Exception import Text.Printf import qualified Data.ByteString as B import Data.Typeable import Prelude hiding (catch) ...
Forec/learn
2017.3/Parallel Haskell/ch10/geturlscancel2.hs
Haskell
mit
1,569