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 Numeric.Semiring.Integral
( IntegralSemiring
) where
import Numeric.Algebra.Class
import Numeric.Natural
-- | An integral semiring has no zero divisors
--
-- > a * b = 0 implies a == 0 || b == 0
class (Monoidal r, Semiring r) => IntegralSemiring r
instance IntegralSemiring Integer
instance IntegralSemiri... | athanclark/algebra | src/Numeric/Semiring/Integral.hs | bsd-3-clause | 362 | 0 | 6 | 60 | 69 | 38 | 31 | -1 | -1 |
module Text.XHtml.Strict.Formlets ( input, textarea, password, file, checkbox
, hidden, inputInteger, radio, enumRadio
, label
, selectXHtml, selectRaw, select, enumSelect
, XHtmlForm,... | chriseidhof/formlets | Text/XHtml/Strict/Formlets.hs | bsd-3-clause | 5,090 | 0 | 13 | 1,454 | 1,706 | 909 | 797 | 78 | 3 |
module AERN2.Poly.Power.SizeReduction where
import AERN2.Poly.Basics
import AERN2.Poly.Power.Type
import MixedTypesNumPrelude
import qualified Data.Map as Map
import AERN2.MP.Ball hiding (iterateUntilAccurate)
reduceDegree :: PowPoly MPBall -> MPBall -> MPBall -> Integer -> PowPoly MPBall
reduceDegree (PowPoly (Poly ... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Poly/Power/SizeReduction.hs | bsd-3-clause | 750 | 0 | 14 | 149 | 315 | 169 | 146 | 18 | 1 |
-- File created: 2009-08-08 16:39:10
module Haschoo.Evaluator.Standard.Eval (procedures) where
import Data.IORef (newIORef)
import Haschoo.Types (ScmValue(..), runHaschoo)
import Haschoo.Utils (ErrOr)
import Haschoo.Evaluator.Eval (eval)
import Haschoo.Evaluator.Utils (tooFewArgs, tooManyArgs)
... | Deewiant/haschoo | Haschoo/Evaluator/Standard/Eval.hs | bsd-3-clause | 858 | 0 | 9 | 180 | 256 | 146 | 110 | 14 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
module Network.IIRCC where
import Codec.CBOR.Read
import Codec.CBOR.Write... | Rotaerk/iircc | src/common/Network/IIRCC.hs | bsd-3-clause | 6,967 | 0 | 14 | 1,027 | 1,514 | 791 | 723 | 146 | 10 |
{-#LANGUAGE FlexibleInstances #-}
{-#LANGUAGE MultiParamTypeClasses #-}
{-#LANGUAGE OverloadedStrings #-}
{-#LANGUAGE ViewPatterns #-}
module Twilio.Tokens
( -- * Resource
Token(..)
, IceServer(..)
, Twilio.Tokens.post
) where
import Control.Applicative
import Control.Error.Safe
import Control.Monad
impor... | seagreen/twilio-haskell | src/Twilio/Tokens.hs | bsd-3-clause | 2,390 | 0 | 18 | 530 | 665 | 366 | 299 | 93 | 1 |
import B
-- see slides 426-429 for the fold for arithmetic expressions
foldB :: r -> r -> (r -> r -> r -> r) -> B -> r
foldB r _ _ TrueB = r
foldB _ r _ FalseB = r
foldB r1 r2 f (IfB x y z) =
f (fold x) (fold y) (fold z)
where fold = foldB r1 r2 f
depth :: B -> Int
depth = foldB
1
1
(\ x y z -> 1 + maximum [x, y... | grammarware/slps | topics/implementation/b/folding/foldB.hs | bsd-3-clause | 604 | 28 | 11 | 182 | 366 | 192 | 174 | 29 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
-- |
-- Module : Verifier.SAW.Testing.Random
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : jhendrix@galois.com, conathan@galois.com
-- Stability : experimental
-- Portability : portable
--
-- This module generates ra... | iblumenfeld/saw-core | src/Verifier/SAW/Testing/Random.hs | bsd-3-clause | 5,887 | 0 | 15 | 1,043 | 1,378 | 732 | 646 | -1 | -1 |
{-# LANGUAGE
DeriveDataTypeable ,
DeriveFoldable ,
ScopedTypeVariables,
RankNTypes,
TypeOperators,
DeriveTraversable,
GeneralizedNewtypeDeriving,
ImpredicativeTypes,
TypeFamilies,
PackageImports,
StandaloneDeriving,
FlexibleContexts,
DeriveFunctor,
TypeSynonymInstances,
FlexibleInstances,
... | massudaw/mtk | filters/position/PositionFilter.hs | bsd-3-clause | 6,858 | 4 | 20 | 1,529 | 2,194 | 1,169 | 1,025 | -1 | -1 |
main = putStrLn "Hello World.\nWelcome to 30 Days of Code.\n"
| rhovland/hackerrank-30days2016 | day0.hs | bsd-3-clause | 62 | 0 | 5 | 10 | 9 | 4 | 5 | 1 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
-----------------------------------------------------------------------------
--
-- Stg to C-- code generation: expressions
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
m... | nushio3/ghc | compiler/codeGen/StgCmmExpr.hs | bsd-3-clause | 34,111 | 8 | 20 | 9,128 | 4,847 | 2,563 | 2,284 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module CANOpe... | distrap/ivory-tower-canopen | src/CANOpen/Tower.hs | bsd-3-clause | 4,881 | 0 | 22 | 1,273 | 1,262 | 603 | 659 | 124 | 1 |
{-# LANGUAGE PackageImports #-}
import "RSSQueue" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO, threadDelay)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
main :: IO ()
main = do... | ehamberg/rssqueue | devel.hs | bsd-3-clause | 682 | 0 | 10 | 121 | 179 | 97 | 82 | 22 | 2 |
module HaskellCraft.Parser where
import HaskellCraft.Block
import Text.Parsec
import Control.Applicative hiding ((<|>), many)
groupInts c = sepBy integer c
groupFloats c = sepBy float c
groupEvents = sepBy (groupInts (char ',')) (char '|')
plus = char '+' *> number
minus = (:) <$> char '-' <*> number
number ... | markgrebe/haskell-craft | HaskellCraft/Parser.hs | bsd-3-clause | 2,541 | 0 | 11 | 610 | 1,071 | 581 | 490 | 63 | 4 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
module EFA.Data.Record where
--import EFA.Utility(Caller,merror,(|>),ModuleName(..),FunctionName, genCaller)
import Prelude hiding ((++))
import qualified EFA.Data.Vector as DV
i... | energyflowanalysis/efa-2.1 | src/EFA/Data/Record.hs | bsd-3-clause | 3,271 | 0 | 12 | 677 | 1,123 | 593 | 530 | 52 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE Overloaded... | deech/stack | src/Stack/Types/Config.hs | bsd-3-clause | 78,951 | 0 | 24 | 18,447 | 15,172 | 8,238 | 6,934 | -1 | -1 |
import Test.Tasty
import Test_1_Parser
import Test_2_EvaluatingSimpleExpressions
import Test_3_EvaluatingComplexExpressions
import Test_4_WorkingWithVariables
import Test_5_AddingFunctionsToTheMix
import Test_6_WorkingWithLists
import Test_... | joelchelliah/diy-lang-haskell | test/Test_all.hs | bsd-3-clause | 780 | 0 | 7 | 207 | 77 | 48 | 29 | 18 | 1 |
{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, OverloadedStrings, GADTs, ExistentialQuantification, TypeApplications, ScopedTypeVariables #-}
module QueryArrow.FFI.Service.Local where
import QueryArrow.Syntax.Term
import QueryArrow.DB.DB
import QueryArrow.QueryPlan
import QueryArrow.DB.Resul... | xu-hao/QueryArrow | QueryArrow-ffi-service-local/src/QueryArrow/FFI/Service/Local.hs | bsd-3-clause | 2,122 | 0 | 18 | 386 | 615 | 331 | 284 | 44 | 1 |
module SelfDestruct where
import Botworld
import Botworld.Display
import Data.Maybe
import Data.Map (Map, empty, insert)
import qualified SelfDestruct.Omega as Omega
import qualified SelfDestruct.Ideal as Ideal
import Text.Printf (printf)
-- Processor you get to use.
cpu :: Processor
cpu = P 8192
-- Game description... | machine-intelligence/Botworld | games/SelfDestruct.hs | bsd-3-clause | 1,339 | 0 | 11 | 246 | 465 | 250 | 215 | 39 | 1 |
module Problem491 where
import qualified Data.HashSet as S
import Data.List
import Control.Arrow
import Data.Array
import Merge
main :: IO ()
main =
print
$ sum
$ map (\(a, b) -> count a * count'' (map (head &&& length) $ group b))
$ S.toList
$ S.fromList
$ filter valid
... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem491.hs | bsd-3-clause | 1,129 | 0 | 20 | 333 | 624 | 343 | 281 | 35 | 1 |
module Language.TheExperiment.Parser.Module where
import Control.Monad
import Text.Parsec
import Text.Parsec.Expr
import Language.TheExperiment.AST.Module
import Language.TheExperiment.AST.Expression
import Language.TheExperiment.Parser.Lexer
import Language.TheExperiment.Parser.Statement
type ParsedModule = Modu... | jvranish/TheExperiment | src/Language/TheExperiment/Parser/Module.hs | bsd-3-clause | 2,491 | 0 | 17 | 802 | 541 | 285 | 256 | -1 | -1 |
-- | Basic server monads and related operations.
module Game.LambdaHack.Server.MonadServer
( -- * The server monad
MonadServer( getsServer
, modifyServer
, chanSaveServer -- exposed only to be implemented, not used
, liftIO -- exposed only to be implemented, not used... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Server/MonadServer.hs | bsd-3-clause | 9,063 | 0 | 23 | 2,277 | 2,175 | 1,122 | 1,053 | -1 | -1 |
module Common.MapReduce (
mapReduce
, mapReduce'
) where
import Control.Parallel.Strategies (parMap, rdeepseq, using, NFData)
import Control.Parallel (pseq)
{-# INLINABLE divide #-}
{-# INLINABLE mapReduce #-}
{-# INLINABLE mapReduce' #-}
divide :: Int -> [a] -> [[a]]
divide _ [] = []
divide n xs = as : divide n b... | foreverbell/project-euler-solutions | lib/Common/MapReduce.hs | bsd-3-clause | 929 | 0 | 12 | 178 | 363 | 201 | 162 | 16 | 1 |
-- This module is based on `Parse.String` in the Elm compiler
-- https://github.com/elm/compiler/blob/94715a520f499591ac6901c8c822bc87cd1af24f/compiler/src/Parse/String.hs
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
{-# LANGUAGE BangPatterns, MagicHash, OverloadedStrings, UnboxedTuples #-}
module Parse.String
... | avh4/elm-format | elm-format-lib/src/Parse/String.hs | bsd-3-clause | 10,429 | 0 | 21 | 3,067 | 3,454 | 1,725 | 1,729 | 232 | 10 |
{-# LANGUAGE OverloadedStrings #-}
module HtmlCat.Snap (feedStdIn, runHtmlCat) where
import Control.Concurrent (Chan, writeChan, forkIO)
import Control.Monad (void)
import Control.Monad.Trans (MonadIO(..))
import Data.Text (Text)
import System.IO (stdin)
import qualified Data.ByteString.Char8 as B8
import Data.Enumera... | maoe/htmlcat | HtmlCat/Snap.hs | bsd-3-clause | 1,917 | 0 | 12 | 412 | 617 | 346 | 271 | 44 | 1 |
module KMC.Util.Set where
import qualified Data.Set as S
-- | The monad `join` operation for sets. Data.Set is not a monad
-- because of the (Ord a) constraint!
joinSets :: (Ord a) => S.Set (S.Set a) -> S.Set a
joinSets = S.foldl S.union S.empty
-- | Given a set S of `a` and a set of sets of `a`, return those sets... | diku-kmc/repg | src/KMC/Util/Set.hs | mit | 498 | 0 | 11 | 102 | 159 | 84 | 75 | 6 | 1 |
{-# LANGUAGE CPP, NoImplicitPrelude #-}
module Data.Either.Compat (
module Base
, isLeft
, isRight
) where
import Data.Either as Base
#if !(MIN_VERSION_base(4,7,0))
import Data.Bool (Bool(..))
-- | Return `True` if the given value is a `Left`-value, `False` otherwise.
--
-- /Since: 4.7.0.0/
isLeft :: Either a b -> ... | beni55/base-compat | src/Data/Either/Compat.hs | mit | 563 | 0 | 7 | 101 | 133 | 78 | 55 | 13 | 1 |
{-
Copyright (C) 2011 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distr... | Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/MIME.hs | gpl-2.0 | 20,338 | 0 | 9 | 5,576 | 4,076 | 2,707 | 1,369 | 449 | 1 |
{-# LANGUAGE CPP #-}
-- Create pandoc.1 man and pandoc_markdown.5 man pages from README
import Text.Pandoc
import Text.Pandoc.Error (handleError)
import qualified Text.Pandoc.UTF8 as UTF8
import Data.Char (toUpper)
import Control.Monad
import System.FilePath
import System.Environment (getArgs)
import Text.Pandoc.Shared... | csrhodes/pandoc | man/make-pandoc-man-pages.hs | gpl-2.0 | 3,906 | 2 | 16 | 857 | 1,264 | 645 | 619 | 82 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-swf/gen/Network/AWS/SWF/RespondDecisionTaskCompleted.hs | mpl-2.0 | 5,854 | 0 | 12 | 1,131 | 594 | 364 | 230 | 79 | 1 |
{- |
Module : Verifier.SAW
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer : jhendrix@galois.com
Stability : experimental
Portability : non-portable (language extensions)
-}
{-# LANGUAGE TemplateHaskell #-}
module Verifier.SAW
( module Verifier.SAW.SharedTerm
, module Verifier.SAW.Exter... | GaloisInc/saw-script | saw-core/src/Verifier/SAW.hs | bsd-3-clause | 666 | 0 | 13 | 106 | 92 | 56 | 36 | 12 | 0 |
module Development.Abba
( module Development.Abba.Core
, module Development.Abba.DependencyGraph
, module Development.Abba.Types
) where
import Development.Abba.Core
import Development.Abba.DependencyGraph
import Development.Abba.Types
| mgeorgehansen/Abba | Development/Abba.hs | bsd-3-clause | 246 | 0 | 5 | 29 | 47 | 32 | 15 | 7 | 0 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ko-KR">
<title>Active Scan Rules - Alpha | ZAP Extension</title>
<maps>
<homeID>top</homeID... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/ascanrulesAlpha/resources/help_ko_KR/helpset_ko_KR.hs | apache-2.0 | 987 | 85 | 53 | 163 | 405 | 213 | 192 | -1 | -1 |
-- helpers for constructing JS objects that can be efficiently inlined as literals
-- no Template Haskell available yet, generated by utils/genBuildObject.hs
{-# LANGUAGE CPP #-}
#ifndef ghcjs_HOST_OS
module GHCJS.Prim.Internal.Build () where
#else
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, GHCForeignImportP... | fizruk/ghcjs | lib/ghcjs-prim/GHCJS/Prim/Internal/Build.hs | mit | 136,167 | 0 | 3 | 30,667 | 17 | 14 | 3 | 2 | 0 |
{-# 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 Vector... | frantisekfarka/ghc-dsi | compiler/vectorise/Vectorise/Exp.hs | bsd-3-clause | 49,194 | 6 | 22 | 14,217 | 11,187 | 5,862 | 5,325 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Encoding.Failure
-- Copyright : (c) The University of Glasgow, 2008-2011
-- License : see libraries/base/LICENSE
--
-- Maintainer : libr... | jwiegley/ghc-release | libraries/base/GHC/IO/Encoding/Failure.hs | gpl-3.0 | 8,387 | 0 | 17 | 1,770 | 1,054 | 606 | 448 | 84 | 5 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module Network.Wai.Handler.Warp.Request (
recvRequest
, headerLines
, pauseTimeoutKey
) where
import qualified Control.Concurrent as Conc (yield)
import Control.Exception (throwIO... | dylex/wai | warp/Network/Wai/Handler/Warp/Request.hs | mit | 10,074 | 0 | 19 | 3,148 | 2,172 | 1,150 | 1,022 | 195 | 7 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
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 condit... | apyrgio/ganeti | test/hs/Test/Ganeti/HTools/Container.hs | bsd-2-clause | 3,834 | 0 | 25 | 841 | 708 | 380 | 328 | 50 | 3 |
module TestUtil where
import qualified Turnip.AST as AST
import Turnip.Parser (parseLua)
import Turnip.Eval.Types (Value)
successful :: Show a => Either a p -> p
successful (Right x) = x
successful (Left err) = error $ show err
failure :: Either Value [Value] -> [Value]
failure (Right x) = error $ "The ca... | bananu7/Turnip | Test/TestUtil.hs | mit | 467 | 0 | 7 | 96 | 171 | 92 | 79 | 12 | 1 |
module SFML.Graphics.SFViewable
where
import SFML.Graphics.Rect
import SFML.Graphics.Types
class SFViewable a where
-- | Change the target's current active view.
setView :: a -> View -> IO ()
-- | Get the target's current active view.
getView :: a -> IO View
-- | Get the target's ... | SFML-haskell/SFML | src/SFML/Graphics/SFViewable.hs | mit | 521 | 0 | 10 | 138 | 90 | 50 | 40 | 8 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
main = scotty 3000 $ do
get "/" $ do
html "Hello World!" | slogsdon/language-web-shootout | haskell/src/Main.hs | mit | 116 | 0 | 11 | 25 | 35 | 16 | 19 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Network.Octohat.Types ( Member(..)
, MemberWithKey(..)
, Team(..)
, TeamPermission(..)
, Re... | stackbuilders/octohat | src/Network/Octohat/Types.hs | mit | 11,770 | 0 | 14 | 3,727 | 1,764 | 1,011 | 753 | 154 | 2 |
module Rebase.Data.Groupoid
(
module Data.Groupoid
)
where
import Data.Groupoid
| nikita-volkov/rebase | library/Rebase/Data/Groupoid.hs | mit | 83 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
module Rebase.GHC.Storable
(
module GHC.Storable
)
where
import GHC.Storable
| nikita-volkov/rebase | library/Rebase/GHC/Storable.hs | mit | 80 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
{-# LANGUAGE Arrows #-}
module Main where
--------------------
-- Global Imports --
import Graphics.Rendering.OpenGL hiding (position)
import Graphics.UI.GLFW as GLFW
import Prelude hiding ((.))
import Control.Wire
import FRP.Netwire
import Data.IORef
import Linear.V2
----------
-- Code --
{-|
The size of the quad... | crockeo/netwire-tutorial | src/part2/Main.hs | mit | 5,449 | 1 | 22 | 1,653 | 1,250 | 633 | 617 | -1 | -1 |
-- file: ch04/InteractWith.hs
import System.Environment (getArgs)
interactWith function inputFile outputFile = do
input <- readFile inputFile
writeFile outputFile (function input)
main = mainWith myFunction
where mainWith function = do
args <- getArgs
case args of
... | tamasgal/haskell_exercises | Real_World_Haskell/ch04/InteractWith.hs | mit | 529 | 1 | 11 | 153 | 116 | 56 | 60 | 11 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-missing-fields #-}
-- | This module provides utilities for creating backends. Regular users do not
-- need to use this module.... | gbwey/persistentold | persistent-template/Database/Persist/TH.hs | mit | 38,009 | 57 | 27 | 11,661 | 11,233 | 5,838 | 5,395 | 805 | 6 |
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
-- | Helper functions for SmallArray#
--
-- This module exposes _unsafe_ functions to work with SmallArrays. That means
-- that specifically neither index bounds nor element types are checked So this
--... | VinylRecords/Vinyl | Data/Vinyl/ARec/Internal/SmallArray.hs | mit | 2,067 | 0 | 22 | 481 | 562 | 289 | 273 | 46 | 1 |
module Gt.Core
(
do_trans
, do_trans_each_word
)
where
import Gt.Net
import Gt.Langs
import Gt.Helpers
import Gt.Translation
import Text.JSON
do_trans :: Lang -> Lang -> String -> IO String
do_trans sl tl str =
do
jresp <- get_resp sl tl str
return $ show $ jresp_to_resp jresp
do_trans_e... | styx/gtc | Gt/Core.hs | gpl-3.0 | 2,876 | 0 | 12 | 712 | 767 | 406 | 361 | 62 | 4 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Sara.TestUtils.AstGenUtils () where
import Sara.TestUtils.ArbitraryUtils
import Sara.Ast.Synta... | Lykos/Sara | tests/Sara/TestUtils/AstGenUtils.hs | gpl-3.0 | 26,298 | 0 | 16 | 6,007 | 7,849 | 3,983 | 3,866 | 437 | 6 |
module MC.Pi (approximatePi) where
import MC.Internal.Circle
approximatePi :: [Point] -> Double
approximatePi points = 4.0 * fromIntegral pointsInCircle / fromIntegral totalPoints
where pointsInCircle = length $ filter isInUnitCircle points
totalPoints = length points
| matt-keibler/monte-carlo-pi | monte-carlo-pi-hs/src/MC/Pi.hs | gpl-3.0 | 281 | 0 | 8 | 45 | 75 | 40 | 35 | 6 | 1 |
module Utils.GenEventSIR where
import Control.Monad.Random
import Control.Monad.Reader
import Control.Monad.Writer
import Data.MonadicStreamFunction.InternalCore
import Test.Tasty.QuickCheck
import SIR.Event
import SIR.Model
import Utils.GenSIR
genEvent :: [AgentId] -> Gen SIREvent
genEvent = genEventFreq 1 1 1 (1,1... | thalerjonathan/phd | thesis/code/sir/src/test/Utils/GenEventSIR.hs | gpl-3.0 | 5,042 | 0 | 14 | 1,679 | 1,516 | 793 | 723 | 129 | 2 |
-- | This module contains parsing functions for Infernal programs
module Biobase.RNAlien.InfernalParser (
module Biobase.RNAlien.Types,
readCMSearch,
readCMSearches,
parseCMSearch,
par... | eggzilla/RNAlien | Biobase/RNAlien/InfernalParser.hs | gpl-3.0 | 8,441 | 0 | 12 | 1,841 | 2,121 | 968 | 1,153 | 180 | 1 |
{- Merch.Race.UI.Button - Button user interface.
Copyright 2013 Alan Manuel K. Gloria
This file is part of Merchant's Race.
Merchant's Race is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of th... | AmkG/merchants-race | Merch/Race/UI/Button.hs | gpl-3.0 | 4,982 | 0 | 13 | 1,324 | 1,414 | 763 | 651 | 117 | 8 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-| Update ProductVariant Prices by SKU from a CSV. -}
import Control.Monad.Logger (runNoLoggingT)
import Data.Csv (FromNamedRecord, decodeByName)
import Database.Persist
import Database.Persist.P... | Southern-Exposure-Seed-Exchange/southernexposure.com | server/scripts/UpdateProductPrices.hs | gpl-3.0 | 2,188 | 0 | 18 | 599 | 561 | 305 | 256 | 54 | 3 |
module Main where
import Game.Regret (defaultMain)
import Game.Select (SelectGame(SelectGame))
import Game.KuhnPoker (KuhnPoker(KuhnPoker))
main :: IO ()
main = defaultMain $ pure $ SelectGame KuhnPoker
| davidspies/regret-solver | kuhn-poker/app/Main.hs | gpl-3.0 | 206 | 0 | 6 | 27 | 68 | 40 | 28 | 6 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Insert.hs | mpl-2.0 | 4,242 | 0 | 16 | 961 | 484 | 292 | 192 | 73 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.AppsTasks.Types.Sum
-- Copyright : (c) 2015-2016 Brend... | brendanhay/gogol | gogol-apps-tasks/gen/Network/Google/AppsTasks/Types/Sum.hs | mpl-2.0 | 1,221 | 0 | 11 | 292 | 197 | 114 | 83 | 26 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Resources/Get.hs | mpl-2.0 | 3,756 | 0 | 17 | 915 | 473 | 282 | 191 | 77 | 1 |
{-
Habit of Fate, a game to incentivize habit formation.
Copyright (C) 2019 Gregory Crosswhite
This program is free software: you can redistribute it and/or modify
it under version 3 of the terms of the GNU Affero General Public License.
This program is distributed in the hope that it will be usef... | gcross/habit-of-fate | sources/library/HabitOfFate/Data/Markdown.hs | agpl-3.0 | 2,178 | 0 | 10 | 359 | 318 | 184 | 134 | 35 | 1 |
{-# LANGUAGE NoOverloadedStrings #-}
module Lupo.Backends.URLMapper
( makeURLMapper
) where
import Control.Exception
import qualified Data.ByteString.Char8 as C
import Data.Function
import qualified Data.List as L
import Data.Monoid
import qualified Data.Text as T
import Data.Text.Lens
import Text.Shakespeare.Tex... | keitax/lupo | src/Lupo/Backends/URLMapper.hs | lgpl-3.0 | 1,989 | 0 | 19 | 452 | 649 | 359 | 290 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
-- |
-- Module: EchoBackground
-- Experimentation with data-ringbuffer
--
-- This run replicates a simple echo using:
--
-- - Data.RingBuffer
-- - Background: a worker pool of background threads
module Hyperq.EchoBackground (
-- * testing imperatives
run
, run'
, runSt... | mogeiwang/hyperq | src/Hyperq/EchoBackground.hs | apache-2.0 | 7,493 | 0 | 13 | 2,224 | 2,204 | 1,127 | 1,077 | 183 | 1 |
module Walk.A324605Spec (main, spec) where
import Test.Hspec
import Walk.A324605 (a324605)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A324605" $
it "correctly computes the first 10 elements" $
take 10 (map a324605 [1..]) `shouldBe` expectedValue where
expectedValue = [2,1,2,1,5,6,1,2,11... | peterokagey/haskellOEIS | test/Walk/A324605Spec.hs | apache-2.0 | 324 | 0 | 10 | 59 | 130 | 75 | 55 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Radiation.Parsers.Languages.C(parser) where
import Control.Applicative
import Control.Monad
import Data.Attoparsec.ByteString.Char8 as BP
import Data.Char (isAlphaNum)
import Data.Maybe (catMaybes)
import My.Utils
import Prelude hiding (log)
imp... | jrahm/Radiation | src/Radiation/Parsers/Languages/C.hs | bsd-2-clause | 4,455 | 0 | 23 | 1,394 | 1,186 | 652 | 534 | 88 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-
ARM instruction set.
-}
module Translator.Assembler.Target.ARM (ARMInstr(..), CondExec(..), Reg(..), OpAdr(..),
Update(..), Shift(..), Suffix(..),
module Translator.Assembler.Directive,
... | hth313/hthforth | src/Translator/Assembler/Target/ARM.hs | bsd-2-clause | 7,732 | 0 | 16 | 2,923 | 3,331 | 1,727 | 1,604 | 163 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : System.Ext2.Parsers
-- Copyright : (C) 2015 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <ricky@elrod.me>
-- Stability : experimental
-- Portability : lens
--
-- This library exis... | relrod/ext2 | src/System/Ext2/Parsers.hs | bsd-2-clause | 4,805 | 0 | 50 | 1,699 | 753 | 410 | 343 | 121 | 1 |
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QSortFilterProxyModel.h" #-}
-----------------------------------------------------------------------------
{-| Module : QSortFilterProxyModel.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02... | keera-studios/hsQt | Qtc/Gui/QSortFilterProxyModel.hs | bsd-2-clause | 63,882 | 0 | 18 | 9,355 | 19,025 | 9,726 | 9,299 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
module File.Remove where
import System.Fuse
import DB.Base
import DB.Read (fileEntityFromPath)
import Debug (dbg)
import Node (nodeNamed)
im... | marklar/TagFS | src/File/Remove.hs | bsd-3-clause | 818 | 0 | 12 | 280 | 156 | 81 | 75 | 20 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.ByteString.Char8 (pack)
import Data.List (nub)
import Network.Wai.Middleware.Static (staticPolicy, addBase)
import System.Directory (getDirectoryContents)
import System.Environment (getEnv)
import Text.Regex (mkRegex, subRegex)
import Text.Regex.Base (m... | justinwoo/tracker-hs | app/Main.hs | bsd-3-clause | 1,274 | 0 | 11 | 267 | 418 | 218 | 200 | 36 | 2 |
module TestHelper where
import Test.Tasty
import Test.Tasty.HUnit
import Environment (extend, lookup)
import Evaluator (evaluate)
import Interpreter (interpret, interpretFile)
import Parser (parse)
import Prelude ... | joelchelliah/diy-lang-haskell | test/parts/TestHelper.hs | bsd-3-clause | 2,763 | 0 | 10 | 536 | 580 | 311 | 269 | 44 | 1 |
module Plugin where
import GhcPlugins
plugin :: Plugin
plugin = defaultPlugin {
installCoreToDos = install
}
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todo = do
reinitializeGlobals
return $ pprTraceIt "Hello World" todo
| isovector/dependent-types | src/Plugin.hs | bsd-3-clause | 265 | 0 | 8 | 48 | 75 | 41 | 34 | 9 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Reduce where
import Obsidian.GCDObsidian
import qualified Obsidian.GCDObsidian.CodeGen.CUDA as CUDA
----------------------------------------------------------------------------
-- DONE: This is too limited (Scalar a).
-- Comes from the sync. Figure out how to generaliz... | svenssonjoel/GCDObsidian | LicExamples/Reduce.hs | bsd-3-clause | 880 | 0 | 11 | 195 | 192 | 105 | 87 | 10 | 1 |
module T197 where
import Data.Singletons.TH
import Prelude.Singletons
$(singletons [d|
infixl 5 $$:
($$:) :: Bool -> Bool -> Bool
_ $$: _ = False
|])
| goldfirere/singletons | singletons-base/tests/compile-and-dump/Singletons/T197.hs | bsd-3-clause | 159 | 0 | 7 | 34 | 29 | 18 | 11 | -1 | -1 |
{-# LANGUAGE BangPatterns, FlexibleInstances, OverloadedStrings,
RecordWildCards, TypeSynonymInstances #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Main ( main ) where
import Control.Applicative
import Control.Exception (evaluate)
import Control.DeepSeq
import Criterion.Main
import Data.ByteStrin... | mikeizbicki/cassava | benchmarks/Benchmarks.hs | bsd-3-clause | 5,432 | 0 | 20 | 1,785 | 1,322 | 682 | 640 | 131 | 1 |
-- | Fake cabal module for local building
module Paths_shake where
import Data.Version
import System.IO.Unsafe
import System.Directory
import Control.Exception
-- We want getDataFileName to be relative to the current directory even if
-- we issue a change directory command. Therefore, first call caches, future ones... | nh2/shake | Paths.hs | bsd-3-clause | 588 | 0 | 9 | 98 | 114 | 65 | 49 | 13 | 1 |
----------------------------------------------------------------------------
-- THIS is a MODIFIED VERSION of Text.Parsec.Token
-- Modified to support layout combinators by Tim Sheard 7/27/09
-- Further updated to Parsec 3.1 by Vilhelm Sjoberg 2011-01-13
-- Find modified and added lines by searching for "--MOD"
-- |
-... | jonsterling/Luitzen | src/LayoutToken.hs | bsd-3-clause | 29,965 | 17 | 30 | 10,496 | 5,584 | 3,048 | 2,536 | 357 | 13 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
module Monad where
import Control.Monad.State.Strict
import System.Console.Haskeline
import System.Directory
import System.FilePath
import CSPM
import Util.Exception
import Util.PrettyPrint
data ICheckerState = ICheckerState {
settingsDirectory :: File... | sashabu/libcspm | cspmchecker/src/InteractiveChecker/Monad.hs | bsd-3-clause | 1,607 | 0 | 11 | 292 | 422 | 222 | 200 | 40 | 1 |
module Solr.Query.Filter
( FilterParams
, cache
, cost
, locals
) where
import Solr.Query.Filter.Internal
| Sentenai/solr-query | src/Solr/Query/Filter.hs | bsd-3-clause | 117 | 0 | 4 | 25 | 28 | 19 | 9 | 6 | 0 |
-- | Provides an easy way to combine several pages in a list. The applications
-- are obvious:
--
-- * A post list on a blog
--
-- * An image list in a gallery
--
-- * A sitemap
--
module Hakyll.Web.Page.List
( setFieldPageList
, pageListCompiler
, chronological
, recentFirst
, sortByBaseName
) ... | sol/hakyll | src/Hakyll/Web/Page/List.hs | bsd-3-clause | 2,674 | 0 | 11 | 671 | 523 | 295 | 228 | 42 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DataKinds #-}
--------------------------------------------------------------------------------
module Generics.Deriving.Zipper.Trace (
Zipper(..),
ZipperT,
runZipperT,
ZipperM,
runZippe... | spl/generic-deriving-extras | src/Generics/Deriving/Zipper/Trace.hs | bsd-3-clause | 4,144 | 0 | 14 | 780 | 1,664 | 886 | 778 | 89 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
-- | Static analysis of Lua code; each AST node is analyzed in isolation.
module Static
( staticAnalysis
, StyleGuide(..)
, Suggestion(..)
, showSuggestion
) where
import HasPos
import Trav
i... | mitchellwrosen/llint | src/Static.hs | bsd-3-clause | 13,182 | 0 | 20 | 3,694 | 3,454 | 1,743 | 1,711 | -1 | -1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Machine-dependent assembly language
--
-- (c) The University of Glasgow 1993-2004
--
-----------------------------------------------------------------------------
#include "HsVersions.h"
#include "nativeGen/NCG.h"... | jstolarek/ghc | compiler/nativeGen/PPC/Instr.hs | bsd-3-clause | 21,949 | 0 | 18 | 7,296 | 5,735 | 2,961 | 2,774 | 391 | 49 |
-- Exposes definition for Dict between the modules that need it
-- (for safe casting, mostly)
module AO.InnerDict
( AODict(..)
) where
import Control.Arrow (second)
import qualified Data.Map as M
import AO.Code
-- | An AO dictionary is simply a map from words to code plus any
-- metadata for each word.
--
... | dmbarbour/awelon | hsrc/AO/InnerDict.hs | bsd-3-clause | 1,106 | 0 | 11 | 225 | 177 | 104 | 73 | 12 | 0 |
{-| The Quasiquoter for the reflex-jsx language
The only import you need is "jsx", which is the quasiquoter. See the README
for more information.
-}
{-# LANGUAGE TemplateHaskell #-}
module ReflexJsx.QQ
( jsx
) where
import qualified Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
im... | dackerman/reflex-jsx | src/ReflexJsx/QQ.hs | bsd-3-clause | 1,875 | 0 | 16 | 388 | 443 | 239 | 204 | 45 | 3 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
module ZM.Type.NonEmptyList
( NonEmptyList(..)
, nonEmptyList
)
where
import Control.DeepSeq
import Flat
import ... | tittoassini/typed | src/ZM/Type/NonEmptyList.hs | bsd-3-clause | 853 | 0 | 8 | 202 | 189 | 104 | 85 | 19 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module :
-- Copyright : (c) 2012 Boyun Tang
-- License : BSD-style
-- Maintainer : tangboyun@hotmail.com
-- Stability : experimental
-- Portability : ghc
--
--
--
---------------------------------------------------------------------... | tangboyun/bio-web-api | Bio/Web/GProfiler/GConvert.hs | bsd-3-clause | 2,234 | 0 | 27 | 615 | 531 | 286 | 245 | 39 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, DeriveFunctor, GeneralizedNewtypeDeriving #-}
module HLib
(
Node(..), Conversation(..), SerializableUser(..), EdgeTarget(..),
ComputationResult(..),
ErrorType(..),
processSerializedUserMessageAndUpdateUser,
toEither, toEitherM
)
where
import qualified Dat... | homam/fsm-conversational-ui | src/HLib.hs | bsd-3-clause | 4,923 | 0 | 15 | 921 | 1,808 | 959 | 849 | 97 | 1 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module FPNLA.Operations.LAPACK.Strategies.DataTypes (
HMatrixBindSeq,
CholLLVBlocksSeq,
CholLLVBlocksPar_Repa,
CholLLVSeq,
CholLLVPar_Repa,
NullContext,
SqrBlockContext(..)
... | mauroblanco/fpnla-examples | src/FPNLA/Operations/LAPACK/Strategies/DataTypes.hs | bsd-3-clause | 1,197 | 0 | 6 | 215 | 263 | 159 | 104 | -1 | -1 |
{-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances,
MultiParamTypeClasses, QuasiQuotes, TemplateHaskell,
TypeOperators, UndecidableInstances #-}
-- | An example of dealing with rows that contain missing data. We may
-- want to fill in the gaps with default values.
import Data.Monoid (... | codygman/Frames | demo/MissingData.hs | bsd-3-clause | 2,537 | 0 | 14 | 511 | 649 | 360 | 289 | 43 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, GADTs, ScopedTypeVariables, FunctionalDependencies, RecursiveDo, UndecidableInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, EmptyDataDecls, NoMonomorphismRestriction, TypeOperators, DeriveDataTypeable, PackageI... | phadej/reflex | src/Reflex/Dynamic.hs | bsd-3-clause | 21,307 | 0 | 26 | 5,379 | 6,217 | 3,240 | 2,977 | 283 | 5 |
module HsCmp (
cmp
, cmp'
, compareF
, CmpResult (..)
)
where
import Prelude hiding (lines)
import System.IO.MMap
import Data.ByteString
import Data.Word
import Data.Word8
data CmpResult = Same
| Differ{bytes :: Int, lines :: Int }
instance Show CmpResult where
show Same = ""... | yaccz/hscmp | HsCmp.hs | bsd-3-clause | 1,030 | 0 | 11 | 307 | 443 | 226 | 217 | 34 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module Pack6 where
import Data.Functor.Identity
import Data.Maybe
import Data.Map (Map)
import Data.Set (Set)
import qualified Data.Map as Map
import qualified Data.Set as Set
import Control.Lens
s1 :: ([Int], [Bool])
s1 = ([1], [True])
pl1 :: [(Int, B... | notae/haskell-exercise | pack/Pack6.hs | bsd-3-clause | 898 | 0 | 11 | 215 | 481 | 264 | 217 | 27 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE UndecidableInstances #-}
module WeiXin.PublicPlatform.Yesod.Site.Function
( module WeiXin.PublicPlatform.Yesod.Site.Function
, module WeiXin.PublicPlatform.Yesod.Site.Data
)where
-... | yoo-e/weixin-mp-sdk | WeiXin/PublicPlatform/Yesod/Site/Function.hs | mit | 16,130 | 0 | 24 | 5,837 | 3,148 | 1,591 | 1,557 | -1 | -1 |
-- | Stability: Experimental
module Mahjong.Riichi.FourPlayer where
import Mahjong.Board
-- import Mahjong.Player
import Mahjong.Riichi
import Mahjong.Tile
data FourPlayer
= FourPlayer (Board (Dora, RiichiTile))
deriving (Show)
data FourPlayerOptions
= FourPlayerOptions
{ allowNotenRiichi :: Bool
-- ... | TakSuyu/mahsjong | src/Mahjong/Riichi/FourPlayer.hs | mit | 974 | 0 | 9 | 219 | 155 | 95 | 60 | 25 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Dampf.Provision (ProvisionType(..), goProvision) where
import Shelly
import Data.Text (Text)
import qualified Data.Text as T
import Dampf.Types
import Control.Monad.Catch (M... | filopodia/open | dampf/lib/Dampf/Provision.hs | mit | 2,937 | 0 | 10 | 449 | 736 | 386 | 350 | 64 | 1 |
module Timing ( getTick
, timeIt
) where
import Control.Exception
import Data.Time.Clock
import Control.Monad.IO.Class
import System.IO.Unsafe
-- Timing functions
-- TODO: Consider just using the criterion package for all performance measurements
-- http://hackage.haskell.org/packa... | blitzcode/rust-exp | hs-src/Timing.hs | mit | 969 | 0 | 10 | 208 | 183 | 98 | 85 | 19 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
module Language.Java.Paragon.QuasiQuoter where
--import Language.Haskell.TH.Syntax
--import qualified Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Lift
--import Language.Haskell.TH.Lib
import Language.Haskell.Meta.Parse
--import ... | bvdelft/parac2 | src/Language/Java/Paragon/QuasiQuoter.hs | bsd-3-clause | 1,996 | 2 | 10 | 344 | 450 | 263 | 187 | 42 | 1 |
{-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Control.Applicative
(r, t, z)
import Ugah.Blub
( a
, b
, c
)
import Data.Text (Text())
f :: Int -> Int
f = (+ 3)
r :: Int -> Int
r =
| dan-t/hsimport | tests/goldenFiles/SymbolTest47.hs | bsd-3-clause | 238 | 1 | 7 | 75 | 91 | 57 | 34 | -1 | -1 |
-- 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.
-- | Internal utilities only.
--
module Haxl.Core.Util
( compose
, textShow
) where
import Data.Text (Text)
import qualified Data.Text as T... | simonmar/Haxl | Haxl/Core/Util.hs | bsd-3-clause | 480 | 0 | 7 | 97 | 102 | 64 | 38 | 9 | 1 |
-- {-# LANGUAGE Haskell201x #-}
module Maybe2 where
data Maybe' a = Nothing' | Just' a
instance Functor Maybe' where
fmap f (Just' v) = Just' (f v)
fmap _ Nothing' = Nothing'
instance Applicative Maybe' where
pure = Just'
f1 <*> f2 = f1 >>= \v1 -> f2 >>= (pure . v1)
instance Monad Maybe' where
... | alanz/Hs2010To201x | testcases/H201x/Maybe2.hs | bsd-3-clause | 376 | 0 | 10 | 104 | 141 | 72 | 69 | 11 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.