code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Network.Gitit.Plugins.Ditaa (plugin) where
{-
This plugin allows you to include a ditaa diagram
in a page like this:
~~~ {.ditaa name="ditaa_diagram1"}
+--------+ +-------+ +-------+
| | --+ ditaa +--> | |
| Text | +-------+ |diagram|
|Docum... | jraygauthier/jrg-gitit-plugins | src/Network/Gitit/Plugins/Ditaa.hs | gpl-2.0 | 3,409 | 0 | 20 | 955 | 605 | 330 | 275 | 43 | 3 |
module Moves where
import Debug.Trace (traceShow)
import Data.List (intersect)
import Data.Maybe
import Control.Applicative
import qualified Data.Array as A
import Data.Sequence as S
import ChessData
import Board
import Vectors
import Eval
import Query
-- Generate all pseudo-legal moves from a given board position ... | CameronDiver/hschess | src/moves.hs | gpl-3.0 | 5,642 | 0 | 15 | 1,572 | 1,876 | 979 | 897 | 99 | 3 |
module TaskTree.Lib.Edit
()
where
import TaskTree.Lib.Tree (Tree)
-- TODO do you need the first Tree?
data Edit
= Error String
| Up
| Down Tree
| Insert Tree Int Tree -- old, index/pos, new
| Delete Tree Int -- old, index/pos
| Move -- TODO
deriving Show
| jefdaj/todotree | old/TaskTree/Lib/Edit.hs | gpl-3.0 | 277 | 0 | 6 | 69 | 64 | 41 | 23 | 11 | 0 |
(Writer (a, w)) >>= f = let Writer (b, w') = f a
in Writer (b, w `mappend` w') | hmemcpy/milewski-ctfp-pdf | src/content/3.4/code/haskell/snippet11.hs | gpl-3.0 | 103 | 0 | 10 | 43 | 63 | 32 | 31 | 2 | 1 |
module Sound ( play
, playBackground
, pauseBackgroundMusic
, resumeBackgroundMusic
, endBackgroundMusic
) where
{- Requires (Haskell) sdl, sdl-mixer, (non-Haskell) sdl_mixer -}
import Control.Monad
import Control.Monad.Fix
import Control.Concurrent.Asy... | exitmouse/proper | src/Sound.hs | gpl-3.0 | 1,695 | 0 | 14 | 391 | 499 | 247 | 252 | 56 | 1 |
module Suggestions where
import Data.Char (toLower)
import Data.List (intercalate, sortBy, minimumBy)
import qualified Data.Map as M
import Data.Maybe (isJust, fromJust)
import DataTypes
import ShrdliteGrammar
import Plan
import Interpreter
sug... | carlostome/shrdlite | haskell/Suggestions.hs | gpl-3.0 | 7,085 | 0 | 20 | 2,154 | 1,941 | 999 | 942 | 132 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/FilteredBids/Creatives/List.hs | mpl-2.0 | 8,521 | 0 | 20 | 1,790 | 993 | 578 | 415 | 151 | 1 |
--
-- Copyright 2017-2018 Azad Bolour
-- Licensed under GNU Affero General Public License v3.0 -
-- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md
--
module Bolour.Util.MiscUtil (
debug
, setListElement
, isPositive
, nonPositive
, fromRight
, mkUuid
, returnR
, returnL
, isAlphaN... | azadbolour/boardgame | haskell-server/src/Bolour/Util/MiscUtil.hs | agpl-3.0 | 3,519 | 0 | 13 | 702 | 1,164 | 626 | 538 | 83 | 2 |
-- ----------------------------------------------------------------------
-- Copyright 2010-2011 National University of Ireland.
-- ----------------------------------------------------------------------
-- This file is part of DysVunctional Language.
--
-- DysVunctional Language is free software; you can redistribute ... | axch/dysvunctional-language | haskell-fol/FOL/Language/Pretty.hs | agpl-3.0 | 1,707 | 0 | 8 | 331 | 273 | 158 | 115 | 29 | 1 |
{-
Copyright (C) 2013–2014 Albert Krewinkel <tarleb@moltkeplatz.de>
This file is part of ZeitLinse.
ZeitLinse is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your o... | tarleb/zeitlinse | src/ZeitLinse/Core/ZeitScore.hs | agpl-3.0 | 1,746 | 0 | 9 | 314 | 167 | 96 | 71 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-|
Module providing Bitcoin script evaluation. See
<https://github.com/bitcoin/bitcoin/blob/master/src/script.cpp>
EvalScript and <https://en.bitcoin.it/wiki/Script>
-}
module Network.Haskoin.Script.Evaluator
(
-- * Script evaluation
verifySpend
, evalScript
, SigCheck
, Flag
-- * Eva... | nuttycom/haskoin | Network/Haskoin/Script/Evaluator.hs | unlicense | 27,294 | 0 | 18 | 7,412 | 7,742 | 3,993 | 3,749 | 561 | 20 |
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
--
-- Copyright : (c) T.Mishima 2014
-- License : Apache-2.0
--
module Hinecraft.Rendering.WorldView
( WorldViewVHdl (blockTexture)
, initWorldView
, drawWorldView
, genChunkVAO
, WorldVAOList
, initWorldVAOList
, getBlockVAOList
, setBlockVAOList
, upd... | tmishima/Hinecraft | Hinecraft/Rendering/WorldView.hs | apache-2.0 | 17,007 | 0 | 27 | 4,980 | 6,172 | 3,246 | 2,926 | 412 | 16 |
import Data.List (delete, genericIndex, genericReplicate, genericTake, nub, permutations, sortOn, tails)
import Data.Set (Set)
import qualified Data.Set as Set
import Helpers.SetHelpers (flatMap)
import Helpers.ListHelpers (cartesianProduct)
import qualified Data.MemoCombinators as Memo
type Base = [Integer]
type C... | peterokagey/haskellOEIS | src/Sandbox/Sami/SpinningSwitches/CyclicGroup2.hs | apache-2.0 | 3,839 | 0 | 15 | 682 | 909 | 495 | 414 | 40 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
module Lycopene.Core.Sprint where
import Data.Char (toLower)
import qualified Data.Text as T
import GHC.Generics
import Data.Aeson (ToJSON(..), FromJSON(..))
import Data.Aeson.Types
(typeMismatch, Value(..)... | utky/lycopene | src/Lycopene/Core/Sprint.hs | apache-2.0 | 3,499 | 0 | 11 | 755 | 939 | 513 | 426 | 93 | 1 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.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 required by applicable law or... | shockkolate/lambdircd | plugins/Core/Nick.hs | apache-2.0 | 1,663 | 0 | 15 | 312 | 353 | 188 | 165 | 24 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Pass
-- Copyright : (c) 2014 Ondřej Súkup
-- : (c) 2014 Moritz Ulrich
-- License :
--
--
-- Maintainer : Ondřej Súkup
-- Stability : unstable
-- Portability : unportable
--
-... | mimi1vx/dotfiles | home/.xmonad/lib/XMonad/Prompt/Pass.hs | bsd-2-clause | 1,783 | 0 | 11 | 409 | 275 | 156 | 119 | 24 | 1 |
import System.Environment
data PaSym = PaLeft | PaRight | PaText String deriving (Show)
-- Lexical analysis
lxChar :: Char -> PaSym
lxChar '(' = PaLeft
lxChar ')' = PaRight
lxChar ch = PaText [ch]
lxString :: String -> [PaSym]
lxString = foldr lxFold [] . map lxChar
lx :: String -> [PaSym]
lx = concat . map lxStrin... | carlmartus/helloworlds | haskell/sexp.hs | bsd-2-clause | 1,010 | 0 | 13 | 256 | 428 | 227 | 201 | 29 | 4 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | pbrisbin/devsite | Settings.hs | bsd-2-clause | 3,154 | 0 | 9 | 537 | 396 | 239 | 157 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QPrintDialog_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:16
Warning : this file is machine generated - d... | keera-studios/hsQt | Qtc/Gui/QPrintDialog_h.hs | bsd-2-clause | 65,399 | 0 | 18 | 13,921 | 21,325 | 10,273 | 11,052 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# OPTIONS_GHC -Wall #-}
module Main where
import NumHask.Prelude
import NumHask.Laws
import NumHask.Array
import Test.DocTest
import Test.Tasty
(TestTree, defaultMain, testGroup, localOption)
import Test.Tasty.QuickCheck
main :: IO ()
main = do
putStrLn ("Array DocTest" :: Text... | tonyday567/naperian | test/test.hs | bsd-3-clause | 4,371 | 0 | 14 | 986 | 1,472 | 773 | 699 | 104 | 1 |
{-#LANGUAGE Arrows, TypeSynonymInstances, FlexibleInstances,
FlexibleContexts, NoMonomorphismRestriction #-}
module Web.Horse.Forms.Types where
import Control.Arrow.Transformer.Automaton.Monad
import Control.Arrow.Transformer.Automaton.Maybe
import Control.Arrow.Transformer.LabeledArrow
import Debug.Trace
import Da... | jhp/on-a-horse | Web/Horse/Forms/Types.hs | bsd-3-clause | 3,149 | 4 | 16 | 816 | 1,139 | 618 | 521 | 74 | 2 |
{-# LANGUAGE DeriveGeneric #-}
module Text.OrgMode.Elements.Head where
import Control.Applicative hiding ((<|>), many)
import Data.Text (Text)
import qualified Data.Text as T
import Text.Parsec
import GHC.Generics
import Text.OrgMode.Elements.Keyword
import Text.OrgMode.Parsers.Utils
data Head = Head { level ::... | cvb/hs-orgmode | Text/OrgMode/Elements/Head.hs | bsd-3-clause | 2,049 | 0 | 14 | 578 | 723 | 377 | 346 | 50 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module RotateSome where
import Utils
import Test.QuickCheck (Arbitrary, arbitrary, choose)
import XMonad.StackSet (Stack, integrate, up)
import XMonad.Actions.RotateSome (rotateSome)
newtype Divisor = Divisor Int deriving Show
inst... | xmonad/xmonad-contrib | tests/RotateSome.hs | bsd-3-clause | 1,669 | 0 | 10 | 312 | 527 | 290 | 237 | 30 | 1 |
{-# LANGUAGE CPP #-}
{- |
Module : Main
Description :
License : BSD3
Maintainer : atomb
Stability : provisional
-}
module Main where
import Control.Exception
import Control.Monad
import Data.Maybe
import System.IO
import System.Console.GetOpt
import System.Environment
import System.Directory
import SAWSc... | GaloisInc/saw-script | saw/Main.hs | bsd-3-clause | 1,936 | 0 | 20 | 479 | 499 | 253 | 246 | 44 | 7 |
import System.IO
import System.Directory
import Data.List
import Control.Exception
main = do
contents <- readFile "src/files_for_stream/todo.txt"
let todoTasks = lines contents
numberedTasks = zipWith (\n line -> show n ++ " - " ++ line) [0..] todoTasks
putStrLn "These are your TO-DO items:"
ma... | ku00/h-book | src/DeleteToDo.hs | bsd-3-clause | 1,179 | 0 | 15 | 275 | 235 | 114 | 121 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.TOML where
import qualified Data.Attoparsec.ByteString.Char8 as A
import qualified Data.ByteString.Char8 as B
import Data.List ( foldl', groupBy )
import Data.Either ( rights )
import Data.Map ( Map )
import qualified Data.Map as M
import Text.TOML.Parser
import Text.TOM... | seliopou/toml | src/Text/TOML.hs | bsd-3-clause | 2,070 | 0 | 12 | 560 | 799 | 432 | 367 | 35 | 7 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Numeral.HR.Tests
( tests ) where
import Data.String
import Prelude
import Test.Tasty
import Du... | facebookincubator/duckling | tests/Duckling/Numeral/HR/Tests.hs | bsd-3-clause | 503 | 0 | 9 | 77 | 79 | 50 | 29 | 11 | 1 |
module IRTS.Cil.Builders where
import Language.Cil
privateSealedClass :: TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef
privateSealedClass = classDef [CaPrivate, CaSealed, CaBeforeFieldInit]
publicSealedClass :: TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> ... | bamboo/idris-cil | src/IRTS/Cil/Builders.hs | bsd-3-clause | 801 | 0 | 11 | 154 | 244 | 135 | 109 | 13 | 1 |
module Mistral.TypeCheck.Env (
Env(..)
, VarType(..), vtSchema, vtExpr
, lookupEnv, addSchema, checkingSchema, primitiveSchema
, lookupTSyn, addTSyn
, depModules
, showEnv
, getInsts
) where
import qualified Mistral.ModuleSystem.Interface as Iface
import Mistral.ModuleSystem.Name ( Name )
i... | GaloisInc/mistral | src/Mistral/TypeCheck/Env.hs | bsd-3-clause | 4,424 | 0 | 14 | 1,274 | 1,387 | 730 | 657 | 92 | 3 |
{-
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Kubernetes API version: v1.9.12
Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
-}
{-|
Module : Kubernetes.OpenAPI.API.Version... | denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/API/Version.hs | bsd-3-clause | 2,282 | 0 | 8 | 290 | 433 | 308 | 125 | -1 | -1 |
{-# LANGUAGE RelaxedPolyRec #-}
-- | Duck prefix trie data structure
--
-- A prefix trie represents a partial map @[k] -> v@ with the property that no
-- key is a proper prefix of any other key. This version additionaly maps
-- every prefix @[k] -> a@.
--
-- For example, a prefix trie can be used to represent the typ... | girving/duck | duck/Ptrie.hs | bsd-3-clause | 2,172 | 0 | 12 | 552 | 1,162 | 586 | 576 | 51 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Example application.
module Main where
import Data.Maybe
import React
import React.Ace as Ace
import React.Builder
import React.Internal
import React.Lucid
impor... | fpco/ghcjs-react | examples/Main.hs | bsd-3-clause | 1,206 | 0 | 12 | 282 | 342 | 176 | 166 | 44 | 1 |
module Config where
import Data.Configurator
import Data.Configurator.Types as C
import Data.Default (def)
import Data.Text as T
import System.FilePath (joinPath)
import Text.Pandoc.Options
import Definition
-- | The base URL of the website
base_url = "http://www.example.com"
-- | The directory where the project i... | mazelife/agilulf | src/Agiluf/Config.hs | bsd-3-clause | 3,084 | 0 | 11 | 459 | 607 | 327 | 280 | 45 | 1 |
{-
(c) The University of Glasgow, 2000-2006
\section[Finder]{Module Finder}
-}
{-# LANGUAGE CPP #-}
module Finder (
flushFinderCaches,
FindResult(..),
findImportedModule,
findExactModule,
findHomeModule,
findExposedPackageModule,
mkHomeModLocation,
mkHomeModLocation2,
mkHiOnlyModL... | gcampax/ghc | compiler/main/Finder.hs | bsd-3-clause | 25,473 | 1 | 20 | 7,392 | 4,951 | 2,521 | 2,430 | 392 | 11 |
module Problem54 where
import Data.Char
import Data.List
main :: IO ()
main = do
contents <- readFile "txt/54.txt"
print
. length
. filter (== 1)
. map (getWinner . splitAt 5 . map toCard . words)
. lines
$ contents
getWinner :: ([Card], [Card]) -> Int
getWinner (h1, h... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem54.hs | bsd-3-clause | 2,731 | 0 | 16 | 932 | 1,012 | 523 | 489 | 87 | 6 |
module Main
( main -- :: IO ()
) where
import Control.Monad (liftM)
import Criterion.Main (bgroup, defaultMain)
import BLAKE (benchmarks)
import BLAKE2 (benchmarks)
import Box (benchmarks)
import ChaCha20 (ben... | thoughtpolice/hs-nacl | benchmarks/bench.hs | bsd-3-clause | 1,801 | 0 | 9 | 760 | 374 | 230 | 144 | 37 | 1 |
#define IncludedmapShiftZero
mapShiftZero :: RString -> RString -> List Integer -> Proof
{-@ mapShiftZero :: target:RString -> i:RString -> is:List (GoodIndex i target)
-> {map (shiftStringRight target stringEmp i) is == is }
/ [llen is] @-}
mapShiftZero target i N
= map (shiftStringRight target stringEmp i)... | nikivazou/verified_string_matching | src/Proofs/mapShiftZero.hs | bsd-3-clause | 781 | 0 | 19 | 154 | 251 | 126 | 125 | 11 | 1 |
{-# LANGUAGE CPP, BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
------------------------------------------------------------------------------
-- |
-- Module: Blaze.ByteString.Builder
-- Copyright: (c) 2013 Leon P Smith
-- License: BSD3
-- Maintainer: Leon P Smith <leon@melding-mona... | lpsmith/blaze-builder-compat | src/Blaze/ByteString/Builder.hs | bsd-3-clause | 6,342 | 0 | 20 | 2,064 | 1,032 | 566 | 466 | 89 | 4 |
module Day3 where
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as C
import Data.ByteString (ByteString)
import Data.Maybe
import Data.Char
data Unvalidated
data Validated
data P3 a = P3 !Int !Int !Int deriving (Show, Eq)
validate :: P3 Unvalidated -> May... | cl04/advent2016 | src/Day3.hs | bsd-3-clause | 1,134 | 0 | 15 | 295 | 538 | 273 | 265 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Data.Lambda.UnTyped where
import Data.Data (Data)
import Data.Typeable (Typeable)
import Test.QuickCheck
import Text.Read
import Control.Applicative
import Data.Name
-- $setup
-- >>> :set -XOverloadedStrings
-- >>> :set -XScopedTypeVariables
data Lambda
= Variable Name... | kmyk/proof-haskell | Data/Lambda/UnTyped.hs | mit | 2,796 | 0 | 15 | 745 | 752 | 396 | 356 | 54 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Rank2Types #-}
module CO4.THUtil
where
import Data.Generics (GenericT,everywhere,mkT)
import qualified Language.Haskell.TH as TH
import qualified Data.Map as M
import CO4.Names
import CO4.Util (extT')
import CO4.Frontend.THPreproces... | apunktbau/co4 | src/CO4/THUtil.hs | gpl-3.0 | 3,224 | 0 | 12 | 791 | 1,286 | 668 | 618 | 77 | 2 |
-- Copyright (C) 2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library i... | atodorov/bdcs | src/BDCS/Label/Types.hs | lgpl-2.1 | 1,913 | 0 | 9 | 463 | 269 | 169 | 100 | 29 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module GramLab.Data.Diff.EditTree2Rev ( make
, apply
, size
, check
, EditTree(..)
)
wh... | bitemyapp/morfette | src/GramLab/Data/Diff/EditTree2Rev.hs | bsd-2-clause | 626 | 0 | 9 | 263 | 191 | 105 | 86 | 12 | 1 |
-- | The main loop of the server, processing human and computer player
-- moves turn by turn.
module Game.LambdaHack.Server.EndServer
( endOrLoop, dieSer
) where
import Control.Monad
import qualified Data.EnumMap.Strict as EM
import Data.Maybe
import Game.LambdaHack.Atomic
import Game.LambdaHack.Common.Actor
impo... | Concomitant/LambdaHack | Game/LambdaHack/Server/EndServer.hs | bsd-3-clause | 3,617 | 0 | 16 | 786 | 1,004 | 514 | 490 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Main where
import Prelude hiding ((+),map,(!!))
import Nat
import Stream
fib :: Nat -> Nat
fib Zero = Zero
fib (Succ Zero) = Succ Zero
fib (Succ (Succ n)) = fib (Succ n) + fib n
wrap :: Stream a -> (Nat -> a)
wrap s n = s !! n
unwrap :: (Nat -> a) -> Stream a
unwrap f =... | conal/hermit | examples/fib-stream/Fib.hs | bsd-2-clause | 387 | 0 | 9 | 106 | 197 | 105 | 92 | 15 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples,
StandaloneDeriving, AutoDeriveTypeable, NegativeLiterals #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Int
-... | pparkkin/eta | libraries/base/GHC/Int.hs | bsd-3-clause | 33,337 | 0 | 17 | 11,098 | 8,718 | 4,484 | 4,234 | 564 | 2 |
{-#LANGUAGE ScopedTypeVariables #-}
module Main where
import CV.Image
import CV.MultiresolutionSpline
import CV.ImageOp
import CV.Drawing
import CV.Filters
import CV.ImageMathOp
import Control.Applicative
import Data.Maybe
import qualified CV.ImageMath as IM
import CV.Transforms
import System.Environment
absTresh ::... | TomMD/CV | examples/PyramidNoise.hs | bsd-3-clause | 728 | 0 | 14 | 131 | 237 | 124 | 113 | 21 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ExistentialQuantification #-}
-- |
-- Module : Data.Stream.Monadic
-- Copyright : (c) 2014 Kim Altintop
-- License : BSD3
-- Maintainer : kim.altintop@gmail.com
-- Stability : experimental
-- Portability : non-portable
--
-- (Mostly mechanical) adap... | kernelim/leveldb-haskell | src/Data/Stream/Monadic.hs | bsd-3-clause | 35,760 | 0 | 19 | 12,970 | 12,346 | 6,276 | 6,070 | 868 | 12 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind
data SameKind :: forall k. k -> k -> Type
data Foo :: forall a k (b :: k). SameKind a b -> Type where
MkFoo :: Foo sameKind
| sdiehl/ghc | testsuite/tests/polykinds/T16247.hs | bsd-3-clause | 250 | 0 | 7 | 50 | 68 | 42 | 26 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
module Tc251_Help where
import Data.Kind (Type)
class Cls a where
type Fam a :: Type
type Fam a = Maybe a
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/Tc251_Help.hs | bsd-3-clause | 146 | 0 | 7 | 35 | 43 | 25 | 18 | -1 | -1 |
module GuardsCase1 where
f x = case x of
1 -> let g x = x + 1 in g x
_ -> 42 | kmate/HaRe | old/testing/whereToLet/GuardsCase1_TokOut.hs | bsd-3-clause | 113 | 0 | 12 | 60 | 49 | 24 | 25 | 4 | 2 |
{-# LANGUAGE TypeOperators, TypeFamilies #-}
module T2544 where
data (:|:) a b = Inl a | Inr b
class Ix i where
type IxMap i :: * -> *
empty :: IxMap i [Int]
data BiApp a b c = BiApp (a c) (b c)
instance (Ix l, Ix r) => Ix (l :|: r) where
type IxMap (l :|: r) = BiApp (IxMap l) (IxMap r)
... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/indexed-types/should_fail/T2544.hs | bsd-3-clause | 977 | 0 | 8 | 286 | 166 | 98 | 68 | 10 | 0 |
{-# LANGUAGE RebindableSyntax, NPlusKPatterns #-}
{-# OPTIONS -Wno-error=missing-monadfail-instances #-}
module Main where
{
-- import Prelude;
import qualified Prelude;
import Prelude(String,undefined,Maybe(..),IO,putStrLn,
Integer,(++),Rational, (==), (>=) );
deb... | sdiehl/ghc | testsuite/tests/rebindable/rebindable3.hs | bsd-3-clause | 4,339 | 1 | 23 | 1,893 | 1,121 | 611 | 510 | 82 | 1 |
module StackTest where
import Control.Exception
import System.Environment
import System.FilePath
import System.Directory
import System.IO
import System.Process
import System.Exit
run' :: FilePath -> [String] -> IO ExitCode
run' cmd args = do
putStrLn $ "Running " ++ cmd ++ " with args " ++ show args
(Nothing,... | wskplho/stack | test/integration/lib/StackTest.hs | bsd-3-clause | 1,836 | 0 | 15 | 516 | 644 | 314 | 330 | 59 | 3 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Betfair.StreamingAPI.API.Log
( Log
, Direction(..)
, toLog
, tracePPLog
, traceLog
, stdOutAndLog
) where
import qualified Data.Text as T
... | joe9/streaming-betfair-api | src/Betfair/StreamingAPI/API/Log.hs | mit | 1,581 | 0 | 9 | 412 | 490 | 265 | 225 | 51 | 1 |
-- Reverse list
-- https://www.codewars.com/kata/57a04da9e298a7ee43000111
module ReverseList where
reverseList :: [Int] -> [Int]
reverseList = reverse
| gafiatulin/codewars | src/7 kyu/ReverseList.hs | mit | 153 | 0 | 6 | 18 | 26 | 17 | 9 | 3 | 1 |
-- Lua 5.2 Parser using Parsec
-- Matt Donovan
module Parser
( parseFile
, parseString
, Chunk(..)
, Stat(..)
, RetStat(..)
, Var(..)
, Exp(..)
, TblLookup(..)
, FnCall(..)
, FnCallArgs(..)
, Args(..)
, FuncBody(..)
, ParList(..)
, Field(..)
, BinOp(..)
, UnOp(..)
) where
import Text.ParserCombinators.Parsec
import... | MattKD/hlua_parser | Parser.hs | mit | 12,960 | 0 | 18 | 3,899 | 3,912 | 1,958 | 1,954 | 358 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Hickory.Text.Font where
import Data.Attoparsec.Text
{-import Data.Attoparsec.Char8-}
import Data.Hashable
import Control.Applicative
import qualified Data.Text as Text
data FontInfo a = FontInfo {
lineHeight :: a,
base :: a,
scaleW ::... | asivitz/Hickory | Hickory/Text/Font.hs | mit | 4,658 | 0 | 15 | 1,508 | 1,413 | 757 | 656 | 106 | 4 |
module Main where
import Control.Applicative
import Control.Monad (unless, when)
import Data.Maybe
import qualified Graphics.UI.GLFW as GLFW
import System.Environment
import System.Exit
import System.IO
import Draw2
import Control (movement)
import Entity
import Util (nth)
main :: IO ()
main = do
xs <- getArgs
l... | joelelmercarlson/bifrost | src/Main.hs | mit | 1,955 | 0 | 16 | 470 | 642 | 310 | 332 | 58 | 2 |
{-# LANGUAGE RecordWildCards #-}
module LLVM.Typed (
Typed(..),
) where
import LLVM.AST
import LLVM.AST.Global
import LLVM.AST.Type
import qualified LLVM.AST.Constant as C
import qualified LLVM.AST.Float as F
-----
-- Reasoning about types
-----
class Typed a where
typeOf :: a -> Type
instance Typed Operand... | vjoki/llvm-hs-pretty | src/LLVM/Typed.hs | mit | 4,340 | 0 | 11 | 1,388 | 1,586 | 810 | 776 | 88 | 1 |
{-
--------------------------------------------------------------------------------------------------------------
Program : stringFunctions.hs
Professor : Richard Riehle
Programmer : Jigar Gosalia (89753)
Description : Learn String Functions in Haskell.
References : https://lotz84.github.io/has... | gosaliajigar/Languages | Haskell/stringFunctions.hs | mit | 2,197 | 0 | 14 | 583 | 561 | 274 | 287 | 31 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Skybox (
Skybox (..)
, initSkybox
, skyboxRender
) where
import Graphics.Rendering.OpenGL
import Hogldev.Pipeline (
Pipeline(..), getTrans,
PersProj(..)
)
import Hogldev.Camera (Camer... | triplepointfive/hogldev | tutorial25/Skybox.hs | mit | 1,741 | 0 | 11 | 547 | 346 | 189 | 157 | 52 | 1 |
-- Copyright 2013 Thomas Szczarkowski
module CTR2 where
import Data.Bits
import Data.Word
import Data.Char
import Data.Function
import Data.List
import Data.Array.IArray
import Control.Monad
import OpenSSL.Symmetric
import OpenSSL.Random
import Bytes
import Ciphers
import CryptoRandom
import CTR
import LanguageModel... | tom-szczarkowski/matasano-crypto-puzzles-solutions | set3/CTR2.hs | mit | 2,303 | 1 | 18 | 689 | 811 | 420 | 391 | -1 | -1 |
-- No oddities here
-- http://www.codewars.com/kata/51fd6bc82bc150b28e0000ce
module Codewars.Oddities where
noOdds :: Integral n => [n] -> [n]
noOdds = filter even
| gafiatulin/codewars | src/7 kyu/Oddities.hs | mit | 166 | 0 | 7 | 23 | 38 | 22 | 16 | 3 | 1 |
{-
Yesod.Auth.Accountの中に、なぜか意図的にCSRFトークンを出力していない
フォームがあり、当然ながらCSRFチェックでエラーになってしまうため
使えなかった.
これを改善するため、一部ソースを改変したバージョンを作成する.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE M... | jabaraster/jabara-yesod-auth-freeaccount | src/Jabara/Yesod/Auth/FreeAccount.hs | mit | 43,058 | 0 | 21 | 11,467 | 6,581 | 3,463 | 3,118 | 493 | 10 |
module Cost
where
import Libaddutil.Misc (clamp)
import Types
import Production
import Curve
type CostFunction = (Price, ProductionFunction)
-- Derive CostFunction on quantity - result is MR.
-- CostFunction is of type f(q) = fc + vc(q)
-- Variable costs must raise for large q.
-- Otherwise an unlimited quantity wi... | anttisalonen/economics | src/Cost.hs | mit | 2,489 | 0 | 14 | 474 | 835 | 436 | 399 | 39 | 3 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.MediaKeyNeededEvent
(js_getInitData, getInitData, MediaKeyNeededEvent,
castToMediaKeyNeededEvent, gTypeMediaKeyNeededEvent)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Dou... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaKeyNeededEvent.hs | mit | 1,432 | 6 | 10 | 165 | 371 | 236 | 135 | 24 | 1 |
{-|
Module : PostgREST.Config
Description : Manages PostgREST configuration options.
This module provides a helper function to read the command line arguments using the optparse-applicative
and the AppConfig type to store them.
It also can be used to define other middleware configuration that may be delegated to ... | motiz88/postgrest | src/PostgREST/Config.hs | mit | 4,509 | 0 | 17 | 1,224 | 871 | 464 | 407 | 67 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import qualified Data.ByteString.Lazy as BS
import qualified Data.Map as Map
import qualified Data.Text as Text
import Data.Aeson (encode)
import Data.Char (toLower)
import Control.Monad (forM... | abhin4v/ringo | ringo/src/Main.hs | mit | 3,582 | 0 | 17 | 861 | 1,049 | 553 | 496 | 69 | 3 |
module Application.Engine where
import Application.Types
import qualified Data.Map as M
evalEvent :: Event -> AppState -> AppState
evalEvent (AddTopic t) as = addTopic t as
evalEvent (DeleteTopic t) as = deleteTopic t as
evalEvent (AddRoom r) as = addRoom r as
evalEvent (DeleteRoom r)... | kRITZCREEK/FROST-Backend | src/Application/Engine.hs | mit | 2,426 | 0 | 12 | 669 | 944 | 492 | 452 | 45 | 1 |
split :: [a] -> Int -> ([a], [a])
split (x:xs) n | n > 0 = let (f, l) = split xs (n - 1) in (x : f, l)
split xs _ = ([], xs)
| curiousily/haskell-99problems | 17.hs | mit | 125 | 0 | 12 | 36 | 114 | 61 | 53 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Kashmir.Web where
import Data.Aeson
import Data.ByteString
import Snap
mimeTypeJson, mimeTypeCss :: ByteString
mimeTypeJson = "application/json"
mimeTypeCss = "text/css"
------------------------------------------------------------
jsonResponse... | krisajenkins/kashmir | src/Kashmir/Web.hs | epl-1.0 | 1,701 | 0 | 9 | 344 | 470 | 235 | 235 | 45 | 1 |
module HSE.NameMatch(
Scope, emptyScope, moduleScope, scopeImports,
NameMatch, nameMatch, nameQualify
) where
import HSE.Type
import HSE.Util
import Data.List
import Data.Maybe
{-
the hint file can do:
import Prelude (filter)
import Data.List (filter)
import List (filter)
then filter on it's own will g... | alphaHeavy/hlint | src/HSE/NameMatch.hs | gpl-2.0 | 3,199 | 0 | 11 | 833 | 1,152 | 583 | 569 | 52 | 7 |
module HLinear.Hook.ERHook.Algebra
where
import qualified Prelude as P
import HLinear.Utility.Prelude
import HLinear.Hook.ERHook.Definition
import qualified HLinear.Hook.EchelonForm as EF
import qualified HLinear.Matrix.Block as M
instance Ring a => MultiplicativeMagma (ERHook a) where
{-# INLINABLE (*) #-}
(ER... | martinra/hlinear | src/HLinear/Hook/ERHook/Algebra.hs | gpl-3.0 | 578 | 0 | 10 | 108 | 188 | 105 | 83 | 14 | 0 |
module Declare.Attract where
import Types
data Attract = Attract
{ xName :: Maybe String
, xClass :: Maybe String
, xRole :: Maybe String
, xTrans :: Maybe Bool
, xFocus :: Maybe (Either SpaceRef TileRef)
} deriving (Eq, Ord, Show)
| ktvoelker/argon | src/Declare/Attract.hs | gpl-3.0 | 250 | 0 | 11 | 59 | 86 | 48 | 38 | 9 | 0 |
{-# LANGUAGE ScopedTypeVariables, TemplateHaskell #-}
module Test.Scrooge where
import Data.Time as Time
import Data.Time.Calendar as Time
import Data.Time.Calendar.MonthDay as Time
import Control.Applicative
import Test.QuickCheck
import Test.QuickCheck.Text
import Test.QuickCheck.All
import Scrooge
instance Arbi... | grwlf/scrooge | Test/Scrooge.hs | gpl-3.0 | 713 | 0 | 13 | 124 | 252 | 134 | 118 | 20 | 1 |
import Instructions
import qualified Data.ByteString.Lazy as B
tab = compileTables [
Table "cmap" (cmapTable (cmapFormat0 0 (take 262 $ repeat 0))),
Table "glyf" (glyph 0 0 10 10 [0,1,2] (return ()) [3,3,3] [3,4,5] [6,7,8]),
Table "hhea" (hhea 0 0 0 1 0 0 0 0 0 1),
Table "hmtx" (hmtx (h... | jseaton/ttasm | ttasm.hs | gpl-3.0 | 672 | 0 | 14 | 191 | 352 | 184 | 168 | 13 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Variables/Create.hs | mpl-2.0 | 4,084 | 0 | 16 | 894 | 467 | 279 | 188 | 78 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/UpdateApplicationVersion.hs | mpl-2.0 | 5,047 | 0 | 9 | 974 | 563 | 343 | 220 | 68 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-maps-coordinate/gen/Network/Google/Resource/Coordinate/Jobs/List.hs | mpl-2.0 | 4,415 | 0 | 17 | 1,144 | 667 | 386 | 281 | 97 | 1 |
module LastDigit(lastDigit) where
get :: Integer -> Int -> Integer
get _ 0 = 1
get 0 _ = 0
get 1 _ = 1
get 2 n = (repeat [2, 4, 8, 6] >>= id) !! (n + 1)
get 3 n = (repeat [3, 9, 7, 1] >>= id) !! (n + 1)
get 4 n = (repeat [4, 6] >>= id) !! (n + 1)
get 5 n = 5
get 6 n = 6
get 7 n = (repeat [7, 9, 3, 1] >>= id) !! (n + 1... | ice1000/OI-codes | codewars/1-100/last-digit-of-a-huge-number.hs-wrong.hs | agpl-3.0 | 541 | 0 | 9 | 152 | 379 | 207 | 172 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
module Api.Services.AgdaService where
import Control.Lens
import Data.Aeson
import Snap.Core
import Snap.Snaplet
import AgdaComm.TypeCheck
import qualified Data.ByteString.Char8 as B
import Data.Text
import System.R... | qwe2/try-agda | src/Api/Services/AgdaService.hs | apache-2.0 | 1,401 | 0 | 16 | 244 | 403 | 207 | 196 | 44 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright 2017 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:/... | parvmor/codeworld | codeworld-collab-server/src/CodeWorld/CollabModel.hs | apache-2.0 | 2,021 | 0 | 10 | 438 | 321 | 191 | 130 | 39 | 0 |
module Sol2 where
import GS
import TAMO
-- 2.13
c1 = logEquiv1 (\p -> False) (\p -> not True)
c2 = logEquiv1 (\p -> p ==> False) (\p -> not p)
c3_1 = logEquiv1 (\p -> p || True) (\p -> True)
c3_2 = logEquiv1 (\p -> p && False) (\p -> False)
c4_1 = logEquiv1 (\p -> p || False) id
... | bartolkaruza/software-testing-2014-group-W1 | week1/week_1_group_w1/Sol2.hs | apache-2.0 | 1,780 | 0 | 12 | 625 | 965 | 524 | 441 | 33 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
--HaskerDeux
import System.Environment
import System.IO
import System.IO.Error
import System.Process
import Data.List
import Data.List.Split --need to install
import Data.Map
import Control.Monad
import Control.Applicative
import Data.Maybe
import Text.JSON --need to install for JSO... | atomicules/HaskerDeux | haskerdeux.hs | bsd-2-clause | 7,613 | 57 | 20 | 1,266 | 2,494 | 1,325 | 1,169 | 154 | 4 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
--------------------------------------------------------... | ekmett/ermine | src/Ermine/Syntax/Pattern.hs | bsd-2-clause | 10,403 | 0 | 16 | 2,184 | 3,329 | 1,714 | 1,615 | 243 | 7 |
module Language.Modelica.Parser.Programme where
import Language.Modelica.Syntax.Programme
import Language.Modelica.Parser.Parser (Parser)
import Language.Modelica.Parser.Lexer
import Language.Modelica.Parser.Utility (until)
import Prelude hiding (until)
import Text.ParserCombinators.Parsec
((<|>), try, manyTil... | xie-dongping/modelicaparser | src/Language/Modelica/Parser/Programme.hs | bsd-3-clause | 908 | 0 | 13 | 165 | 301 | 170 | 131 | 23 | 1 |
module Main (main) where
import Data.Bits
import Data.Word
import Data.Int
-- import Test.Framework (defaultMain, testGroup, testCase)
import Test.Framework
import Test.Framework.Providers.QuickCheck2
-- import Test.HUnit
import Data.IntCast (intCastMaybe)
-- test casting from type a to b (2nd argument is used as ... | hvr/int-cast | test/Suite.hs | bsd-3-clause | 11,262 | 0 | 10 | 2,357 | 2,918 | 1,590 | 1,328 | 141 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
-- render example to be polymorphism
--{-# LANGUAGE NoMonomorphismRestriction #-}
-- render example to be monomorphism
module DetermineTheType where
-- simple example
example = 1
| chengzh2008/hpffp | src/ch05-Types2/determineType.hs | bsd-3-clause | 225 | 0 | 4 | 32 | 14 | 11 | 3 | 3 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Language.Hakaru.Tests ( tests ) where
import qualified Language.Hakaru.Tests.ImportanceSampler as IS
import qualified Language.Hakaru.Tests.Metropolis as MH
import Distribution.TestSuite
import Distribution.TestSuite.QuickCheck
qtest = testProperty "Chunky monkey" Tr... | zaxtax/hakaru-old | Language/Hakaru/Tests.hs | bsd-3-clause | 368 | 0 | 6 | 44 | 76 | 49 | 27 | 9 | 1 |
module Text.Config.Parser
( loadConfigTmp
, confTmpParser
) where
import Text.Parsec
import Text.Parsec.ByteString
import Control.Applicative hiding (many, (<|>))
import qualified Data.ByteString.Char8 as BC
import Text.Config.Lib
import Text.Config.Types
loadConfigTmp :: String -> IO ConfTmp
loadConfigT... | yunomu/simple-config | Text/Config/Parser.hs | bsd-3-clause | 1,262 | 0 | 11 | 259 | 395 | 210 | 185 | 35 | 2 |
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------
-- |
-- Module : Text.Atom.Feed.Validate
-- Copyright : (c) Galois, Inc. 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Portability:
--
-------------------... | haskell-pkg-janitors/feed | Text/Atom/Feed/Validate.hs | bsd-3-clause | 9,317 | 21 | 22 | 2,324 | 2,552 | 1,312 | 1,240 | 212 | 13 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- | This module communicates and manages the state of clients
-- connected to the server.
module Hulk.Client
where
import Hulk.Auth
import Hulk.Types
import Control.Applicative... | jtojnar/hulk | src/Hulk/Client.hs | bsd-3-clause | 29,127 | 0 | 21 | 7,327 | 8,219 | 4,079 | 4,140 | 621 | 10 |
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
{- |
Module : Language.Haskell.TH.Quote
Description : Quasi-quoting support for Template Haskell
Template Haskell supports quasiquoting, which permits users to construct
program fragments by directly writing concrete syntax. A quasiquoter is
essentially a function with... | fmthoma/ghc | libraries/template-haskell/Language/Haskell/TH/Quote.hs | bsd-3-clause | 5,436 | 0 | 20 | 1,623 | 931 | 496 | 435 | 68 | 8 |
module SumLazy where
-- main :: IO ()
-- main = do
-- userInput <- getContents
-- mapM_ print userInput
toInts :: String -> [Int]
toInts = map read . lines
gojo :: IO ()
gojo = do
userInput <- getContents
let numbers = toInts userInput
print (mconcat["Ecco la somma dei numeri digitati: ",show (su... | stefanocerruti/haskell-primer-alpha | src/SumLazy.hs | bsd-3-clause | 332 | 0 | 13 | 78 | 93 | 49 | 44 | 8 | 1 |
{-# LANGUAGE Rank2Types #-}
module Generics.Deriving.Data where
import Generics.Deriving.Base
import Data.Data
--------------------------------------------------------------------------------
-- Generic Data
--------------------------------------------------------------------------------
{-
data T a ... | ekmett/generic-deriving | src/Generics/Deriving/Data.hs | bsd-3-clause | 1,401 | 1 | 15 | 511 | 150 | 81 | 69 | -1 | -1 |
module SkeletonTemplates.ZipWithVector where
import AstMappings
import qualified AbsCAL as C
import qualified AbsRIPL as R
import Debug.Trace
import SkeletonTemplates.CalTypes
import Types
zipWithVectorActor
:: String
-> R.TwoVarFun
-> Dimension
-> Dimension
-> C.Type
-> C.Type
-> C.Type
-> C.Actor
zi... | robstewart57/ripl | src/SkeletonTemplates/ZipWithVector.hs | bsd-3-clause | 4,821 | 0 | 20 | 1,249 | 1,392 | 721 | 671 | 120 | 1 |
module AddressSpec where
import Ssb.Address
import Test.Hspec
spec :: Spec
spec = describe "address" $ do
it "holds the dns or the ip address and the port" $ do
let address = Address "localhost" 8008
host address `shouldBe` "localhost"
port address `shouldBe` 8008
| bkil-syslogng/haskell-scuttlebutt | test/AddressSpec.hs | bsd-3-clause | 309 | 0 | 14 | 87 | 79 | 40 | 39 | 9 | 1 |
module BaseMon where
import Control.Concurrent
import Control.Monad
import Frenetic.NetCore
import System.IO
import Frenetic.Topo
import Repeater
import Data.Word
-- H1
-- |
-- S
-- / \
-- H2 H3
s = 101
h1 = 1
h2 = 2
h3 = 3
ns = [s,h1,h2,h3]
el= [((Frenetic.Topo.Switch 101, 1),(Host 1,0)),... | frenetic-lang/netcore-1.0 | examples/BaseMon.hs | bsd-3-clause | 1,889 | 0 | 19 | 407 | 405 | 235 | 170 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module PeerReview.ReviewRepo.Transaction
( save
, findByUserId
, findById
, findByTaskId
, findAll
, update
) where
import Data.Pool (Pool, withResource)
import Database.PostgreS... | keveri/peer-review-service | src/PeerReview/ReviewRepo/Transaction.hs | bsd-3-clause | 3,271 | 0 | 14 | 950 | 711 | 392 | 319 | 57 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.