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
add (x,y) = x + y add' x y = x + y second xs = head (tail xs) swap (x, y) = (y, x) pair x y = (x, y) -- a -> b -> (a, b) double x = x * 2 -- Num a => a -> a palindrome xs = reverse xs == xs -- How is the type of this function determined? twice f x = f (f x) -- (a -> a) -> a -> a f xs = take 3 (reverse xs)
jugalps/edX
FP101x/week2/week2.hs
Haskell
mit
314
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler , db ) where import Control.Monad.Logger (liftLoc, runLoggingT) i...
total-git/missingno
yesodMissingNo/Application.hs
Haskell
mit
6,654
{- Copyright (c) Facebook, Inc. and its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
facebook/fbthrift
thrift/lib/hs/Thrift/Transport/Handle.hs
Haskell
apache-2.0
3,315
module CourseStitch.Models ( module CourseStitch.Models.Tables, module CourseStitch.Models.Types, module CourseStitch.Models.RunDB, module CourseStitch.Models.Queries, module CourseStitch.Models.Models ) where import CourseStitch.Models.Tables import CourseStitch.Models.Types import CourseStitch.Mo...
coursestitch/coursestitch-api
lib/CourseStitch/Models.hs
Haskell
apache-2.0
400
{-# LANGUAGE TupleSections #-} module Handler.DownloadFeeds where import qualified Data.Text as T import Data.Maybe import Data.Time (getCurrentTimeZone) import Data.Default (def) import Blaze.ByteString.Builder import qualified Model import Import typeTorrent :: T.Text typeTorrent = "application/x-bittorrent" nsA...
jannschu/bitlove-ui
Handler/DownloadFeeds.hs
Haskell
bsd-2-clause
7,345
{-# LANGUAGE GADTs #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution a...
rCEx/feldspar-lang-small
src/Feldspar/Core/Constructs/Tuple.hs
Haskell
bsd-3-clause
14,139
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.KHR.ParallelShaderCompile -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Po...
haskell-opengl/OpenGLRaw
src/Graphics/GL/KHR/ParallelShaderCompile.hs
Haskell
bsd-3-clause
813
{-# LANGUAGE OverloadedStrings #-} import Language.Swift.Quote.Syntax import Language.Swift.Quote.Pretty import Control.Arrow (left, right) import Language.Swift.Quote.Parser import qualified Data.ByteString.Lazy.Char8 as C import Data.Either import qualified Data.Text.Lazy as L import qualified Data.Text as T impor...
steshaw/language-swift-quote
tests/unit/Main.hs
Haskell
bsd-3-clause
15,523
{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Socks5 import Network.Socks5.Types import Network.Socks5.Lowlevel import Network.Socket hiding (recv, recvFrom, sendTo) import Network.Socket.ByteString import Control.Concurrent import Data.List (find) import Data.Foldable (for_) import Data.Serializ...
glguy/s5s
Main.hs
Haskell
bsd-3-clause
14,540
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-} import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BC import Data.Typeable import Control.Concurrent (forkIO, myThreadId, threadDelay) import qualified Control.Exception as E import Control.Exception (Exception, IOException, throwTo) ...
pcapriotti/pipes-extra
examples/finalizers/simple.hs
Haskell
bsd-3-clause
3,698
module Main where import Zice main = do ziceMain
zachk/zice
src/Main.hs
Haskell
bsd-3-clause
57
import Data.List data EncodeType a = Single a | Multiple Int a deriving (Show) encode lst = map (\ x -> (length x, head x)) (Data.List.group lst) encodeModified :: Eq a => [a] -> [EncodeType a] encodeModified = map help . encode where help (1, x) = Single x help (n, x) = Multiple n x decodeModified...
m00nlight/99-problems
haskell/p-12.hs
Haskell
bsd-3-clause
462
module Main where import Finance.Quote.Yahoo import Data.Time.Calendar import Data.Map quoteSymbolList = ["YHOO"] :: [QuoteSymbol] quoteFieldsList = ["s","l1","c"] :: [QuoteField] main = do q <- getQuote quoteSymbolList quoteFieldsList case q of Nothing -> error "no map" Just m -> case (Data.Map.lookup (...
bradclawsie/haskell-Finance.Quote.Yahoo
quotes.hs
Haskell
bsd-3-clause
727
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -fno-warn-name-shadowing #-} -- | Track clocking in and out of work. module Clockin where import Control.Monad import Control.Monad....
chrisdone/clockin
src/Clockin.hs
Haskell
bsd-3-clause
12,791
module Data.Text.Aux where import Control.Monad (liftM2) import qualified Data.Text as T (Text, append, cons, intercalate, lines, pack, snoc, unlines, unwords, words) import Language.C.Pretty (Pretty, pretty) import Data.Text.Lazy (toStrict) import Data.Text.Lazy.Builder (toLazyText) import Data.Text.Lazy.Builder.Int ...
michaeljklein/CPlug
src/Data/Text/Aux.hs
Haskell
bsd-3-clause
2,199
-- -- Types.hs -- Copyright (C) 2017 jragonfyre <jragonfyre@jragonfyre> -- -- Distributed under terms of the MIT license. -- module Game.Types where --( --) where import qualified Data.HashMap.Lazy as M import qualified Data.Yaml as Y import Data.Yaml (FromJSON (..), (.:), (.!=), (.:?), (.=), ToJSON (..)) import ...
jragonfyre/TRPG
src/Game/Types.hs
Haskell
bsd-3-clause
3,090
module Main where import qualified Data.ByteString.Lazy as LazyBS import Data.Time.Clock import Data.Time.Format import Data.Time.LocalTime import System.IO --import System.Locale import CSVPlayer import Types import NameCluster import NameGender import OptApplicative import Utils -- |Clusterifies the specifed names...
Tydax/ou-sont-les-femmes
app/OuSontLesFemmes.hs
Haskell
bsd-3-clause
3,360
{-# LANGUAGE QuasiQuotes #-} module AltParsing where import Control.Applicative import Text.Trifecta import Text.RawString.QQ type NumberOrString = Either Integer String a = "blah" b = "123" c = "123blah789" eitherOr :: String eitherOr = [r| 123 abc 456 def |] parseNos :: Parser NumberOrString parseNos = do skip...
chengzh2008/hpffp
src/ch24-Parser/altParsing.hs
Haskell
bsd-3-clause
751
{-# LANGUAGE PatternGuards, RecordWildCards #-} module Website where import Data.Char (toLower) import Data.Function (on) import Data.List (find, groupBy, nub, sort) import Data.Version (showVersion, versionBranch) import Development.Shake import Text.Hastache import Text.Hastache.Context import Dirs import Paths im...
gbaz/haskell-platform
hptool/src/Website.hs
Haskell
bsd-3-clause
6,097
module Karamaan.Plankton.Date where import Data.Time.Calendar (Day, addDays, fromGregorian, toGregorian) import Data.Time.LocalTime (ZonedTime, zonedTimeToLocalTime, getZonedTime, localDay) import Data.Time.Format (formatTime) import System.Locale (defaultTimeLocale) import qualified Data.Time.Parse import qualified D...
karamaan/karamaan-plankton
Karamaan/Plankton/Date.hs
Haskell
bsd-3-clause
2,680
module Graphics.UI.Threepenny.Elements.ID where import Graphics.UI.Threepenny.Attributes.Extra import Graphics.UI.Threepenny.Extra import Data.UUID import Data.UUID.V4 newtype UID = UID { unUID :: String } deriving (Eq,Ord,Show) newID :: UI UID newID = liftIO $ shortenUUID <$> nextRandom shortenUUID :: UUID ->...
kylcarte/threepenny-extra
src/Graphics/UI/Threepenny/Elements/ID.hs
Haskell
bsd-3-clause
921
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Control.Applicative ((<**>), (<|>), optional) import Data.Char (toLower) import Data.Semigroup ((<>)) import System.IO (IOMode (WriteMode), stdout, openFile) import Genotype.Comparison (PhaseKnowledge (..)) import Genotype.Processor (Processor, prepro...
Jonplussed/genotype-parser
app/Main.hs
Haskell
bsd-3-clause
4,008
{- It can be verified that there are 23 positive integers less than 1000 that are divisible by at least four distinct primes less than 100. Find how many positive integers less than 10^16 are divisible by at least four distinct primes less than 100. -} {-# LANGUAGE ScopedTypeVariables #-} import qualified Zora.List ...
bgwines/project-euler
src/in progress/problem269.hs
Haskell
bsd-3-clause
1,042
module Yesod.Goodies.PNotify.Modules.Nonblock ( Nonblock(..) , defaultNonblock )where import Data.Aeson import Data.Text (Text) import Yesod.Goodies.PNotify.Types import Yesod.Goodies.PNotify.Types.Instances data Nonblock = Nonblock { _nonblock :: Maybe Bool , _...
cutsea110/yesod-pnotify
Yesod/Goodies/PNotify/Modules/Nonblock.hs
Haskell
bsd-3-clause
1,058
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE CPP #-} {-| This module defines a generic web application interface. It is a common protocol between web servers and web applications. The overriding design principles here are performance and generality. To address performance, this library is built on top of the conduit and ...
sol/wai
wai/Network/Wai.hs
Haskell
mit
9,632
{-| Low-Level Inferface for LMDB Event Log. -} module Urbit.Vere.LMDB where import Urbit.Prelude hiding (init) import Data.RAcquire import Database.LMDB.Raw import Foreign.Marshal.Alloc import Foreign.Ptr import Urbit.Vere.Pier.Types import Foreign.Storable (peek, poke, sizeOf) import qualified Data.ByteString...
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Vere/LMDB.hs
Haskell
mit
10,406
module Haskmon.Types.MetaData( module Haskmon.Types.MetaData, I.MetaData ) where import Data.Time.Clock import Haskmon.Types.Internals(MetaData) import qualified Haskmon.Types.Internals as I resourceUri :: MetaData -> String resourceUri = I.resourceUri created :: MetaData -> UTCTime created = I.created modifi...
bitemyapp/Haskmon
src/Haskmon/Types/MetaData.hs
Haskell
mit
368
<?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="hu-HU"> <title>TLS Debug | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
veggiespam/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_hu_HU/helpset_hu_HU.hs
Haskell
apache-2.0
971
<?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="da-DK"> <title>HTTPS Info | ZAP Add-on</title> <maps> <homeID>top</homeID> <mapref loc...
veggiespam/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_da_DK/helpset_da_DK.hs
Haskell
apache-2.0
969
-------------------------------------------------------------------- -- | -- Module : Flickr.Photos.Geo -- Description : flickr.photos.geo - setting/getting photo geo location. -- Copyright : (c) Sigbjorn Finne, 2008 -- License : BSD3 -- -- Maintainer : Sigbjorn Finne <sof@forkIO.com> -- Stability : provi...
sof/flickr
Flickr/Photos/Geo.hs
Haskell
bsd-3-clause
4,894
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | Pretty printing. module HIndent.Pretty ( -- * Printing Pretty , p...
ennocramer/hindent
src/HIndent/Pretty.hs
Haskell
bsd-3-clause
40,383
{-# LANGUAGE MagicHash, UnboxedTuples, ScopedTypeVariables #-} module UU.Parsing.StateParser(StateParser(..)) where import GHC.Prim import UU.Parsing.MachineInterface import UU.Parsing.Machine(AnaParser, ParsRec(..),RealParser(..),RealRecogn(..), mkPR, anaDynE) instance (InputState inp s ...
UU-ComputerScience/uulib
src/UU/Parsing/StateParser.hs
Haskell
bsd-3-clause
1,343
module Syntax.Common ( module Syntax.Common , module Text.Megaparsec , module Syntax.ParseState , module Syntax.Tree ) where import Control.Monad (void) import Control.Monad.Trans.Class (lift) import Control.Monad.State.Lazy (put, get) import qualified Text.Megaparsec.Lexer as L import Text.Megaparsec hiding (State) i...
BakerSmithA/Turing
src/Syntax/Common.hs
Haskell
bsd-3-clause
2,648
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.Tree -- Copyr...
shockkolate/containers
Data/Tree.hs
Haskell
bsd-3-clause
5,981
-- | Render some text to HTML, replacing any URIs with actual links. module Text.Blaze.Linkify where import Data.Text (Text) import Text.Blaze.Html5 import Text.Blaze.Html5.Attributes import Text.Links import Data.String.Extra -- | Render some text to HTML, replacing any URIs with actual links. linkify :: Text -> H...
plow-technologies/ircbrowse
src/Text/Blaze/Linkify.hs
Haskell
bsd-3-clause
516
yes = map (\(a,_) -> a) xs
mpickering/hlint-refactor
tests/examples/Default22.hs
Haskell
bsd-3-clause
26
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : provisional -- Portability : portable -- ...
bgamari/linear
src/Linear/Covector.hs
Haskell
bsd-3-clause
2,413
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} module Main where import Control.Lens import qualified Graphics.Vty as V import qualified Brick.Main as M import qualified Brick.Types as T import Brick.Widgets.Core ( (<+>) , (<=>) , hLimit , vLimit , str ) im...
sisirkoppaka/brick
programs/EditDemo.hs
Haskell
bsd-3-clause
2,609
<?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="sk-SK"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
thc202/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_sk_SK/helpset_sk_SK.hs
Haskell
apache-2.0
968
<?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="en-GB"> <title>ViewState</title> <maps> <homeID>viewstate</homeID> <mapref ...
thc202/zap-extensions
addOns/viewstate/src/main/javahelp/help/helpset.hs
Haskell
apache-2.0
973
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Internal -- Copyright : (C) 2012-15 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -...
danidiaz/lens
src/Control/Lens/Internal.hs
Haskell
bsd-3-clause
1,676
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , ForeignFunctionInterface , MagicHash , UnboxedTuples , ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} -- kludge for the Control.Concurrent.QSem, Control.Concurre...
beni55/haste-compiler
libraries/ghc-7.8/base/Control/Concurrent.hs
Haskell
bsd-3-clause
24,702
module SPARC.CodeGen.Amode ( getAmode ) where import {-# SOURCE #-} SPARC.CodeGen.Gen32 import SPARC.CodeGen.Base import SPARC.AddrMode import SPARC.Imm import SPARC.Instr import SPARC.Regs import SPARC.Base import NCGMonad import Size import Cmm import OrdList -- | Generate code to reference a memory add...
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/SPARC/CodeGen/Amode.hs
Haskell
bsd-3-clause
1,625
module Main where main = print (fib' 100) -- This will time out unless memoing works properly data Nat = Z | S Nat deriving (Show, Eq) memo f = g where fz = f Z fs = memo (f . S) g Z = fz g (S n) = fs n -- It is a BAD BUG to inline 'fs' inside g -- and that ha...
ezyang/ghc
testsuite/tests/simplCore/should_run/simplrun005.hs
Haskell
bsd-3-clause
1,232
import Control.Monad import Data.Word (Word8) import Foreign.Ptr import Foreign.Marshal.Array import GHC.Foreign (peekCStringLen, withCStringLen) import GHC.IO.Encoding.Failure (CodingFailureMode(..)) import qualified GHC.IO.Encoding.Latin1 as Latin1 import System.IO import System.IO.Error -- Tests for single-byte enc...
ezyang/ghc
libraries/base/tests/IO/encoding005.hs
Haskell
bsd-3-clause
5,035
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} {-# LANGUAGE FlexibleInstances, IncoherentInstances, PatternGuards #-} module Idris.IdeMode(parseMessage, convSExp, WhatDocs(..), IdeModeCommand(..), sexpToCommand, toSExp, SExp(..), SExpable, Opt(..), ideModeEpoch, getLen, getNChar, sExpToString) where import Text.Prin...
ExNexu/Idris-dev
src/Idris/IdeMode.hs
Haskell
bsd-3-clause
16,974
{-# LANGUAGE TypeFamilies #-} module Main where data A a type T a = A a f :: (A a ~ T Int) => a -> Int f x = x main :: IO () main = return ()
siddhanathan/ghc
testsuite/tests/typecheck/should_compile/GivenTypeSynonym.hs
Haskell
bsd-3-clause
163
import Control.Concurrent import Control.Monad import Control.Exception import System.Mem -- caused an assertion failure with -debug in 7.0.1 (#4813) main = do m <- newEmptyMVar ts <- replicateM 100 $ mask_ $ forkIO $ threadDelay 100000; putMVar m () mapM_ killThread (reverse (init ts)) takeMVar m
urbanslug/ghc
testsuite/tests/concurrent/should_run/T4813.hs
Haskell
bsd-3-clause
313
-- Copyright 2015-2016 Yury Gribov -- -- Use of this source code is governed by MIT license that can be -- found in the LICENSE.txt file. module Support where import qualified System.Environment import qualified System.Exit import qualified Data.Array import Debug.Trace (trace) -- Create Data.Array.Array with all e...
yugr/sudoku
src/Support.hs
Haskell
mit
2,176
module Philed.Data.List (module Data.List ,module Philed.Data.ListExtras) where import Data.List import Philed.Data.ListExtras
Chattered/PhilEdCommon
Philed/Data/List.hs
Haskell
mit
152
{-# LANGUAGE TemplateHaskell, FlexibleContexts #-} module Kachushi.KState ( KState (..) , boards , deck , initialState , putCard , putCards ) where import Kachushi.Cards (Card (..), fullDeck) import Kachushi.OFCP (Board (..), emptyBoard, Slot (..), Row (..)) import Control.Lens (over, makeLenses, eleme...
ScrambledEggsOnToast/Kachushi
Kachushi/KState.hs
Haskell
mit
2,114
{-# LANGUAGE CPP #-} module GHCJS.DOM.HTMLLegendElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.HTMLLegendElement #else module Graphics.UI.Gtk.WebKit.DOM.HTMLLegendElement #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASC...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/HTMLLegendElement.hs
Haskell
mit
470
{-# LANGUAGE RecordWildCards #-} module Lambency.Camera ( mkOrthoCamera, mkPerspCamera, getViewProjMatrix, getCamXForm, setCamXForm, getCamDist, setCamDist, getCamPos, setCamPos, getCamDir, setCamDir, getCamUp, setCamUp, getCamNear, setCamNear, getCamFar, setCamFar, camLookAt, m...
Mokosha/Lambency
lib/Lambency/Camera.hs
Haskell
mit
9,911
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DerivingVia #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE U...
Javran/misc
alex-playground/src/Lib.hs
Haskell
mit
2,729
module Network.WebSockets.Messaging ( Connection(disconnected) , request , requestAsync , notify , onRequest , onNotify , onConnect , onDisconnect , startListening , Request(..) , Notify(..) , Some(..) , deriveRequest , deriveNotify , Future , get , f...
leonidas/ws-messaging
src/Network/WebSockets/Messaging.hs
Haskell
mit
732
module Rebase.Data.Vector.Storable.Mutable ( module Data.Vector.Storable.Mutable ) where import Data.Vector.Storable.Mutable
nikita-volkov/rebase
library/Rebase/Data/Vector/Storable/Mutable.hs
Haskell
mit
128
import Geometry import Drawing main = drawPicture myPicture myPicture points = undefined
alphalambda/k12math
contrib/MHills/GeometryLessons/code/student/lesson2e.hs
Haskell
mit
98
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -- | Warning: This module should be considered highly experimental. module Data.Containers where import qualified Data.Map as Map import qualified Data.HashMap.Strict as HashMap import Data.Hashable (Hashable) import qua...
moonKimura/mono-traversable-0.1.0.0
src/Data/Containers.hs
Haskell
mit
5,148
module FSM ( FSM(..), mapTransitions, mapToFunc, accepts ) where import State (Token(..), State(..), TransitionFunction(..), Transition(..), TransitionMap) import Data.Set as Set (Set, elems, member) import Data.Map as Map (Map, (!), empty, insert, singleton, member) data FSM = FSM {states :: Set State, state0 ::...
wyager/NDFSMtoFSM
FSM.hs
Haskell
mit
1,310
-- Copyright 2013 Matthew Spellings -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- http://www.apache.org/licenses/LICENSE-2.0 -- Unless required by applicable law or agreed to in wr...
klarh/hasdy
test/test.hs
Haskell
apache-2.0
6,548
{-# LANGUAGE OverloadedStrings #-} module View.Index (render) where import Control.Monad (forM_) import Model.Definition import Text.Blaze.Html5.Attributes (href, class_) import Text.Blaze.Html.Renderer.Text import Data.Monoid((<>)) import View.Header import qualified Data.Text.Lazy as D import qualified Text.Blaze.H...
codemiller/fp-in-the-cloud
src/View/Index.hs
Haskell
apache-2.0
3,131
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} -- * Demonstrating `non-compositional', context-sensitive processing -- * The final style -- * Flatten the additions module FlatF where import Intro2 hiding (main) import PushNegF as Neg hiding (main,Ctx) -- We are going to write flata as...
mjhopkins/ttfi
src/haskell/FlatF.hs
Haskell
apache-2.0
4,020
{-# Language RecordWildCards #-} -- | -- Module : GRN.Sparse -- Copyright : (c) 2011 Jason Knight -- License : BSD3 -- -- Maintainer : jason@jasonknight.us -- Stability : experimental -- Portability : portable -- -- Provides sparse matrix capabilities for an attempt at speeding up the -- simulation of the Mark...
binarybana/grn-pathways
GRN/Sparse.hs
Haskell
bsd-2-clause
6,308
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextLength.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated - do n...
uduki/hsQt
Qtc/Enums/Gui/QTextLength.hs
Haskell
bsd-2-clause
2,552
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOp...
ocharles/opaleye-tf
src/Opaleye/TF/BaseTypes.hs
Haskell
bsd-3-clause
5,425
module Main where import Test.Framework (defaultMain) import Circular.Syntax.Concrete.Tests main = defaultMain Main.tests tests = [ Circular.Syntax.Concrete.Tests.tests ]
Toxaris/circular
src/tests.hs
Haskell
bsd-3-clause
189
------------------------------------------------------------------------------ -- | -- Module : Data.TokyoDystopia.IDB -- Copyright : 8c6794b6 <8c6794b6@gmail.com> -- License : BSD3 -- Maintainer : 8c6794b6 -- Stability : experimental -- Portability : non-portable -- -- Haskell binding for tokyodystopia T...
8c6794b6/tokyodystopia-haskell
Database/TokyoDystopia/IDB.hs
Haskell
bsd-3-clause
6,697
{-# LANGUAGE ForeignFunctionInterface #-} ------------------------------------------------------------------------------- -- | -- Copyright : (c) 2015 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- -...
oldmanmike/CsoundRaw
src/Sound/Csound/Debugger.hs
Haskell
bsd-3-clause
2,460
module Main ( main ) where import Control.DeepSeq import Control.Exception import qualified Data.Map as Map import qualified Data.Set as Set import Distribution.Nixpkgs.Haskell.FromCabal.Configuration.GHC7102 import Distribution.Nixpkgs.License import Distribution.Nixpkgs.Meta import Internal.Lens import Test.Hspec m...
psibi/cabal2nix
test/spec.hs
Haskell
bsd-3-clause
1,231
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.DeepSeq(module Idris.DeepSeq, module Idris.Core.DeepSeq) where import Idris.Core.DeepSeq import Idris.Docstrings import Idris.Core.TT import Idris.AbsSyntaxTree import Control.DeepSeq import qualified Cheapskate.Types as CT import qualified Idris.Docstring...
bkoropoff/Idris-dev
src/Idris/DeepSeq.hs
Haskell
bsd-3-clause
14,948
module Main(main) where import MonadPoint -- titlePage title name = scale 0.9 $ do scaleh 0.65 $ do scalehu 0.7 $ do holstack $ mapM_ txtc $ lines title scalehd 0.2 $ do txtc name tmpl title m = page $ do scale 0.9 $ do scalehu 0.2 $ do txtc ti...
tanakh/MonadPoint
test/Main.hs
Haskell
bsd-3-clause
868
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.Fix.Helpers ( tmFix ) where import Control.Lens (review) import Ast.Term import Fragment.Fix.Ast.Term tmFix :: AsTmFix ki ty pt tm => T...
dalaing/type-systems
src/Fragment/Fix/Helpers.hs
Haskell
bsd-3-clause
388
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module: $HEADER$ -- Description: Abstract API for DHT implementations. -- Copyright: (c) 2015, Jan Šipr, Matej Kollár, Peter Trško -- License: BSD3 -- -- Stability: experimental -- Portability: NoImplicitPrelude -- -- Abs...
FPBrno/dht-api
src/Data/DHT/Core.hs
Haskell
bsd-3-clause
1,861
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module ZM.Type.Float32(IEEE_754_binary32(..)) where import Data.Model import ZM.Type.Bits8 import ZM.Type.Bits23 import ZM.Type.Words -- |An IEEE-754 Big Endian 32 bits Float data IEEE_754_binary32 = IEEE_75...
tittoassini/typed
src/ZM/Type/Float32.hs
Haskell
bsd-3-clause
811
module Atomo.Parser.Expr where import Control.Arrow (first, second) import Control.Monad.State import Data.Maybe (fromJust, isJust) import Text.Parsec import qualified Control.Monad.Trans as MTL import Atomo.Environment import Atomo.Helpers (toPattern', toMacroPattern') import Atomo.Parser.Base import Atomo.Parser.Ex...
Mathnerd314/atomo
src/Atomo/Parser/Expr.hs
Haskell
bsd-3-clause
11,644
-- | Mutually recursive types. module Data.Aeson.Validation.Internal.Types where import Data.Aeson.Validation.Internal.Prelude import Data.List.NonEmpty ((<|)) import qualified GHC.Exts as GHC -- $setup -- >>> import Data.Aeson.Validation.Internal.Schema data Demand = Opt | Req deriving Eq instance Hashab...
mitchellwrosen/json-validation
src/internal/Data/Aeson/Validation/Internal/Types.hs
Haskell
bsd-3-clause
4,349
module AddressUtils ( adjustAddr , adjustAmount , IsBitcoinAddress ) where import qualified Data.Text as T import qualified Network.BitcoinRPC as RPC import qualified Network.MtGoxAPI as MtGox class IsBitcoinAddress a where addrToText :: a -> T.Text textToAddr :: T.Text -> a instance IsBitco...
javgh/bridgewalker
src/AddressUtils.hs
Haskell
bsd-3-clause
1,340
{-# LANGUAGE CPP #-} -- This module deliberately defines orphan instances for now (Binary Version). {-# OPTIONS_GHC -fno-warn-orphans -fno-warn-name-shadowing #-} ----------------------------------------------------------------------------- -- | -- Module : ETA.PackageDb -- Copyright : (c) The University of Gl...
alexander-at-github/eta
utils/eta-pkgdb/ETA/PackageDb.hs
Haskell
bsd-3-clause
15,693
{-# OPTIONS_GHC -Wall #-} module Atmosphere.Atmosphere( siAtmosphere , usAtmosphere ) where -- 1976 US Standard Atmosphere -- Adapted by -- Greg Horn -- Adapted by -- Richard J. Kwan, Lightsaber Computing -- from original programs by -- Ralph L...
ghorn/conceptual-design
Atmosphere/Atmosphere.hs
Haskell
bsd-3-clause
3,780
{-# LANGUAGE DataKinds , FlexibleContexts , LambdaCase , TupleSections #-} module Language.HM.Rename ( NameError (..) , rename ) where import Control.Applicative import Control.Category import Control.Comonad.Cofree import Control.Monad.Error.Class import Control.Monad.Name.Class import ...
sonyandy/unify
examples/unify-hm/Language/HM/Rename.hs
Haskell
bsd-3-clause
2,058
{- | Copyright : Copyright (C) 2011 Bjorn Buckwalter License : BSD3 Maintainer : bjorn.buckwalter@gmail.com Stability : Stable Portability: Haskell 98 This purpose of this library is to have a simple API and no dependencies beyond Haskell 98 in order to let you produce normally distributed random ...
bjornbm/normaldistribution
Data/Random/Normal.hs
Haskell
bsd-3-clause
5,529
--file: Main.hs module AnsiExample where import Prelude hiding (Either(..)) import System.Console.ANSI import System.IO type Coord = (Int, Int) data World = World { wHero :: Coord } data Input = Up | Down | Left | Right | Exit deriving (Eq) anotherMain = do ...
JobaerChowdhury/game-of-life
app/AnsiExample.hs
Haskell
bsd-3-clause
2,040
module Handler.Board where import Import import qualified Data.Text as T import qualified Data.List.Split as S import Board import NeuralNets import CommonDatatypes getBoardR :: Text -> Handler RepHtml getBoardR boardRepr = do ag'white <- liftIO $ mkAgent White ag'black <- liftIO $ mkAgent Black let denseRepr...
Tener/deeplearning-thesis
yesod/abaloney/Handler/Board.hs
Haskell
bsd-3-clause
859
-- | Provides a set implementation for machine CSP sets. This relies heavily -- on the type checking and assumes in many places that the sets being operated -- on are suitable for the opertion in question. -- -- We cannot just use the built in set implementation as FDR assumes in several -- places that infinite sets ar...
sashabu/libcspm
src/CSPM/Evaluator/ValueSet.hs
Haskell
bsd-3-clause
19,163
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances, TypeOperators, ScopedTypeVariables, NamedFieldPuns #-} {-# LANGUAGE GADTs, GeneralizedNewtypeDeriving, DeriveDataTypeable, RecordWildCards #-} -- | This module provides functions for calling command line programs, primarily -- ...
ndmitchell/shake
src/Development/Shake/Command.hs
Haskell
bsd-3-clause
35,626
{-# LINE 1 "Control.Concurrent.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , MagicHash , UnboxedTuples , ScopedTypeVariables , RankNTypes #-} {-# OPTIONS_GHC -Wno-deprecations #-} -- kludge for the Control.Concurrent.QSem,...
phischu/fragnix
builtins/base/Control.Concurrent.hs
Haskell
bsd-3-clause
21,926
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAG...
FranklinChen/music-score
src/Music/Score/Meta/Key.hs
Haskell
bsd-3-clause
3,917
{-# LANGUAGE LambdaCase #-} {-| Module : Lib Description : Lib's main module This is a haddock comment describing your library For more information on how to write Haddock comments check the user guide: <https://www.haskell.org/haddock/doc/html/index.html> -} module Lib ( slaskellbot ) where import ...
wamaral/slaskellbot
src/Lib.hs
Haskell
bsd-3-clause
2,995
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANG...
HalfWayMan/meadowstalk
src/Meadowstalk/Foundation.hs
Haskell
bsd-3-clause
2,117
{-# LANGUAGE OverloadedStrings #-} module Deviser.Parser ( readExpr , readExprFile ) where import Data.Array (listArray) import Data.Complex import Data.Functor.Identity (Identity) import Data.Ratio ((%)) import qualified Data.Text as T import Numeric (readFloat, readHex, readOct) import Text.Parsec hiding (spa...
henrytill/deviser
src/Deviser/Parser.hs
Haskell
bsd-3-clause
5,903
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module TW.CodeGen.PureScript ( makeFileName, makeModule , libraryInfo ) where import TW.Ast import TW.BuiltIn import TW.JsonRepr import TW.Types import TW.Utils import Data.Maybe import Data.Monoid import System.FilePath import qualif...
agrafix/typed-wire
src/TW/CodeGen/PureScript.hs
Haskell
mit
12,260
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Bead.Config.Parser where import Control.Applicative import Data.ByteString.Char8 (pack) import Data.Maybe import Data.String import Data.Yaml import Bead.Config.Configuration #ifdef TEST import Test.Tasty.TestSet #endif -- * JSON instances instance Fr...
andorp/bead
src/Bead/Config/Parser.hs
Haskell
bsd-3-clause
5,778
module ShowRepoEvents where import qualified Github.Issues.Events as Github import Data.List (intercalate) import Data.Maybe (fromJust) main = do possibleEvents <- Github.eventsForRepo "thoughtbot" "paperclip" case possibleEvents of (Left error) -> putStrLn $ "Error: " ++ show error (Right events) -...
jwiegley/github
samples/Issues/Events/ShowRepoEvents.hs
Haskell
bsd-3-clause
1,777
module Opaleye.Column (module Opaleye.Column, Column, Nullable, unsafeCoerce, unsafeCoerceColumn, unsafeCompositeField) where import Opaleye.Internal.Column (Column, Nullable, unsafeCoerce, uns...
benkolera/haskell-opaleye
src/Opaleye/Column.hs
Haskell
bsd-3-clause
2,189
-- | -- Module: Network.FastIRC.ServerSet -- Copyright: (c) 2010 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- Stability: alpha -- -- Functions for dealing with sets of IRC servers. Note that servers -- are compared case-insensitively. module Network.FastIRC.ServerSet...
chrisdone/hulk
fastirc-0.2.0/Network/FastIRC/ServerSet.hs
Haskell
bsd-3-clause
1,603
-- This is a modification of the calendar program described in section 4.5 -- of Bird and Wadler's ``Introduction to functional programming'', with -- two ways of printing the calendar ... as in B+W, or like UNIX `cal': -- Run using: calFor "1996" -- or: putStr (calendar 1996) -- or: putStr (cal 1996)...
OS2World/DEV-UTIL-HUGS
demos/Calendar.hs
Haskell
bsd-3-clause
4,964
module C3 (module D, module C3) where import D3 as D hiding (anotherFun) anotherFun (x:xs) = sq x + anotherFun xs anotherFun [] = 0
RefactoringTools/HaRe
old/testing/duplication/C3_TokOut.hs
Haskell
bsd-3-clause
144
{-# LANGUAGE GADTs, TypeOperators, PolyKinds #-} module T16074 where import GHC.Types data a :~: b where Refl :: a :~: a foo :: TYPE a :~: TYPE b foo = Refl
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T16074.hs
Haskell
bsd-3-clause
161
module RecNat where {- imports will be added for the PointlessP librasies -} recNat :: Int -> (Int -> a -> a) -> a -> a recNat 0 f z = z recNat n f z = f (n-1) (recNat (n-1) f z) --Programatica parser can't read: -- recNat (n+1) f z = f n (recNat n f z) -- the whole expression will be selected for tran...
kmate/HaRe
old/testing/pointwiseToPointfree/RecNat.hs
Haskell
bsd-3-clause
511
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Word -- Copyright : (c) The University of Glasgow, 1997-2002 -- License ...
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Word.hs
Haskell
bsd-3-clause
26,222