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 ProjectEuler.Problem225 (solution225) where import Data.List takeUntilSubSeq :: Eq a => [a] -> [a] -> [a] takeUntilSubSeq _ [] = [] takeUntilSubSeq ss (x : xs) = if ss `isPrefixOf` xs then [x] else x : takeUntilSubSeq ss xs modTribs :: Integer -> [Integer] modTribs n = modTribs' 1 1 1 where modTri...
guillaume-nargeot/project-euler-haskell
src/ProjectEuler/Problem225.hs
Haskell
bsd-3-clause
641
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Test.Anemone.Foreign.Time where import Anemone.Foreign.Time import qualified Data...
ambiata/anemone
test/Test/Anemone/Foreign/Time.hs
Haskell
bsd-3-clause
2,203
{-# LANGUAGE BangPatterns #-} module PLY.Internal.StrictReplicate where import Data.Vector.Generic (Vector, fromList) import Data.Vector.Fusion.Bundle.Monadic (fromStream, toList) import Data.Vector.Fusion.Bundle.Size (Size(..)) import Data.Vector.Fusion.Stream.Monadic (Stream (..), Step(..)) -- | Yield a 'Stream' of ...
acowley/ply-loader
src/PLY/Internal/StrictReplicate.hs
Haskell
bsd-3-clause
1,137
module Language.Slice.Syntax.AST ( IncludeDelimiters(..) , Ident(..) , NsQualIdent(..) , SliceType(..) , SliceVal(..) , SliceDecl(..) -- , DefaultValue(..) , Annotation(..) , FieldDecl(..) , MethodDecl(..) , MethodOrFieldDecl(..) ) wher...
paulkoerbitz/language-slice
src/Language/Slice/Syntax/AST.hs
Haskell
bsd-3-clause
2,057
module Settings.Builders.Cabal (cabalBuilderArgs) where import Hadrian.Builder (getBuilderPath, needBuilder) import Hadrian.Haskell.Cabal import Builder import Context import Flavour import Packages import Settings.Builders.Common import qualified Settings.Builders.Common as S cabalBuilderArgs :: Args cabalBuilderAr...
sdiehl/ghc
hadrian/src/Settings/Builders/Cabal.hs
Haskell
bsd-3-clause
7,325
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -------------------------------------------------------...
haskell-distributed/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/Timer.hs
Haskell
bsd-3-clause
7,031
module LetLang.Parser ( expression , program , parseProgram ) where import Control.Monad (void) import Data.Maybe (fromMaybe) import LetLang.Data import Text.Megaparsec import Text.Megaparsec.Expr import qualified Text.Megaparsec.Lexer as L import...
li-zhirui/EoplLangs
src/LetLang/Parser.hs
Haskell
bsd-3-clause
5,590
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.Submap -- Copyright : (c) Jason Creighton <jcreigh@gmail.com> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Jason Creighton <jcreigh@gmail.com> -- Stability : unstable -- Portabili...
MasseR/xmonadcontrib
XMonad/Actions/Submap.hs
Haskell
bsd-3-clause
2,784
{-# LANGUAGE TemplateHaskell, GADTs #-} module Input where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.GADT.Compare.TH import Foreign.C.Types (CDouble(..)) import GHC.Float (float2Double) import qualified SFML.Window as SFML circleMass, circleRadius :: Num a => a circleMass = 10 circleRadius = 20 is...
Emmatipate/ava
src/Input.hs
Haskell
bsd-3-clause
3,140
module StringCompressorKata.Day1Spec (spec) where import Test.Hspec import StringCompressorKata.Day1 (compress) spec :: Spec spec = do it "compresses nothing to empty string" $ do compress Nothing `shouldBe` "" it "compresses empty string to empty string" $ do ...
Alex-Diez/haskell-tdd-kata
old-katas/test/StringCompressorKata/Day1Spec.hs
Haskell
bsd-3-clause
674
{-# LANGUAGE TypeFamilies #-} module QualifiedMethods where import qualified ExportListWildcards as ExportListWildcards import qualified DataFamilies as DataFamilies import OtherClass data Rodor = Rodor x :: ExportListWildcards.Foo x = ExportListWildcards.Foo1 instance ExportListWildcards.Bar Rodor where x Ro...
phischu/fragnix
tests/quick/QualifiedAssociates/QualifiedMethods.hs
Haskell
bsd-3-clause
413
{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Data.Type.BitRecords2.Writer.ByteStringBuilder where
sheyll/isobmff-builder
src/Data/Type/BitRecords2/Writer/ByteStringBuilder.hs
Haskell
bsd-3-clause
152
{-# LANGUAGE CPP, TypeFamilies #-} ----------------------------------------------------------------------------- -- -- Machine-dependent assembly language -- -- (c) The University of Glasgow 1993-2004 -- ----------------------------------------------------------------------------- module X86.Instr (Instr(..), Operand...
ezyang/ghc
compiler/nativeGen/X86/Instr.hs
Haskell
bsd-3-clause
40,860
-- -- -- ---------------- -- Exercise 6.9. ---------------- -- -- -- module E'6''9 where import E'6''8 ( rotate90 ) import Pictures ( Picture ) import Data.List ( transpose ) -- If picture is rectangular: rotate90anticlockwise :: Picture -> [[Char]] rotate90anticlockwise picture = reverse (transpose picture...
pascal-knodel/haskell-craft
_/links/E'6''9.hs
Haskell
mit
500
{-# LANGUAGE NoImplicitPrelude #-} module TallyHo.CountMinSketchC ( module TallyHo.CountMinSketch , countMinSketchC ) where import ClassyPrelude.Conduit import TallyHo.CountMinSketch countMinSketchC :: (PrimMonad m, Hashable a) => Int -> Int -> Sink a m (CountMinSketch a) countMinSketchC d wShift = do ss <- lif...
non/tallyho
src/main/haskell/TallyHo/CountMinSketchC.hs
Haskell
apache-2.0
402
module TypeInference1 where -- f x y=x+y+3 myConcat x = x ++ "yo" myMult x = (x/3)*5 myCom x = x > (length [1..10]) myAlph x = x < 'z' triple :: Int -> Int triple x = x * 3 x=5 -- y=x+5 -- w=y*10 -- x=5 -- y=x+5 -- f=4/y -- bigNum= (^)5 $ 10 -- a=(+) -- b=5 -- -- c=b 10 -- -- d=c 200 -- a=12+b -- b=10000*c...
punitrathore/haskell-first-principles
src/typeInference1.hs
Haskell
bsd-3-clause
433
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module Test.Basement.UTF8 ( tests ) where import Basement.Types.CharUTF8 import Foundation import Foundation.Check import Foun...
vincenthz/hs-foundation
foundation/tests/Test/Basement/UTF8.hs
Haskell
bsd-3-clause
436
module Misc where import Data.List import Data.Map (Map,keys,(!)) -- --------------------------------------------------------------------- -- List-related functions ---------------------------------------------- -- --------------------------------------------------------------------- -- A function that generates a s...
Booster2/Booster2
Workflow_Precond/impl_nondisjoint/Misc.hs
Haskell
bsd-3-clause
2,828
module Haskus.Apps.System.Build.GMP ( gmpMain ) where import Haskus.Apps.System.Build.Utils import Haskus.Utils.Flow import System.IO.Temp import System.Directory import System.FilePath gmpMain :: IO () gmpMain = do appDir <- getAppDir let usrDir = appDir </> "usr" gmpVer = "6.1.2" l...
hsyl20/ViperVM
haskus-system-build/src/apps/Haskus/Apps/System/Build/GMP.hs
Haskell
bsd-3-clause
1,484
import MatrixTree ; import SpAMM ; import System.Directory (removeFile) main = do testReadWrite ; testAdd ; testMultiply testReadWrite = do tree1 <- mmReadTree "Matrices/rect4arr.txt" mmWriteTree tree1 "coordinate" "Matrices/tempfile.txt" tree2 <- mmReadTree "Matrices/tempfile.tx...
FreeON/spammpack
src-Haskell/Testing/tests.hs
Haskell
bsd-3-clause
5,611
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/ByteString/Builder/Prim/Internal.hs" #-} {-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Copyright : 2010-2011 Simon Meier, 2010 Jasper van der Jeugt ...
phischu/fragnix
tests/packages/scotty/Data.ByteString.Builder.Prim.Internal.hs
Haskell
bsd-3-clause
8,685
-- 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 OverloadedStrings #-} module TestUtils ( makeTestEnv , expectRoundsWithEnv , expectRounds , expectFetches , testinput , id...
simonmar/Haxl
tests/TestUtils.hs
Haskell
bsd-3-clause
1,738
<?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="ru-RU"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
kingthorin/zap-extensions
addOns/browserView/src/main/javahelp/org/zaproxy/zap/extension/browserView/resources/help_ru_RU/helpset_ru_RU.hs
Haskell
apache-2.0
984
{-# OPTIONS_GHC -Werror -O #-} -- Add -O so the UNPACK has some effect module T3966 where data Foo a b = Foo {-# UNPACK #-} !(a -> b)
hvr/jhc
regress/tests/1_typecheck/4_fail/ghc/T3966.hs
Haskell
mit
136
{-| Module : Idris.Package.Common Description : Data structures common to all `iPKG` file formats. License : BSD3 Maintainer : The Idris Community. -} module Idris.Package.Common where import Idris.Core.TT (Name) import Idris.Imports import Idris.Options (Opt(..)) -- | Description of an Idris package. data ...
kojiromike/Idris-dev
src/Idris/Package/Common.hs
Haskell
bsd-3-clause
2,185
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1994-1998 UniqFM: Specialised finite maps, for things with @Uniques@. Basically, the things need to be in class @Uniquable@, and we use the @getUnique@ method to grab their @Uniques@. (A similar thing to @UniqSet@, as opposed to @Set@.)...
acowley/ghc
compiler/utils/UniqFM.hs
Haskell
bsd-3-clause
12,598
module Vectorise.Utils.Hoisting ( Inline(..) , addInlineArity , inlineMe , hoistBinding , hoistExpr , hoistVExpr , hoistPolyVExpr , takeHoisted ) where import Vectorise.Monad import Vectorise.Env import Vectorise.Vect import Vectorise.Utils.Poly import CoreSyn import CoreUtils import CoreUnfold imp...
tjakway/ghcjvm
compiler/vectorise/Vectorise/Utils/Hoisting.hs
Haskell
bsd-3-clause
2,850
<?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="sl-SI"> <title>WebSockets | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
ccgreen13/zap-extensions
src/org/zaproxy/zap/extension/websocket/resources/help_sl_SI/helpset_sl_SI.hs
Haskell
apache-2.0
972
{-# LANGUAGE ExtendedDefaultRules #-} module T11974b where default (Either, Monad, [], Maybe, Either Bool, Integer, Double, Blah) data Blah
ezyang/ghc
testsuite/tests/typecheck/should_fail/T11974b.hs
Haskell
bsd-3-clause
143
{-# LANGUAGE RankNTypes, GeneralizedNewtypeDeriving, ImpredicativeTypes #-} module Foo where class C a where op :: (forall b. b -> a) -> a newtype T x = MkT x deriving( C )
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T8565.hs
Haskell
bsd-3-clause
175
module Parse.Basics where import System.Environment import System.IO import Data.Char import Data.Maybe import Data.List import Data.Either import Control.Monad import Text.Megaparsec import Text.Megaparsec.Expr import Text.Megaparsec.String import qualified Text.Megaparsec.Lexer as L sc :: Parser () sc = L.space (vo...
akindle/hdlint
Parse/Basics.hs
Haskell
mit
3,077
module Ch22.PodMain where import Ch22.PodDownload (mkManager, downloadURL, updatePodcastFromFeed, getEpisode) import Ch21.PodDB (Podcast(..), Episode(..), addPodcast, getPodcasts, getEpisodes) import Ch22.PodParser (Feed(..), parse') import System.Environment (getArgs) import Network.Socket (withSocketsDo) import Netw...
futtetennista/IntroductionToFunctionalProgramming
RWH/src/Ch22/PodMain.hs
Haskell
mit
2,213
module Graphics.Urho3D.Resource.Internal.Cache( ResourceCache , resourceCacheCntx ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Context as C import qualified Language.C.Types as C import qualified Data.Map as Map data ResourceCache resourceCacheCntx :: C.Context resourc...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Resource/Internal/Cache.hs
Haskell
mit
446
module FrozenBeagle.Genes (length', DnaString(..)) where data DnaString a = DnaStringConstr [a] deriving (Show) length' :: DnaString a -> Int length' (DnaStringConstr xs) = length xs
satai/FrozenBeagleH
src/FrozenBeagle/Genes.hs
Haskell
mit
185
module Dotfiles.ConfigSpec where import System.Directory (getHomeDirectory, getTemporaryDirectory) import System.FilePath ((</>)) import Test.Hspec import Dotfiles import Dotfiles.Config import SpecHelper spec :: Spec spec = do describe "Dotfiles.Config" $ do around withEnv $ do it "covers default env" ...
ilya-yurtaev/hdotfiles
tests/Dotfiles/ConfigSpec.hs
Haskell
mit
830
{-# LANGUAGE OverloadedStrings #-} module Internal.SpockExt (serveFile, xml) where import Control.Monad.IO.Class (MonadIO) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import qualified Data.Text as T import qualified Data.Text.Encoding as T imp...
mayeranalytics/nanoPage
src/Internal/SpockExt.hs
Haskell
mit
897
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.Gallery.Gallery.Manual30 where import Diagrams.Prelude eff = text "F" <> square 1 # lw 0 example = eff <> reflectAbout (p2 (0.2,0.2)) (rotateBy (-1/10) unitX) eff
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual30.hs
Haskell
mit
240
module EitherMonadImplementation where data Sum a b = First a | Second b deriving (Eq, Show) instance Functor (Sum a) where fmap _ (First e) = First e fmap f (Second x) = Second $ f x instance Applicative (Sum a) where pure = Second (First e) <*> _ = First e _ <*> (First e) = First e (Second ...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter18.hsproj/EitherMonadImplementation.hs
Haskell
mit
468
{-# LANGUAGE OverloadedStrings, ExistentialQuantification, TemplateHaskell, QuasiQuotes, ViewPatterns #-} module Timesheet where import Data.Time.Calendar import qualified Data.Aeson as JSON import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.ByteString as BS import Data.List import Data.Time impor...
emmanueltouzery/cigale-timesheet
src/WebServer/Timesheet.hs
Haskell
mit
4,879
module Data.Metric ( Metric(..), Discrete(..), Hamming(..), Levenshtein(..), RestrictedDamerauLevenshtein(..), Euclidean(..), Taxicab(..), Chebyshev(..), PostOffice(..) ) where import Data.Metric.Class (Metric(..)) import Data.Metric.Set (Discrete(..)) import Data.Metric.String (Hamming(..), Levensht...
fmap/metric
src/Data/Metric.hs
Haskell
mit
455
--Find out whether a list is a palindrome. module Main where isPalindrome :: (Eq a) => [a] -> Bool isPalindrome [] = True isPalindrome xs = xs == reverse xs main = do if isPalindrome [1,2,3] then putStrLn "fail" else putStrLn "pass" if isPalindrome [1,2,1] then putStrLn "pass" else putStrLn "fail" if isP...
butchhoward/xhaskell
99questions/p06/p06.hs
Haskell
mit
655
{-# LANGUAGE TypeSynonymInstances,FlexibleInstances #-} module DiffMonoid where import Data.Monoid type DiffMonoid a = a -> a abs :: Monoid a => DiffMonoid a -> a abs a = a mempty rep :: Monoid a => a -> DiffMonoid a rep = mappend instance Monoid a => Monoid (DiffMonoid a) where mempty = rep mempty mappend = ...
atzeus/reflectionwithoutremorse
CPS/DiffMonoid.hs
Haskell
mit
324
module Import ( module Import ) where import Prelude as Import hiding (head, init, last, readFile, tail, writeFile) import Yesod as Import hiding (Route (..)) import Control.Applicative as Import (pure,...
smurphy8/yesod-angular-sqlite
Import.hs
Haskell
mit
1,245
{- main = do -} {- a <- getLine -} {- b <- getLine -} {- c <- getLine -} {- print [a,b,c] -} main = do rs <- sequence [getLine, getLine, getLine] print rs
yhoshino11/learning_haskell
ch8/sequence.hs
Haskell
mit
168
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCStatsReport (js_stat, stat, js_names, names, js_getTimestamp, getTimestamp, js_getId, getId, js_getType, getType, js_getLocal, getLocal, js_getRemote, getRemote, RTCStatsReport, castToRTC...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/RTCStatsReport.hs
Haskell
mit
3,966
module Handler.Quiz where import Import import Yesod.Form.Jquery import Data.Aeson.Types (Result(..)) import Data.List (nub) data FormQuiz = FormQuiz { fqTitle :: Text, fqTopic :: Text, fqPublic :: Bool } data FormQuestion = FormQuestion { {- Hardcoded answers is ugly, but I don't see a better way to do it w...
quantum-dan/HasKnowledge
Handler/Quiz.hs
Haskell
mit
9,786
import System.Environment (getArgs) import Data.Char (isUpper) import Control.Monad (liftM, (>=>)) import Control.Monad.Writer.Lazy (Writer, writer, tell, execWriter) import Control.Monad.Trans.Maybe (MaybeT, runMaybeT) type Out a = MaybeT (Writer String) a exitWith :: String -> Out a exitWith s = tell s >> fail "" ...
iatorm/shift
shift.hs
Haskell
mit
3,268
module EKG.A169849 (a169849) where import Helpers.EKGBuilder (buildEKG) a169849 :: Int -> Integer a169849 n = a169849_list !! (n - 1) a169849_list :: [Integer] a169849_list = buildEKG [9]
peterokagey/haskellOEIS
src/EKG/A169849.hs
Haskell
apache-2.0
190
-- Copyright (C) 2009-2012 John Millikin <john@john-millikin.com> -- -- 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 require...
jmillikin/haskell-dbus
lib/DBus.hs
Haskell
apache-2.0
8,208
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-name-shadowing -fno-warn-unused-imports -fno-warn-unused-matches #-} {- Copyright 2020 The CodeWorld...
google/codeworld
codeworld-server/src/Main.hs
Haskell
apache-2.0
24,271
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} -- | Syntax tree for DNA program module DNA.AST where import Data.Typeable import qualified Data.Vector.Storable as S ---------------------------------------------------------------- -- ---------------------------------------------------------------- -- |...
SKA-ScienceDataProcessor/RC
MS1/distributed-dot-product/DNA/AST.hs
Haskell
apache-2.0
698
{-# LANGUAGE TemplateHaskell #-} module Process where import Data.UUID(UUID) import Control.Lens hiding (element) import Control.Monad.State.Lazy(State, gets, modify) import System.Random(StdGen, random, mkStdGen) import Grammar {- Process State -} data Sim = Sim { _stateNouns :: [Noun] , _stateNounSuper :: [...
Lambdanaut/Dahls
app/Process.hs
Haskell
apache-2.0
714
{-# LANGUAGE OverloadedStrings #-} module Codec.GHC.Log where import Data.Attoparsec.Text import Data.Text (Text) data Message = Message Text Pos Level [Text] deriving Show data Pos = Pos { column :: Int, line :: Int } deriving Show data Level = Warning | Error deriving Show messageParser :: Parser Message m...
aloiscochard/sarsi
src/Codec/GHC/Log.hs
Haskell
apache-2.0
1,220
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell #-} -- | Language.Lua.Annotated.Syntax is kind of an AST, but not completely. -- This module exist to correct that deficiency. module Language.Lua.Annotated.Syntax.HighLevel where import BasicPrelude import Control.Lens import Control.Lens.TH import Data.Text (unpack) im...
lshift/hc2prosody
src/Language/Lua/Annotated/Syntax/HighLevel.hs
Haskell
bsd-2-clause
2,704
{-| Implementation of the LUXI loader. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the a...
ganeti/ganeti
src/Ganeti/HTools/Backend/Luxi.hs
Haskell
bsd-2-clause
13,418
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE BangPatterns #-} module Data.CRF.Chain2.Tiers.Model ( -- * Model Model (..) , mkModel , fromSet , fromMap , toMap -- * Potential , phi , index ) where...
kawu/crf-chain2-tiers
src/Data/CRF/Chain2/Tiers/Model.hs
Haskell
bsd-2-clause
8,015
{-# Language TypeFamilies #-} module Data.Source.ByteString.Char8.Offset where import Data.Char import Data.Source.Class import qualified Data.ByteString as B data Src = Src { loc :: Int , str :: B.ByteString } deriving (Eq,Ord,Show,Read) instance Source Src where type Location Src = Int type Element Src = C...
permeakra/source
Data/Source/ByteString/Char8/Offset.hs
Haskell
bsd-3-clause
907
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Binary -- Copyright : Lennart Kolmodin -- License : BSD3-style (see LICENSE) -- -- Maintainer : Lennart Kolmodin <kolmod...
ezyang/binary
src/Data/Binary.hs
Haskell
bsd-3-clause
8,573
{-# language CPP #-} -- No documentation found for Chapter "Core11" module Vulkan.Core11 ( pattern API_VERSION_1_1 , module Vulkan.Core11.DeviceInitialization , module Vulkan.Core11.Enums , module Vulkan.Core11.Handles , module Vul...
expipiplus1/vulkan
src/Vulkan/Core11.hs
Haskell
bsd-3-clause
4,153
module Haskell.Types where import Control.Lens import qualified Text.PrettyPrint.Leijen.Text as PP import Data.IndexedSet (IndexKey(..), SplitKey(..)) import Core.Types import Core.Pretty type HsType meta = NType meta type HsTyCon meta = NTyCon meta type HsTyDecl meta = NTyDecl meta data HsPat' meta = HPVar Name ...
abbradar/dnohs
src/Haskell/Types.hs
Haskell
bsd-3-clause
3,076
module Cabal2Nix.Flags ( configureCabalFlags ) where import Distribution.Package import Distribution.PackageDescription configureCabalFlags :: PackageIdentifier -> FlagAssignment configureCabalFlags (PackageIdentifier (PackageName name) _) | name == "accelerate-examples"= [disable "opencl"] | name == "arithmoi" ...
spencerjanssen/cabal2nix
src/Cabal2Nix/Flags.hs
Haskell
bsd-3-clause
1,642
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE EmptyCase #-} module Language.BCoPL.TypeLevel.MetaTheory.Nat where import Language.BCoPL.TypeLevel.Peano import Language.BCoPL.T...
nobsun/hs-bcopl
src/Language/BCoPL/TypeLevel/MetaTheory/Nat.hs
Haskell
bsd-3-clause
11,644
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.FAlgebra.Tree.Splay ( module Data.FAlgebra.Annotation , module Data.FAlgebra.Base , module Data.FAlgebra.Tree , module Data.FAlgebra.Tree.Indexed , module Data.FAlgebra.Tree.Zipper , getIndex , setIndex ,...
bhamrick/fixalgs
Data/FAlgebra/Tree/Splay.hs
Haskell
bsd-3-clause
3,449
main = return $ 1 + 2 -- putStrLn "Hello, world!" a1 x = let y = 1 in x + y
benjijones/red
test/test_main.hs
Haskell
bsd-3-clause
86
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} -- 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 without -- modification, are permitted provided that the followi...
mattias-lundell/timber-llvm
src/PP.hs
Haskell
bsd-3-clause
2,994
-- ----------------------------------------------------------------------------- -- -- ParseMonad.hs, part of Alex -- -- (c) Simon Marlow 2003 -- -- ----------------------------------------------------------------------------} module ParseMonad ( AlexInput, alexInputPrevChar, alexGetChar, alexGetByte, ...
simonmar/alex
src/ParseMonad.hs
Haskell
bsd-3-clause
6,194
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-} module Graphics.ThumbnailPlus ( createThumbnails , Configuration(..) , Size(..) , ReencodeOriginal(..) , FileFormat(..) , CreatedThumbnails(..) , Thumbnail(..) , NoShow(..) ) where import Control.Arrow ((***)) import Control.Monad (unl...
prowdsponsor/thumbnail-plus
src/Graphics/ThumbnailPlus.hs
Haskell
bsd-3-clause
9,183
import qualified Data.List as List import Data.Function (on) import Data.Char as Char import qualified Data.Map as Map import qualified Data.Set as Set import qualified Geometry.Sphere as Sphere import qualified Geometry.Cuboid as Cuboid import qualified Geometry.Cube as Cube intersperseMonkey = List.intersperse ...
randallalexander/LYAH
src/Ch7.hs
Haskell
bsd-3-clause
1,537
module Options.Verbosity where import Types verbosityOptions :: [Flag] verbosityOptions = [ flag { flagName = "-v" , flagDescription = "verbose mode (equivalent to ``-v3``)" , flagType = DynamicFlag } , flag { flagName = "-v⟨n⟩" , flagDescription = "set verbosity level" ...
gridaphobe/ghc
utils/mkUserGuidePart/Options/Verbosity.hs
Haskell
bsd-3-clause
2,350
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveGeneric #-} module Forml.Ty...
texodus/forml
src/hs/lib/Forml/Types/TypeDefinition.hs
Haskell
bsd-3-clause
1,216
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} module Web.Scotty.CRUD.Types ( CRUD(..), Id, Table, Row, Named(..), namedRowToRow, rowToNamedRow, lookupColumn ) where import Control.Applicative import Data.A...
ku-fpg/scotty-crud
src/Web/Scotty/CRUD/Types.hs
Haskell
bsd-3-clause
2,514
module Sloch.Dirent ( SlochDirent(..) , slochDirent , slochDirents ) where import Data.Maybe (catMaybes) import Language import Dirent import LineCounter data SlochDirent = SlochDirentFile FilePath Language Int | SlochDirentDir FilePath [SlochDirent] deriving Show ...
mitchellwrosen/Sloch
src/sloch/Sloch/Dirent.hs
Haskell
bsd-3-clause
1,050
{-# LANGUAGE DataKinds,UnboxedTuples,MagicHash,TemplateHaskell,RankNTypes,TupleSections #-} module HLearn.Data.SpaceTree.Algorithms.NearestNeighbor ( -- * data types Neighbor (..) , ValidNeighbor (..) , NeighborList (..) , nlSingleton , getknnL , nlMaxDist , Param_k , _k ...
iamkingmaker/HLearn
src/HLearn/Data/SpaceTree/Algorithms/NearestNeighbor.hs
Haskell
bsd-3-clause
13,397
{-| Module : Data.Boltzmann.Internal.Utils Description : General utilities for boltzmann-brain. Copyright : (c) Maciej Bendkowski, 2017-2021 License : BSD3 Maintainer : maciej.bendkowski@tcs.uj.edu.pl Stability : experimental General utilities for boltzmann-brain. -} module Data.Boltzmann.Intern...
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/Internal/Utils.hs
Haskell
bsd-3-clause
3,129
{-| Module : Idris.Docs Description : Data structures and utilities to work with Idris Documentation. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE DeriveFunctor, PatternGuards, MultiWayIf #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Docs ( pprintDocs ...
enolan/Idris-dev
src/Idris/Docs.hs
Haskell
bsd-3-clause
17,843
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-| Module : Yesod.Auth.Hardcoded Descript...
erikd/yesod
yesod-auth/Yesod/Auth/Hardcoded.hs
Haskell
mit
6,084
module Uroboro.InterpreterSpec ( spec ) where import Test.Hspec import Text.Parsec (parse) import Paths_uroboro (getDataFileName) import Uroboro.Checker (typecheck, inferExp) import Uroboro.CheckerSpec (prelude) import Uroboro.Interpreter (pmatch, eval) import Uroboro.Parser (parseDef, parseExp) import ...
tewe/uroboro
test/Uroboro/InterpreterSpec.hs
Haskell
mit
2,266
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} module HERMIT.PrettyPrinter.Glyphs where import Data.Semigroup (Semigroup(..)) import Data.Typeable import HERMIT.Kure import HERMIT.Externa...
conal/hermit
src/HERMIT/PrettyPrinter/Glyphs.hs
Haskell
bsd-2-clause
3,508
{-| Executing jobs as processes The protocol works as follows (MP = master process, FP = forked process): * MP sets its own livelock as the livelock of the job to be executed. * FP creates its own lock file and sends its name to the MP. * MP updates the lock file name in the job file and confirms the FP it can st...
ganeti/ganeti
src/Ganeti/Query/Exec.hs
Haskell
bsd-2-clause
7,850
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Csg.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:42 Warning : this file is machine generated - do not modif...
uduki/hsQt
extra-pkgs/Glome/Qt/Glome/Csg.hs
Haskell
bsd-2-clause
5,564
-- ----------------------------------------------------------------------------- -- -- Output.hs, part of Alex -- -- (c) Simon Marlow 2003 -- -- Code-outputing and table-generation routines -- -- ----------------------------------------------------------------------------} module Output (outputDFA) where import AbsS...
beni55/alex
src/Output.hs
Haskell
bsd-3-clause
10,844
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS -fvectorise #-} module Vectorised (test) where import Data.Array.Parallel hiding (Bool, True, False, not, fromBool, toBool) import Data.Array.Parallel.Prelude hiding (Bool, True, False, not, fromBool, toBool) import Data.Array.Parallel.Prelude.Int as I imp...
mainland/dph
dph-examples/examples/smoke/data/Bool/Vectorised.hs
Haskell
bsd-3-clause
742
{-# LANGUAGE CPP, TupleSections #-} -- |Vectorisation of expressions. module Vectorise.Exp ( -- * Vectorise right-hand sides of toplevel bindings vectTopExpr , vectTopExprs , vectScalarFun , vectScalarDFun ) where #include "HsVersions.h" import Vectorise.Type.Type import Vectorise.Var import Vectori...
vTurbine/ghc
compiler/vectorise/Vectorise/Exp.hs
Haskell
bsd-3-clause
49,617
----------------------------------------------------------------------------- -- | -- Module : Database.PostgreSQL.Simple.LargeObjects -- Copyright : (c) 2011-2012 Leon P Smith -- License : BSD3 -- -- Maintainer : leon@melding-monads.com -- -- Support for PostgreSQL's Large Objects; see -- <https://www...
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/LargeObjects.hs
Haskell
bsd-3-clause
3,546
{-# LANGUAGE FlexibleInstances #-} module Control.Effect.Identity where import Control.Effect import qualified Data.Functor.Identity as Id import qualified Control.Monad.Trans.Identity as Id runIdentity :: Monad m => Eff Id.Identity m a -> m a runIdentity = Id.runIdentityT . translate (return . Id.runIdentity) {...
ocharles/interpreters
Control/Effect/Identity.hs
Haskell
bsd-3-clause
346
module Usage.Usage where import qualified Definition.Definition as Definition import qualified Other.Definition as Definition test :: Int test = D<caret>efinition.seven + 1 testBis :: Int testBis = Definition.eight + 8
charleso/intellij-haskforce
tests/gold/codeInsight/QualifiedImport_MultipleImportSameQualifiedName1/Usage/Usage.hs
Haskell
apache-2.0
225
fun x y z = f x x y z
mpickering/hlint-refactor
tests/examples/Lambda5.hs
Haskell
bsd-3-clause
21
{-# LANGUAGE EmptyCase #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -Wall #-} module T17270 where import Data.Type.Equality f :: a :~: Int -> b :~: Bool -> a :~: b -> void f Refl Refl x = case x of {} $([d| g :: a :~: Int -> b :~: Bool -> a :~: b -> void ...
sdiehl/ghc
testsuite/tests/th/T17270.hs
Haskell
bsd-3-clause
363
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module HigherOrderParse where import Data.Tree -- |Adapter class for various error types such as BNFCs ErrM etc. -- b is the given polymorphic errortype (e.g. ErrM Program) whose -- parameter is a, thus ...
RefactoringTools/HaRe
hareview/data/HigherOrderParse.hs
Haskell
bsd-3-clause
1,125
{-# LANGUAGE ScopedTypeVariables #-} module List () where {-@ Decrease go 3 4 5 @-} {-@ Decrease perms 4 5 6 @-} {-@ foo :: xs:[a] -> ys:[a] -> {v:Int| v = (len xs)- (len ys)} -> Int @-} foo :: [a] -> [a] -> Int -> Int foo = undefined permutations :: [a] -> [[a]] permutations xs = go xs xs (length xs) ...
mightymoose/liquidhaskell
tests/pos/malformed0.hs
Haskell
bsd-3-clause
947
module ListDemo where data Poo a = C { t :: Poo a } {-@ type Geq N = {v:_ | N <= v} @-} {-@ data Poo a = C { t :: Poo (Geq 0) } @-}
mightymoose/liquidhaskell
tests/crash/hole-crash1.hs
Haskell
bsd-3-clause
135
module Distribution.Server.Users.Group ( module UserIdSet, UserGroup(..), GroupDescription(..), nullDescription, groupName, queryUserGroups, ) where import Distribution.Server.Users.Types import Distribution.Server.Users.UserIdSet as UserIdSet import Distribution.Server.Framework.MemSize imp...
ocharles/hackage-server
Distribution/Server/Users/Group.hs
Haskell
bsd-3-clause
3,048
{-# LANGUAGE RankNTypes #-} -- This one showed up a bug in pre-subsumption module ShouldCompile where class Data a where {} type GenericQ r = forall a. Data a => a -> r everything :: (r -> r -> r) -> GenericQ r everything k f = error "urk" -- | Get a list of all entities that meet a predicate listify :: (r -> ...
spacekitteh/smcghc
testsuite/tests/typecheck/should_compile/tc206.hs
Haskell
bsd-3-clause
371
-- Set up the data structures provided by 'Vectorise.Builtins'. module Vectorise.Builtins.Initialise ( -- * Initialisation initBuiltins, initBuiltinVars ) where import Vectorise.Builtins.Base import BasicTypes import TysPrim import DsMonad import TysWiredIn import DataCon import TyCon import Class import CoreSyn...
urbanslug/ghc
compiler/vectorise/Vectorise/Builtins/Initialise.hs
Haskell
bsd-3-clause
10,353
module ShouldCompile where import Data.List (nub) -- all unused import Data.Char (ord, chr) -- some unused x = chr 42
urbanslug/ghc
testsuite/tests/rename/should_compile/rn046.hs
Haskell
bsd-3-clause
121
{-# LANGUAGE OverloadedStrings #-} module Yesod.Auth.Message ( AuthMessage (..) , defaultMessage -- * All languages , englishMessage , portugueseMessage , swedishMessage , germanMessage , frenchMessage , norwegianBokmålMessage , japaneseMessage , finnishMessage , chine...
yesodweb/yesod
yesod-auth/Yesod/Auth/Message.hs
Haskell
mit
51,070
module Y2018.M02.D02.Solution where {-- We have been able to download sets of articles and then we've triaged them, but before we do triage, we have to do a bifurcation from before: we don't want Associated Press articles showing up in our NEW / UPDATED / REDUNDANT stacks. Today's Haskell problem is to remove the AP ...
geophf/1HaskellADay
exercises/HAD/Y2018/M02/D02/Solution.hs
Haskell
mit
2,737
{-# OPTIONS_JHC -fno-prelude -fffi #-} module Jhc.Storable(Storable_(..)) where import Jhc.Basics import Jhc.Addr import Jhc.IO class Storable_ a where sizeOf_ :: a -> Word__ alignment_ :: a -> Word__ peekElemOff_ :: Addr__ -> Word__ -> IO a pokeElemOff_ :: Addr__ -> Word__ -> a -> UIO_ peek_ :: A...
m-alvarez/jhc
lib/jhc/Jhc/Storable.hs
Haskell
mit
752
-- Parenthesization ---- (2^) $ (+2) $ 3*2 ---- (2^) $ 2 + 2 $ (*30) ---- (2^) $ 2 + 2 $ (*30) ---- 2 + 2 $ (*30) ---- (2 + 2) (*30) ---- 4 (* 30) ---- (2^) $ (*30) $ 2 + 2 ---- (2^) $ (*30) $ 2 + 2 ---- (2^) $ (*30) 4 ---- (2^) $ 120 ---- (2^) 120 ---- 1329227995784915872903807060280344576 ...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/02_13.hs
Haskell
mit
720
import Network.Socket import System.IO import Control.Concurrent import Network.Connection import qualified Data.ByteString.Char8 as BSC import Aws import Aws.Core import Aws.General import Aws.Sns import Data.IORef import Data.Time.Clock import qualified Data.Text as DT main :: IO () main = do -- create socket ...
dgonyeo/irc-locator
Locator.hs
Haskell
mit
2,433